java课程设计-学生成绩管理系统设计报告Word格式.doc
《java课程设计-学生成绩管理系统设计报告Word格式.doc》由会员分享,可在线阅读,更多相关《java课程设计-学生成绩管理系统设计报告Word格式.doc(94页珍藏版)》请在冰点文库上搜索。
小组的具体分工情况见下表:
小组组长
成员
子项目名称
具体要求
设计各窗口
设计各窗口的创建
学生信息管理模块
建立学生信息增加,删除,修改,查询
课程信息管理模块
建立课程信息增加,删除,修改,查询
整合各各模块
程序完整化
登陆模块
设置登入
成绩信息管理模块
建立成绩信息增加,删除,修改,查询
学期信息管理模块
建立学期信息增加,删除,修改,查询
)
二、系统需求分析
1、系统需求分析
2、系统其他系统分析
三、系统的总体设计
1、系统总体设计框图,如下形式:
登录页面模块
选择服务模块
2、数据库表结构定义(如果有使用数据库)及表关系图
成绩信息表
列
学号
英语成绩
nasp成绩
window成
绩java成绩
学生信息表
姓名
班级
地址
电话
课程信息表
课程名称
任教教师
课时
教学模式
学期信息表
学期
3、系统的界面设计图
finalJButtonbutton=newJButton();
button.setText("
登入"
);
button.addActionListener(this);
button.setBounds(40,207,106,28);
getContentPane().add(button);
finalJButtonbutton_1=newJButton();
button_1.setText("
退出"
button_1.addActionListener(this);
button_1.setBounds(208,207,106,28);
getContentPane().add(button_1);
}
@Override
publicvoidactionPerformed(ActionEvente){
//TODOAuto-generatedmethodstub
if(e.getActionCommand().equals("
)){
Stringstring=String.valueOf(passwordField.getPassword());
if(textField.getText().equals("
admin"
)&
&
string.equals("
123"
))
{
farme1.setVisible(true);
newJDialog(farme1,true);
farme.setVisible(false);
}
else{
JOptionPane.showMessageDialog(null,"
用户名或密码错误!
"
"
提示信息"
JOptionPane.ERROR_MESSAGE);
}
System.exit(0);
}
finalJMenumenu=newJMenu();
menu.setText("
菜单"
menuBar.add(menu);
finalJMenuItemnewItemMenuItem=newJMenuItem();
newItemMenuItem.addActionListener(newActionListener(){
publicvoidactionPerformed(finalActionEvente){
xueshengxinxic=newxueshengxinxi();
c.setVisible(true);
dispose();
}
});
newItemMenuItem.setText("
学生信息管理"
menu.add(newItemMenuItem);
finalJMenuItemnewItemMenuItem_1=newJMenuItem();
newItemMenuItem_1.addActionListener(newActionListener(){
publicvoidactionPerformed(finalActionEvente){
kechengxinxic=newkechengxinxi();
c.setVisible(true);
dispose();
}
});
newItemMenuItem_1.setText("
课程信息管理"
menu.add(newItemMenuItem_1);
finalJMenuItemnewItemMenuItem_2=newJMenuItem();
newItemMenuItem_2.addActionListener(newActionListener(){
publicvoidactionPerformed(finalActionEvente){
chengjixinxic=newchengjixinxi();
c.setVisible(true);
dispose();
}
});
newItemMenuItem_2.setText("
成绩信息管理"
menu.add(newItemMenuItem_2);
finalJMenuItemnewItemMenuItem_3=newJMenuItem();
newItemMenuItem_3.addActionListener(newActionListener(){
publicvoidactionPerformed(finalActionEvente){
xueqixinxic=newxueqixinxi();
c.setVisible(true);
dispose();
}
});
newItemMenuItem_3.setText("
学期信息管理"
menu.add(newItemMenuItem_3);
finalJMenuItemnewItemMenuItem_6=newJMenuItem();
newItemMenuItem_6.addActionListener(newActionListener(){
publicvoidactionPerformed(finalActionEvente){
System.exit(0);
}
});
newItemMenuItem_6.setText("
menu.add(newItemMenuItem_6);
JMenumenu_2=newJMenu();
menu_2.setText("
\u5173\u4E8E"
menuBar.add(menu_2);
publicstaticvoidmain(Stringargs[]){
EventQueue.invokeLater(newRunnable(){
publicvoidrun(){
try{
xueshengxinxiframe=newxueshengxinxi();
frame.setVisible(true);
}catch(Exceptione){
e.printStackTrace();
}
}
});
}
/**
*Createtheframe
*/
publicxueshengxinxi(){
super();
setTitle("
\u5B66\u751F\u4FE1\u606F\u7BA1\u7406"
getContentPane().setLayout(null);
setBounds(100,100,500,375);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
Stringsu,sp;
su="
sa"
;
sp="
try{
Class.forName("
com.microsoft.sqlserver.jdbc.SQLServerDriver"
);
cn=DriverManager.getConnection("
jdbc:
sqlserver:
//127.0.0.1:
1757;
databaseName=学生成绩管理系统"
su,sp);
}catch(ClassNotFoundExceptione1){
e1.printStackTrace();
}catch(SQLExceptione){
e.printStackTrace();
finalJLabellabel=newJLabel();
label.setText("
学号"
label.setBounds(23,30,66,18);
getContentPane().add(label);
t1=newJTextField();
t1.setBounds(95,28,87,22);
getContentPane().add(t1);
finalJButtonbutton=newJButton();
button.addActionListener(newActionListener(){
publicvoidactionPerformed(finalActionEvente){
Stringsql="
select*from学生信息where学号='
+t1.getText()+"
'
sa=cn.createStatement();
re=sa.executeQuery(sql);
if(re.next())
{
ta.setText("
+re.getString
(1)+"
\n姓名:
+re.getString
(2)+"
\n班级:
+re.getString(3)+"
\n地址:
+re.getString(4)+"
\n电话:
+re.getString(5));
}
else
JOptionPane.showMessageDialog(null,"
失败"
}catch(SQLExceptione1){
e1.printStackTrace();
button.setText("
查询"
button.setBounds(188,25,66,28);
getContentPane().add(button);
finalJButtonbutton_1=newJButton();
button_1.addActionListener(newActionListener(){
deletefrom学生信息where学号='
s=sa.executeUpdate(sql);
if(s==1)
删除成功"
button_1.setText("
删除"
button_1.setBounds(260,25,66,28);
getContentPane().add(button_1);
ta=newJTextArea();
ta.setBounds(23,83,354,231);
getContentPane().add(ta);
finalJButtonbutton_2=newJButton();
button_2.addActionListener(newActionListener(){
xueshengxinxi1c=newxueshengxinxi1();
c.setVisible(true);
dispose();
button_2.setText("
增加"
button_2.setBounds(331,25,66,28);
getContentPane().add(button_2);
finalJButtonbutton_2_1=newJButton();
button_2_1.addActionListener(newActionListener(){
xueshengxinxi2c=newxueshengxinxi2();
button_2_1.setText("
修改"
button_2_1.setBounds(403,25,66,28);
getContentPane().add(button_2_1);
finalJButtonbutton_3=newJButton();
button_3.addActionListener(newActionListener(){
shouyec=newshouye();
insertinto学生信息values('
'
+t2.getText()+"
+t3.getText()+"
+t4.getText()+"
+t5.getText()+"
)"
增加成功"
增加失败"
e1.printStackTrace();
button_1.setBounds(105,258,106,28);
xueshengxinxic=newxueshengxinxi();
返回"
button.setBounds(233,258,106,28);
JLabellabel_5=newJLabel("
Newlabel"
label_5.setIcon(newImageIcon("
F:
\\JAVA\\\u5B66\u751F\u6210\u7EE9\u7BA1\u7406\u7CFB\u7EDF\\12.jpg"
));
label_5.setBounds(0,0,492,341);
getContentPane().add(label_5);
//
publicxueshengxinxi2(){
\u5B66\u751F\u4FE1\u606F\u4FEE\u6539"
label.setBounds(28,40,66,18);
finalJLabellabel_1=newJLabel();
label_1.setText("
姓名"
labe