收藏 分销(赏)

学生信息综合管理系统.doc

上传人:a199****6536 文档编号:2827653 上传时间:2024-06-06 格式:DOC 页数:38 大小:851.54KB
下载 相关 举报
学生信息综合管理系统.doc_第1页
第1页 / 共38页
学生信息综合管理系统.doc_第2页
第2页 / 共38页
学生信息综合管理系统.doc_第3页
第3页 / 共38页
学生信息综合管理系统.doc_第4页
第4页 / 共38页
学生信息综合管理系统.doc_第5页
第5页 / 共38页
点击查看更多>>
资源描述

1、 JAVA编程技术课程设计汇报 ( / 年 第 学期)学生姓名: 学生专业: 学生班级: 学生学号: 指导老师: 年月日目录 一、需求分析.1 1.1本系统需要实现功效.1 1.2用例.1 1.3用例图.2 二、系统总体设计.3 2.1系统模块图.3 2.2类 图.4 2.3次序图.5 2.4状态图.6三、 具体设计.7四、 实现.7 4.1主函数.7 4.2登录.8 4.3管理员界面.10 4.4学生信息管理模块.10 4.5课程信息管理模块.15 4.6选课信息管理模块.19 4.7成绩信息管理模块.23 4.8用户信息管理模块.26 五、测试.29 5.1学生信息管理系统登录.29 5.

2、2实现管理员和学生操作功效界面 .31 六、体会.36一、 需求分析 1.1本系统需要实现功效: (1)、管理员对学生信息和课程信息进行增加、删除、修改、查找等操作,对选课信息进行管理,对成绩信息和用户信息进行修改、查找等操作。 (2)、学生对学生信息和成绩信息进行查看,对个人密码信息进行修改等。 1.2 用例该管理系统用例关键有:管理员登录,学生登录,学生信息管理,课程信息管理,选课信息管理,成绩信息管理,用户信息管理,学生信息查看,成绩信息查看,个人信息查看,退出系统。 1.3 用例图图1.1 用例图二、 系统总体设计:学生信息管理系统关键包含管理员和学生两大模块。管理员模块包含:学生信息

3、管理、课程信息管理、选课信息管理、成绩信息管理、用户信息管理等。用户模块包含:学生信息查看、成绩信息查看、个人信息管理等。系统总体结构图所表示。 2.1系统模块图 图2.1 系统模块图 2.2类图图2.2 系统类图 2.3 次序图图2.3 系统次序图 2.4 状态图图2.4 状态图三、 具体设计:图3.1 学生信息增、删、改、查询、显示功效步骤图注:成绩信息管理,课程信息管理,选课信息管理及用户信息管理功效实现和学生信息管理功效实现一样。四、 实现: 4.1主函数public class SimpleStudentManager public static void main(String a

4、rgs) new DLFrame(); 4.2登录class DLFrame extends JFrame implements ActionListener, ItemListener / 登录界面JPanel p1 = null;JPanel p2 = null;JPanel p3 = null;JLabel userName = new JLabel(用户:);JTextField txtUser = new JTextField();/文本框控件JLabel password = new JLabel(密码:);JPasswordField txtPwd = new JPassword

5、Field(6);/密码框控件JLabel role = new JLabel(角色:);JComboBox cbrole = new JComboBox();JButton btnLogin = new JButton(登录);JButton btncz = new JButton(重置);JButton btnCancel = new JButton(取消);JLabel imageLabel;Icon image;static int OK = 1;static int CANCEL = 0;int actionCode = 0;Connection con = null;Stateme

6、nt stmt = null;ResultSet rs = null;int qxian = 0;public DLFrame() / 结构方法super(登录界面);p1 = new JPanel();p2 = new JPanel();p3 = new JPanel();cbrole.addItem(管理员);cbrole.addItem(学生);image = new ImageIcon(picturest.jpg);imageLabel = new JLabel(image);p1.add(imageLabel);this.setLayout(new FlowLayout();this

7、.setBounds(50, 50, 500, 400);this.setVisible(true);p2.setLayout(new GridLayout(4,3);p2.add(userName);p2.add(txtUser);p2.add(password);p2.add(txtPwd);p2.add(role);p2.add(cbrole);p3.add(btnLogin);p3.add(btncz);p3.add(btnCancel);this.add(p1);this.add(p2);this.add(p3);this.setResizable(false);this.setDe

8、faultCloseOperation(JFrame.EXIT_ON_CLOSE);this.show();btnLogin.addActionListener(this);cbrole.addItemListener(this);btncz.addActionListener(this);btnCancel.addActionListener(this); 4.3管理员界面class ManagerFrame extends JFrame implements ActionListener / 管理员界面JPanel p1 = new JPanel();JPanel p2 = new JPa

9、nel();JButton btns = new JButton(学生信息管理);JButton btnc = new JButton(课程信息管理);JButton btnsc = new JButton(选课信息管理);JButton btng = new JButton(成绩信息管理);JButton btnu = new JButton(用户信息管理);JButton btnClose = new JButton(退出管理系统);JLabel l = new JLabel(管理员);ManagerFrame() / 结构方法super(学生信息管理系统);setSize(350, 20

10、0);add(North, p1);add(Center, p2);p1.add(l);p2.add(btns);p2.add(btnc);p2.add(btnsc);p2.add(btng);p2.add(btnu);p2.add(btnClose);btns.addActionListener(this);btnc.addActionListener(this);btnsc.addActionListener(this);btng.addActionListener(this);btnu.addActionListener(this);btnClose.addActionListener(

11、this);this.setResizable(false);this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);show();public void actionPerformed(ActionEvent e) if (e.getActionCommand() = 学生信息管理)new StudentManage().display();if (e.getActionCommand() = 课程信息管理) new CourseManage(课程信息管理).display();if (e.getActionCommand() = 选课信息管理

12、) new SCManage(选课信息管理).display();if (e.getActionCommand() = 成绩信息管理) new GradeManage(成绩信息管理).display();if (e.getActionCommand() = 用户信息管理) new PM(用户信息管理).display();if (e.getActionCommand() = 退出管理系统) System.exit(0); 4.4学生信息管理模块学生信息管理模块包含增加、删除、修改、查询、显示全部等。class StudentManage extends JFrame implements Ac

13、tionListener / 学生信息管理JPanel p = new JPanel();JButton btnAdd = new JButton(增加);JButton btnDelete = new JButton(删除);JButton btnAlter = new JButton(修改);JButton btnSearch = new JButton(查询);JButton btnDisplay = new JButton(显示);JMenuBar mb = new JMenuBar();JPanel p1 = new JPanel();JTable sTable;JScrollPan

14、e scroll;Connection con = null;Statement stmt = null;ResultSet rs = null;Object playerInfo;SSelect sst;String mxh = null;boolean bstd = false;StudentManage() / 结构方法super(学生信息管理);add(South, p);this.add(Center, p1);mb.add(btnAdd);mb.add(btnDelete);mb.add(btnAlter);mb.add(btnSearch);mb.add(btnDisplay);

15、this.connDB(); / 连接数据库/ this.display();this.setBounds(200, 200, 400, 260);btnAdd.addActionListener(this);btnDelete.addActionListener(this);btnAlter.addActionListener(this);btnSearch.addActionListener(this);btnDisplay.addActionListener(this);this.setJMenuBar(mb);/ this.setDefaultCloseOperation(JFrame

16、.EXIT_ON_CLOSE);this.setResizable(false);show();StudentManage(SSelect sst) / 结构方法super(学生信息管理);this.sst = sst;bstd = true;add(South, p);this.add(Center, p1);mb.add(btnAdd);mb.add(btnDelete);mb.add(btnAlter);mb.add(btnSearch);mb.add(btnDisplay);this.connDB();this.setBounds(200, 200, 400, 260);btnAdd.

17、addActionListener(this);btnDelete.addActionListener(this);btnAlter.addActionListener(this);btnSearch.addActionListener(this);btnDisplay.addActionListener(this);this.setJMenuBar(mb);/ this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);this.setResizable(false);show();public void display() / 显示全部学生基础信

18、息int i = 0;int j = 0;int k = 0;List al = new ArrayList();try rs = stmt.executeQuery(select * from student);while (rs.next() / 找出表中统计数赋给ial.add(rs.getString(sno);al.add(rs.getString(sn);al.add(rs.getString(ss);al.add(rs.getInt(sa);al.add(rs.getString(sc);i+; catch (SQLException e) e.printStackTrace()

19、;playerInfo = new Objecti5;String columnNames = 学号, 姓名, 年纪, 性别, 班级 ;try rs = stmt.executeQuery(select * from student order by sno);while (rs.next() playerInfoj0 = rs.getString(sno);playerInfoj1 = rs.getString(sn);playerInfoj2 = rs.getInt(sa);playerInfoj3 = rs.getString(ss);playerInfoj4 = rs.getStrin

20、g(sc);j+; catch (SQLException e) e.printStackTrace();sTable = new JTable(playerInfo, columnNames);/ 创建网格p1.add(sTable);scroll = new JScrollPane(sTable);this.add(scroll);4.5课程信息管理模块课程信息管理模块包含增加、删除、修改、查询、显示全部等。class CourseManage extends JFrame implements ActionListener / 课程信息管理JPanel p = new JPanel();

21、JButton btnAdd = new JButton(增加);JButton btnDelete = new JButton(删除);JButton btnAlter = new JButton(修改);JButton btnSearch = new JButton(查询);JButton btnDisplay = new JButton(显示);JMenuBar mb = new JMenuBar();JPanel p1 = new JPanel();JTable sTable;JScrollPane scroll;Connection con = null;Statement stmt

22、 = null;ResultSet rs = null;Object playerInfo;CourseSelect cst;String mkch = null;boolean bstd = false;CourseManage(String title) / 结构方法super(title);add(South, p);this.add(Center, p1);mb.add(btnAdd);mb.add(btnDelete);mb.add(btnAlter);mb.add(btnSearch);mb.add(btnDisplay);this.connDB();/ 连接数据库this.set

23、Bounds(200, 200, 400, 260);btnAdd.addActionListener(this);btnDelete.addActionListener(this);btnAlter.addActionListener(this);btnSearch.addActionListener(this);btnDisplay.addActionListener(this);this.setJMenuBar(mb);/ this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);this.setResizable(false);show()

24、;CourseManage(CourseSelect cst, String title) / 结构方法super(title);this.cst = cst;bstd = true;add(South, p);this.add(Center, p1);mb.add(btnAdd);mb.add(btnDelete);mb.add(btnAlter);mb.add(btnSearch);mb.add(btnDisplay);this.connDB();this.setBounds(200, 200, 400, 260);btnAdd.addActionListener(this);btnDel

25、ete.addActionListener(this);btnAlter.addActionListener(this);btnSearch.addActionListener(this);btnDisplay.addActionListener(this);this.setJMenuBar(mb);/ this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);this.setResizable(false);show();setVisible(false);setVisible(true);public void display() / 显示全部

26、课程信息int i = 0;int j = 0;int k = 0;List al = new ArrayList();try rs = stmt.executeQuery(select * from course);while (rs.next() / 找出表中统计数赋给ial.add(rs.getString(cno);al.add(rs.getString(cn);al.add(rs.getString(pcno);i+; catch (SQLException e) e.printStackTrace();playerInfo = new Objecti5;String columnN

27、ames = 课程号, 课程名, 先行课程号 ;try rs = stmt.executeQuery(select * from course order by cno);/rs = stmt.executeQuery(select * from course where cno=);while (rs.next() playerInfoj0 = rs.getString(cno);playerInfoj1 = rs.getString(cn);playerInfoj2 = rs.getString(pcno);j+; catch (SQLException e) e.printStackTr

28、ace();sTable = new JTable(playerInfo, columnNames);/ 创建网格p1.add(sTable);scroll = new JScrollPane(sTable);this.add(scroll);4.6选课信息管理模块选课信息管理模块包含增加、删除、修改、查询、显示全部等。class SCManageFrame extends JFrame implements ActionListener / 选课信息管理界面显示JPanel p = new JPanel();JButton btnAdd = new JButton(增加);JButton b

29、tnDelete = new JButton(删除);JButton btnAlter = new JButton(修改);JButton btnSearch = new JButton(查询);JButton btnDisplay = new JButton(显示);JMenuBar mb = new JMenuBar();JPanel p1 = new JPanel();JTable sTable;JScrollPane scroll;Connection con = null;Statement stmt = null;ResultSet rs = null;Object playerI

30、nfo;SCSelect cst;String mkch = null;boolean bstd = false;SCManageFrame(String title) / 结构方法super(title);add(South, p);this.add(Center, p1);mb.add(btnAdd);mb.add(btnDelete);mb.add(btnAlter);mb.add(btnSearch);mb.add(btnDisplay);this.connDB();/ 连接数据库this.setBounds(200, 200, 400, 260);btnAdd.addActionLi

31、stener(this);btnDelete.addActionListener(this);btnAlter.addActionListener(this);btnSearch.addActionListener(this);btnDisplay.addActionListener(this);this.setJMenuBar(mb);/ this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);this.setResizable(false);show();SCManageFrame(SCSelect cst, String title) /

32、结构方法super(title);this.cst = cst;bstd = true;add(South, p);this.add(Center, p1);mb.add(btnAdd);mb.add(btnDelete);mb.add(btnAlter);mb.add(btnSearch);mb.add(btnDisplay);this.connDB();this.setBounds(200, 200, 400, 260);btnAdd.addActionListener(this);btnDelete.addActionListener(this);btnAlter.addActionLi

33、stener(this);btnSearch.addActionListener(this);btnDisplay.addActionListener(this);this.setJMenuBar(mb);/ this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);this.setResizable(false);show();setVisible(false);setVisible(true);public void display() / 显示全部课程信息int i = 0;int j = 0;int k = 0;List al = new

34、ArrayList();try rs = stmt.executeQuery(select * from class);while (rs.next() / 找出表中统计数赋给ial.add(rs.getString(classNum);al.add(rs.getString(cno);al.add(rs.getString(pcno);i+; catch (SQLException e) e.printStackTrace();playerInfo = new Objecti3;String columnNames = 班级号, 课程名, 先行课程号 ;try rs = stmt.execu

35、teQuery(select * from class order by classNum);while (rs.next() playerInfoj0 = rs.getString(classNum);playerInfoj1 = rs.getString(cno);playerInfoj2 = rs.getString(pcno);j+; catch (SQLException e) e.printStackTrace();sTable = new JTable(playerInfo, columnNames);/ 创建网格p1.add(sTable);scroll = new JScro

36、llPane(sTable);this.add(scroll);public void connDB() / 连接数据库try Class.forName(com.mysql.jdbc.Driver); catch (ClassNotFoundException e) e.printStackTrace();try con = DriverManager.getConnection(jdbc:mysql:/localhost:3306/test,root, renjie);stmt = con.createStatement(); catch (SQLException e) e.printS

37、tackTrace();4.7成绩信息管理模块成绩信息管理模块包含修改成绩、查询、显示全部等。class GradeManage extends JFrame implements ActionListener / 成绩信息管理JPanel p = new JPanel();JButton btnAlter = new JButton(修改成绩);JButton btnSearch = new JButton(查询);JButton btnDisplay = new JButton(显示);JMenuBar mb = new JMenuBar();JPanel p1 = new JPanel();JTable sTable;JScrollPane scroll;Connection con = null;Statement stmt = null;ResultSet rs = null;Object playerInfo;GradeSelectFrame gst;int ii = 0;

展开阅读全文
相似文档                                   自信AI助手自信AI助手
猜你喜欢                                   自信AI导航自信AI导航
搜索标签

当前位置:首页 > 教育专区 > 其他

移动网页_全站_页脚广告1

关于我们      便捷服务       自信AI       AI导航        获赠5币

©2010-2024 宁波自信网络信息技术有限公司  版权所有

客服电话:4008-655-100  投诉/维权电话:4009-655-100

gongan.png浙公网安备33021202000488号   

icp.png浙ICP备2021020529号-1  |  浙B2-20240490  

关注我们 :gzh.png    weibo.png    LOFTER.png 

客服