学生信息管理系统JAVA+SQLWord格式文档下载.docx
- 文档编号:22088022
- 上传时间:2023-02-02
- 格式:DOCX
- 页数:64
- 大小:824.53KB
学生信息管理系统JAVA+SQLWord格式文档下载.docx
《学生信息管理系统JAVA+SQLWord格式文档下载.docx》由会员分享,可在线阅读,更多相关《学生信息管理系统JAVA+SQLWord格式文档下载.docx(64页珍藏版)》请在冰豆网上搜索。
随着在校大学生人数的不断增加,教务系统的数量也不断的上涨,。
学校工作繁杂、资料众多,人工管理信息的难度也越来越大,显然是不能满足实际的需要,效率也是很低的。
并且这种传统的方式存在着很多的弊端,如:
保密性差、查询不便、效率低,很难维护和更新等。
然而,本系统针对以上缺点能够极大地提高学生信息管理的效率,也是科学化、正规化的管理,与世界接轨的重要条件。
所以如何自动高效地管理信息是这些年来许多人所研究的。
1.2编写目的
数据库课程设计作业,为提高学生的实际应用能力
1.3软件定义
学生管理系统:
用户(老师,学生),根据自己账号密码登陆进去,可以查看学生老师信息,可以插入修改浏览学生老师信息,输出数据报表。
老师与学生拥有的权限不同。
1.4开发环境
(1)操作系统:
Windows7
(2)数据库软件:
SQLServer2005
(3)Java开发工具:
jdk,Eclipse
(4)系统界面可采用WinForm
第二章需求分析
2.1信息要求
在数据库中建立五个表,学生信息表,教师信息表,课程信息表,选课信息表,院系信息表,通过winform界面可以访问数据库实现查询,插入,删除,修改,浏览等功能。
2.2处理要求
用户选择身份输入账号密码登陆,在登陆界面可以修改密码,登陆进去之后可以根据不同权限查询修改删除插入浏览信息,输出数据报表
图2-1总设计图
2.3安全与完整性要求
SQl数据库实现了用户注册登记信息的存储,和资料维护,更新等使得数据的管理更加便利,高效,java。
swing则为用户提供图形界面,简化了操作,提高了易用性。
用户根据不同身份和密码进入系统,并根据不同权限进行操作,保证系统的安全系。
第三章概念结构设计
3.1基本E-R图
图2.2E-R图
3.2逻辑结构设计
表1-1学生信息表
表1-2教师信息表
表1-3学生选课表
表1-4课程信息表
表1-5院系信息表
图2.3数据库关系图
第四章主要模块的设计
4.1系统模块的设计
1.登陆界面
图2.4登陆界面
2.点击系统说明弹出信息框
图2.5系统说明界面
3.修改密码
图2.6修改密码界面
4.学生登录后进入主界面:
学生的权限与老师不同,学生可以查询来浏览所有信息,但只能插入,修改,删除自己的选课信信息,而不能修改删除其他人的信息
图2.7学生登陆界面
5.教师登录时的界面:
教师拥有的权限比较多。
可以查询删除,修改浏览学生教师课程等信息
图2.8教师登陆界面
6.查询界面
输入查询编号即弹出查询结果。
图2.9查询课程界面
7.添加信息
图2.10查询课程界面
8.添加教师界面
图2.11添加教师界面
9.删除学生
图2.12删除学生界面
10.修改选课:
修改信息模块先输入要修改的编号,点击确定弹出信息后,输入你修改的信息,
点击修改,若修改成功即弹出修改成功对话框。
图2.13修改选课界面
11.浏览信息模块:
图2.14浏览信息界面
12.数据报表
与浏览信息不同的是它还可以打印出数据报表,点击打印报表按钮,弹出打印界面,点击确定,即可输出报表。
图2.15数据报表界面
图2.16打印界面
代码太多后面有些就省略了
importjava.awt.event.*;
//登陆界面
importjava.sql.*;
importjavax.swing.tree.*;
importjavax.swing.*;
importjava.awt.*;
publicclassCHENextendsJFrameimplementsActionListener{
JFramechen=newJFrame("
登陆"
);
JTextFieldt2=newJTextField(null,15);
JTextFieldt4=newJPasswordField(null,15);
publicStringid=null;
JRadioButtonb=newJRadioButton("
教师"
JRadioButtonb1=newJRadioButton("
学生"
JButtondenglu=newJButton("
登录"
JButtonxiugaimima=newJButton("
修改密码"
JButtonshuoming=newJButton("
系统说明"
CHEN(){
chen.setSize(530,450);
chen.setVisible(true);
chen.setLocation(200,300);
chen.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
JLabelt0=newJLabel("
欢迎登陆学生管理系统"
Fontfont=newFont("
幼圆"
Font.BOLD+Font.ITALIC,40);
t0.setFont(font);
JLabelt1=newJLabel("
账号:
"
JLabelt3=newJLabel("
密码:
denglu.setContentAreaFilled(false);
xiugaimima.setContentAreaFilled(false);
shuoming.setContentAreaFilled(false);
Containern=chen.getContentPane();
n.setLayout(null);
t0.setBounds(30,50,450,35);
t1.setBounds(110,125,75,35);
t2.setBounds(150,125,150,35);
t3.setBounds(110,180,75,35);
t4.setBounds(150,180,150,35);
denglu.setBounds(120,245,70,30);
xiugaimima.setBounds(200,245,150,30);
shuoming.setBounds(120,300,150,30);
xiugaimima.setContentAreaFilled(false);
shuoming.setContentAreaFilled(false);
n.add(t0);
n.add(t1);
n.add(t2);
n.add(t3);
n.add(t4);
n.add(denglu);
n.add(shuoming);
n.add(xiugaimima);
b.setBounds(190,85,70,30);
b1.setBounds(130,85,70,30);
ButtonGrouprg=newButtonGroup();
b.setSelected(false);
b1.setSelected(true);
b1.setSelected(false);
n.add(b);
rg.add(b);
n.add(b1);
rg.add(b1);
b.setContentAreaFilled(false);
b1.setContentAreaFilled(false);
denglu.addActionListener(this);
xiugaimima.addActionListener(this);
shuoming.addActionListener(this);
}
publicvoidactionPerformed(ActionEvente){
if(e.getSource()==denglu){
if(b.isSelected()){
id=t2.getText();
Stringmima=t4.getText();
try{Class.forName("
com.microsoft.sqlserver.jdbc.SQLServerDriver"
DriverManager.registerDriver(newcom.microsoft.sqlserver.jdbc.SQLServerDriver());
Connectionconn=DriverManager.getConnection("
jdbc:
sqlserver:
//localhost:
+
"
1433;
databasename=学生选课管理信息表"
"
sa"
613838"
Statements=conn.createStatement(
ResultSet.TYPE_SCROLL_SENSITIVE,
ResultSet.CONCUR_UPDATABLE);
ResultSetr=s.executeQuery("
select*fromteacher"
"
wheretno='
+id+"
'
andtID='
+mima+"
r.last();
if(r.getRow()==1)
{chen.setVisible(false);
r.beforeFirst();
while(r.next())
newguanlistu("
教师进入主界面"
}
else{JOptionPane.showMessageDialog(null,"
教工号或密码有误!
请重新输入!
);
}
catch(Exceptione1)
{e1.printStackTrace();
}}
elseif(b1.isSelected()){
id=t2.getText();
Stringsmima=t4.getText();
try{Class.forName("
Statements=conn.createStatement(
ResultSet.TYPE_SCROLL_SENSITIVE,
ResultSet.CONCUR_UPDATABLE);
ResultSetr=s.executeQuery("
select*fromstudent"
"
wheresno='
andsID='
+smima+"
r.last();
if(r.getRow()==1)
{chen.setVisible(false);
r.beforeFirst();
while(r.next())
newguanlistuu("
进入学生主界面"
else{JOptionPane.showMessageDialog(null,"
学号号或密码有误!
}
catch(Exceptione1)
{e1.printStackTrace();
elseif(e.getSource()==xiugaimima){
newxiugaimima("
elseif(e.getSource()==shuoming){
JOptionPane.showMessageDialog(null,"
用户根据不同身份登录有不同的权限,本系统有查询,"
"
修改,插入,浏览信息,输出数据报表5大功能模块"
//}
publicstaticvoidmain(Stringargs[]){
CHENcyl=newCHEN();
classguanlistuextendsJFrameimplementsActionListener{
//教师进入时的界面
privateJMenuBarmenuBar;
privateJMenuchaxunMenu,charuMenu,shanchuMenu,xiugaiMenu,
liulanMenu,baobiaoMenu,chongdengMenu;
privateJMenuItemcstuItem,charustuItem,cteItem,charutItem,ckcItem,
charukcItem,cyxItem,charuyxItem,cxkItem,charuxkItem,
shanchustuItem,shanchutItem,shanchukcItem,shanchuxkItem,shanchuyxItem,
xiugaistuItem,xiugaitItem,xiugaikcItem,xiugaixkItem,xiugaiyxItem,
liulanstuItem,liulantItem,liulankcItem,liulanxkItem,liulanyxItem,
stuItem,tItem,kcItem,xkItem,yxItem,chongdengItem;
guanlistu(Strings){
super(s);
setSize(400,400);
this.setLocationRelativeTo(null);
menuBar=newJMenuBar();
chaxunMenu=newJMenu("
信息查询"
cstuItem=newJMenuItem("
查询学生个人信息"
cstuItem.addActionListener(this);
cteItem=newJMenuItem("
查询教师个人信息"
cteItem.addActionListener(this);
ckcItem=newJMenuItem("
查询课程信息"
ckcItem.addActionListener(this);
cyxItem=newJMenuItem("
查询院系信息"
cyxItem.addActionListener(this);
cxkItem=newJMenuItem("
查询选课信息"
cxkItem.addActionListener(this);
charuMenu=newJMenu("
信息插入"
charustuItem=newJMenuItem("
插入学生"
charustuItem.addActionListener(this);
charutItem=newJMenuItem("
插入教师"
charutItem.addActionListener(this);
charukcItem=newJMenuItem("
插入课程"
charukcItem.addActionListener(this);
charuyxItem=newJMenuItem("
插入院系"
charuyxItem.addActionListener(this);
charuxkItem=newJMenuItem("
插入选课"
charuxkItem.addActionListener(this);
shanchuMenu=newJMenu("
信息删除"
shanchustuItem=newJMenuItem("
删除学生"
shanchustuItem.addActionListener(this);
shanchutItem=newJMenuItem("
删除教师"
shanchutItem.addActionListener(this);
shanchukcItem=newJMenuItem("
删除课程"
shanchukcItem.addActionListener(this);
shanchuyxItem=newJMenuItem("
删除院系"
shanchuyxItem.addActionListener(this);
shanchuxkItem=newJMenuItem("
删除选课"
shanchuxkItem.addActionListener(this);
xiugaiMenu=newJMenu("
信息修改"
xiugaistuItem=newJMenuItem("
修改学生个人信息"
xiugaistuItem.addActionListener(this);
xiugaitItem=newJMenuItem("
修改教师个人信息"
xiugaitItem.addActionListener(this);
xiugaikcItem=newJMenuItem("
修改课程信息"
xiugaikcItem.addActionListener(this);
xiugaiyxItem=newJMenuItem("
修改院系信息"
xiugaiyxItem.addActionListener(this);
xiugaixkItem=newJMenuItem("
修改选课信息"
xiugaixkItem.addActionListener(this);
liulanMenu=newJMenu("
信息浏览"
liulanstuItem=newJMenuItem("
浏览学生信息"
liulanstuItem.addActionListener(this);
liulantItem=newJMenuItem("
浏览教师信息"
liulantItem.addActionListener(this);
liulankcItem=newJMenuItem("
浏览课程信息"
liulankcItem.addActionListener(this);
liulanyxItem=newJMenuItem("
浏览院系信息"
liulanyxItem.addActionListener(this);
liulanxkItem=newJMenuItem("
浏览选课信息"
liulanxkItem.addActionListener(this);
baobiaoMenu=newJMenu("
数据报表"
stuItem=newJMenuItem("
学生信息报表"
stuItem.addActionListener(this);
tItem=newJMenuItem("
教师信息报表"
tItem.addActionListener(this);
kcItem=newJMenuItem("
课程信息报表"
kcItem.addActionListener(this);
yxItem=newJMenuItem("
院系信息报表"
yxItem.addActionListener(this);
xkItem=newJMenuItem("
选课信息报表"
xkItem.addActionListener(this);
chongdengMenu=newJMenu("
重新登录"
chongdengItem=newJMenuItem("
chongdengItem.addActionListener(this);
setJMenuBar(menuBar);
menuBar.add(chaxunMenu);
chaxunMenu.add(cstuItem);
chaxunMenu.add(cteItem);
chaxunMenu.add(ckcItem);
chaxunMenu.add(cyxItem);
chaxunMenu.add(cxkItem);
menuBar.add(charuMenu);
charuMenu.add(charustuItem);
charuMenu.add(charutItem);
charuMenu.add(charukcItem);
charuMenu.add(charuyxItem);
charuMenu.add(charuxkItem);
menuBar.add(shanchuMenu);
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 学生 信息管理 系统 JAVA SQL
![提示](https://static.bdocx.com/images/bang_tan.gif)