收藏 分销(赏)

学生信息管理系统-by-###.doc

上传人:快乐****生活 文档编号:2560699 上传时间:2024-05-31 格式:DOC 页数:19 大小:837.04KB
下载 相关 举报
学生信息管理系统-by-###.doc_第1页
第1页 / 共19页
学生信息管理系统-by-###.doc_第2页
第2页 / 共19页
学生信息管理系统-by-###.doc_第3页
第3页 / 共19页
学生信息管理系统-by-###.doc_第4页
第4页 / 共19页
学生信息管理系统-by-###.doc_第5页
第5页 / 共19页
点击查看更多>>
资源描述

1、学生信息管理系统 by # 作者: 日期:2 个人收集整理 勿做商业用途学生信息管理系统开发过程中采用B/S结构,使用JSP编程、利用SQLServer2000建立数据库、采用HTML,JavaScript等编程技术。 该系统主要由学籍维护、成绩查询等功能模块组成,本文具体介绍了各功能模块所包含的小模块的功能,学籍维护模块主要是对学生的基本信息进行添加、查询、修改、删除;成绩查询模块主要是对必修课进行添加、删除、录入成绩,以及学生进行查询成绩等功能。学生信息管理系统主要是对学生的学籍,成绩的管理.学生信息管理首先就应该有学生,所以系统应该有对学生的添加和删除以及学生信息的修改;成绩管理就是学生

2、能够在网上平台上快速查询自己的分数,这个功能的实现首先应该有添加、删除基础课程的功能,学生登入界面后能够查询功能。本系统功能主要包过三大块:学籍维护(管理员添加、删除学生基本信息;学生查看、修改个人附加信息);成绩查询(管理员添加、删除成绩课表,添加学生分数以及查询单人或单课分数情况;学生查看自己所学基础课成绩). 管理员功能模块1.学生管理:该模块主要添加新学生基本信息;查看已有学生基本信息及可对其修改,删除多余或出错学生信息。2.成绩管理:可以添加学生所学的基本课程并修改;添加学生成绩;查看学生成绩(根据输入学号和课程号来查看不同的成绩情况);可以对学生成绩进行修改. 总结: Java是一

3、种面向对象编程技术,功能强大,是精心设计的语言,它具有简单性、面向对象性、平台性、安全性和健壮性等诸多特点,但由于涉及的内容较多,学习起来感觉困难得多。与传统的面向过程编程语言相比,面向对象的语言提出了很多新概念,Java中有一些抽象的很难理解的内容,如继承,多态,异常,多线程等.对于编程者来说,严谨,细致是必备的,不容得有丝毫的马虎。通过半个学期对Java的学习,使我掌握了Java的一些基础知识,并能够使用Java做一些简单的小程序。我最喜欢Java的地方就是它能够由用户自由的创建一个类或者继承某个类来创建新类,相当于对用户开放了一些源代码,还有Java应用的范围很广,这在我以后制作网页有很

4、大的帮助。 去图书馆借了一本Java书,通过一个礼拜的学习,对Java程序有一个更深的理解,然后经过老师和学生中精英们的指导,最终我编出了这一个小程序,虽然功能不怎么强大,但也是经我之手弄出来的,心里别提多高兴了。 package StudentInformation;import java.awt。event.*;import javax.swing。*;import StudentInformation。StudentInformation;public class login extends JFrame implements ActionListener private JTextFi

5、eld user_input; private JPasswordField pwd_input; private JButton button_ok,button_cancle; private JDialog dialog; private JLabel label_dialog; private StudentInformation main; public login() super(登陆”); this。setSize(150,250);/设定窗口大小 this.setResizable(false); this.setBackground(java。awt。Color.lightG

6、ray);/设定登陆界面背景色 this。setLocation(300,240); this.setDefaultCloseOperation(EXIT_ON_CLOSE); this。setLayout(new java.awt。FlowLayout()); this.add(new JLabel(用户名称”)); user_input = new JTextField(10); this。add(user_input); user_input。addActionListener(this); this。add(new JLabel(”密码”)); pwd_input = new JPas

7、swordField(10); this。add(pwd_input); pwd_input。addActionListener(this); button_ok=new JButton(确定”); this.add(button_ok); button_ok。addActionListener(this); button_cancle=new JButton(”取消); this.add(button_cancle); button_cancle。addActionListener(this); this。setVisible(true); dialog = new JDialog(this

8、,提示”,true); dialog.setSize(240,80); label_dialog = new JLabel(”,JLabel。CENTER); dialog.add(label_dialog); public void actionPerformed(ActionEvent e) if(e。getActionCommand()=”确定) String text2 = pwd_input.getText();String text = text2;if(user_input.getText()。equals(123)=true&text.equals(”123”)=true) l

9、abel_dialog.setText(”登陆成功); dialog.setLocation(this。getX()+100,this.getY()+100); dialog。setVisible(true); try main = new StudentInformation(); catch(Exception ee) elseJOptionPane。showMessageDialog(null, ”您输入的账号或密码有误”, ”错误, JOptionPane.ERROR_MESSAGE); if(e。getActionCommand()=”取消) System。exit(0); publ

10、ic static void main(String arg) new login(); /第二个文件清单:package StudentInformation;import java。awt。*;import java。awt。event。;import java。io。*;public class StudentInformation implements ActionListener Frame mainFrame; Frame inputFrame; Frame searchFrame; TextArea stuInfo; Label lb = new Label9; Label lb

11、2 = new Label2; TextField tf = new TextField9; TextField tf2 = new TextField2; Button btn = new Button3; Button btn2 = new Button2; Panel p1, p2, p3, p4; IOOperation ioo; Student stu; Student student = new Student100; public StudentInformation() /* 制定主框架 / mainFrame = new Frame(”学生信息管理”); /主体框架名称 ma

12、inFrame.addWindowListener(new WindowAdapter() public void windowClosing(WindowEvent e) System。exit(0); ; MenuItem item1 = new MenuItem(录入学生信息); MenuItem item2 = new MenuItem(”查询学生信息); MenuItem item3 = new MenuItem(修改学生信息”); MenuItem item4 = new MenuItem(”退出); MenuItem item5 = new MenuItem(”关于); item

13、1.addActionListener(this); item2。addActionListener(this); item3.addActionListener(this); item4。addActionListener(this); item5.addActionListener(this); Menu menu1 = new Menu(主菜单); menu1.add(item1); menu1.add(item2); menu1。add(item3); menu1.addSeparator(); menu1.add(item4); Menu menu2 = new Menu(帮助”);

14、 menu2。add(item5); MenuBar mb = new MenuBar(); mb。add(menu1); mb.add(menu2); mainFrame.setMenuBar(mb); stuInfo = new TextArea(); stuInfo.setFont(new Font(”serif”, Font.PLAIN, 18); mainFrame.add(stuInfo); mainFrame.setSize(400, 250); mainFrame。setLocation(200, 100); mainFrame。setVisible(true); /* *设置

15、用于记录学生信息的输入文本框 */ inputFrame = new Frame(); inputFrame.addWindowListener(new WindowAdapter() public void windowClosing(WindowEvent e) inputFrame.setVisible(false); ); p1 = new Panel(new GridLayout(9, 2); p2 = new Panel(); String lb姓名 = 学号:”, ”姓名:, 性别:, ”出生地:, ”所在班级:, 高数成绩:”, ”英语成绩:, ”JAVA成绩:”, ”C语言成

16、绩:”; String btn姓名 = 保存, ”删除”, 退出 ; for(int i=0; i9; i+) lbi = new Label(lb姓名i); tfi = new TextField(15); p1.add(lbi); p1。add(tfi); for(int i=0; i3; i+) btni = new Button(btn姓名i); btni。addActionListener(this); p2。add(btni); btn2.setActionCommand(”请输入); inputFrame。add(p1, BorderLayout.CENTER); inputFr

17、ame.add(p2, BorderLayout.SOUTH); inputFrame.pack(); inputFrame。setLocationRelativeTo(mainFrame); / * 创建用于搜索学生信息的搜索框 */ searchFrame = new Frame(查询学生信息); searchFrame.addWindowListener(new WindowAdapter() public void windowClosing(WindowEvent e) searchFrame.setVisible(false); ); p3 = new Panel(new Grid

18、Layout(2, 2); p4 = new Panel(); String lbname2 = ”学号:”, 姓名:; String btnname2 = 查询学生信息”, ” 退出 ; for(int i=0; i2; i+) lb2i = new Label(lbname2i); tf2i = new TextField(15); p3.add(lb2i); p3.add(tf2i); for(int i=0; i2; i+) btn2i = new Button(btnname2i); btn2i。addActionListener(this); p4。add(btn2i); btn2

19、1。setActionCommand(查询学生信息”); searchFrame.add(p3, BorderLayout.CENTER); searchFrame.add(p4, BorderLayout。SOUTH); searchFrame.pack(); searchFrame。setLocationRelativeTo(mainFrame); / *输入输出体 / ioo = new IOOperation(); student = ioo.getAllStudent(); public void actionPerformed(ActionEvent e) /* * 主菜单动作 /

20、 if (e.getSource() instanceof MenuItem) MenuItem mi = (MenuItem) e.getSource(); if (mi.getLabel().equals(录入学生信息”) inputFrame.setTitle(录入学生信息”); for(int i=0; i9; i+) tfi。setText(); p2.remove(btn1); btn0。setActionCommand(”请输入); inputFrame.setVisible(true); else if (mi。getLabel()。equals(查询学生信息) searchF

21、rame.setVisible(true); else if (mi。getLabel().equals(修改学生信息) inputFrame。setTitle(修改学生信息”); if(stu != null) tf0。setText(stu。get学号()); tf1.setText(stu。get姓名()); tf2.setText(stu。get性别()); tf3。setText(stu。get出生地()); tf4。setText(stu。get所在班级()); tf5.setText(stu.get高数成绩() + ”); tf6.setText(stu。get英语成绩() +

22、”); tf7.setText(stu。getJAVA成绩() + ); tf8。setText(stu.getC语言成绩() + ”); p2。remove(btn2); p2。add(btn1); p2。add(btn2); btn0.setActionCommand(修改学生信息); inputFrame.setVisible(true); else if (mi。getLabel()。equals(退出”)) System。exit(0); else if (mi。getLabel()。equals(关于) final Dialog progInfo = new Dialog(main

23、Frame, ”ProgInfo, true); progInfo.addWindowListener(new WindowAdapter() public void windowClosing(WindowEvent e) progInfo。dispose(); ); progInfo。setLayout(new FlowLayout(); Label l = new Label(学生信息管理系统 by 杨建严”); progInfo.add(l); progInfo.setSize(200, 80); progInfo.setLocationRelativeTo(mainFrame); p

24、rogInfo。setVisible(true); /* *按钮动作 / else Button btn = (Button)e.getSource(); if(btn。getLabel()。equals(”保存)) if(!tf0.getText()。equals(”) & !tf1。getText().equals(”) & !tf2。getText()。equals() & !tf3.getText()。equals(”) & !tf4。getText()。equals(”) !tf5.getText()。equals(”) & !tf6。getText()。equals(”) !tf7

25、.getText()。equals(”) & !tf8.getText().equals(”)) Student s = new Student(tf0.getText(), tf1。getText(), tf2.getText(), tf3。getText(), tf4.getText(), Integer.parseInt(tf5.getText()), Integer.parseInt(tf6。getText()), Integer.parseInt(tf7。getText(), Integer.parseInt(tf8。getText())); if(btn。getActionComm

26、and()。equals(”请输入) for(int i=0; istudent。length; i+) if(studenti = null) studenti = s; break; ioo。write(student); else for(int i=0; istudent.length; i+) if(studenti。equals(stu) studenti = s; break; ioo。write(student); inputFrame.setVisible(false); stuInfo。setText(”); else if(btn.getLabel()。equals(删除

27、) int index = 200; if(stu != null) for(int i=0; iindex & istudent.length1) studenti = studenti+1; if(i = student。length 1) studenti = null; ioo。write(student); stu = null; inputFrame.setVisible(false); stuInfo.setText(); for(int i=0; istudent。length; i+) if(studenti!=null) System。out.println(i + ” ”

28、 + studenti。get学号(); else if(btn.getLabel().equals(”查询学生信息”)) stu = null; if(!tf20.getText().equals() !tf21.getText()。equals() String condition = ; if(!tf20。getText().equals(”)) condition = tf20.getText(); else condition = tf21.getText(); for(int i=0; i 0) FileInputStream fis = new FileInputStream(file); ObjectInputStream ois = new ObjectInputStream(fis); ss = (Student) ois。readObject(); ois。close(); fis.close(); catch(Exception e) e.printStackTrace(); return ss; 图一:登陆成功图二:跳转至学生管理系统

展开阅读全文
相似文档                                   自信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 

客服