课程设计选题管理系统课程设计报告_第1页
课程设计选题管理系统课程设计报告_第2页
课程设计选题管理系统课程设计报告_第3页
课程设计选题管理系统课程设计报告_第4页
课程设计选题管理系统课程设计报告_第5页
已阅读5页,还剩15页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、.数据库原理及应用课程设计报告题 目: 课程设计选题管理系统 所在学院: 信息工程学院 班 级: 计科1002 学 号: 101304219 姓 名: 宋震宇 指导教师: 陈才扣 2013年1月 4 日;20目录 一、概述3二、需求分析3三、概念设计4四、逻辑设计5五、系统实现7 六、小结191、 概述 课程设计选题管理是高校必不可缺的组成部分,一直以来,学院教学管理工作人员使用传统人工的方式进行课程设计选题的管理,模式多种多样。随着大学越来越多,学生在课程设计的选择上工作量越来越大,这都将导致学生和老师浪费更多的时间在选择上面。 就目前的情况来看来各个学校在处理问题时,基本上都是靠人力,收工

2、完成。这种管理方式存在着许多缺点,如:效率低、容易出错,实时性和互动性不强等,在发挥学生特长、更有效地通过课程设计强化学生知识体系的目标不吻合,也无法实现学分制下教学管理的要求。所以在此基础上开发一个课程设计选题管理系统是十分有必要的。项目开发的课程设计选题管理系统能够满足不同特点的学生对课题的不同要求,有利于发挥学生的特点,让学生根据自己的实际爱好,按要求自由选择课题,让水平比较高的学生选择难度大一些的课题,水平较高的学生有充分发挥才能的空间,让水平不是特别高的学生选择适合自己的难度适当的题目。通过选择课题,使各类学生的知识水平、实践潜力都得到充分调动,解决问题的潜力得到充分发挥。而且能够充

3、分利用各种教育资源,建立,优化课题组织结构,调动教师与学生教和学的积极性,进一步提高学生的质量,提高办学水平,具有十分重要的作用。作为计算机应用的一部分,使用计算机对课题信息进行管理,具有人工管理所无法比拟的优点例如:操作方便,使用简单,自主性强等。这些优点能够极大地提高学校课程设计课题管理的质量,进一步提高办学水平和办学效率,有利于贯彻“以人为本”的教育原则,适应当今时代对高等教育的客观要求,培养出更多一专多能的学生。 基于网络数据库的学生课程设计选题系统是在网络环境的支持下,开展学生选题和信息查询的一种先进模式,发挥学生选择课题的自主性,提高学校课题管理效率。网络选题具有其它技术手段无可比

4、拟的优越性,因此世界各国尤其是发达国家无不对此给予高度的重视。发达国家主要从硬件和实践上建立网络选题环境,并建起信息传递式、合作学习模式等几种主要的选题模式. 本系统以windows为操作系统,运用了MySql的数据库技术,开发Java窗口,界面简洁,功能相对齐全的“课程设计选题管理系统”。 该系统只有当用户通过正确口令和身份验证才能进入该系统进行相关操作。2、 需求分析2.1 软件设计的目的及背景 “课程设计选题管理系统”是办公自动化的具体体现,在信息时代的今天,学校的教学管理已经基本上实现了自动化办公和网上管理,而各种各样的办公软件在市场上也随处可见,课程设计的课题及志愿管理也应该由一个专

5、门的软件进行管理。每学期课程设计的选题是一个很麻烦的事情,如果采用手工操作或软件设计不当,将是一件难以想象的麻烦事,他不仅回花费老师很大精力,而且会达不到预想的效果。2.2 软件设计的思想与目标 该系统的设计目的主要是方便教师、学生两种用户,所有操作都在网上完成。基于不同用户对象的应用程序是不一样的,用户对象包括学生、老师。他们访问数据,对系统实现和数据库方面的知识没有什么要求,只需简单的界面操作。下面简单介绍这两个用户对象的功能模块;学生可对有关课题进行查询,采用题号查询方式,可以方便学生了解课题的相关信息(课题内容、课题名称等)。教师浏览所有课题,也可以申请课题,同时可以查看有无学生选择自

6、己的课题。系统的安全性是不可忽略的方面,本系统的合法用户是学生以及老师。在进入系统前都要进行身份验证。我们的目标是要让该平台来代替以前教务管理人员的工作。把课题申报和选题处理都通过网络来交互实现。该平台实质上是一个基于CS结构的数据库应用系统,由数据库、数据库管理系统、应用系统和用户组成。2.3 用户简介 毕业设计选题管理系统主要针对学生及教师用户,由于现在网络技术和信息技术的飞速发展,学生填报志愿、教师申请课题如果还是单机版的管理,那工作程序将是相当烦琐的。所以,为了方便学生选题,方便教师对自己课题的查看,该系统的设计采用了基于C/S的操作平台。这样,不同的用户就可以随时随地对自己的信息进行

7、管理了2.4 数据库需求 在信息世界中,信息从客观事物出发流经数据库,通过决策机构最后又回到客观世界,信息的这一循环经历了三个领域:信息世界,数据世界,现实世界。现实世界的事物反映到人的头脑中,人的大脑对它有个认识过程,经过分析(选择、命名、分类等)进入信息世界。这些信息再进一步加工、编码,然后进入数据世界,而软件系统的开发工作需要考虑这两个方面的问题,也就是要考虑系统开发所需要的数据,以及如何对这些数据进行操作。这两个问题贯穿了整个软件系统的开发过程,这也就是数据库的设计问题,软件设计的一个核心。2.3 应用环境需求 Windows XP,SQL Server 2008三、概念设计 用户实体

8、由姓名、密码、身份组成: 用户姓名密码身份 E-R模型1 题目实体由题号、题目、内容、所选学生组成:E-R模型2题目题号题目预选学生内容学生 学生实体由姓名、学号、性别、年龄、地址、出生日期、班级、系别组成:学生姓名学号性别地址出生系别 E-R模型3年龄班级四、逻辑设计4.1 逻辑设计的任务和目标 以上的概念设计阶段是独立于任何一种数据模型的,但是逻辑设计阶段就与选用的DBMS产品发生关系了,系统逻辑设计的任务就是将概念设计阶段设计好的基本E-R图转换为选用DBMS产品所支持的数据模型相符合的逻辑结构。具体内容包括数据组织(将E-R图转换成关系模型、模型优化、数据库模式定义、用户子模式设计)、

9、数据处理(画出系统功能模块图)两大任务。4.2 将E-R图转换为关系模型 实体型转换为关系模式。实体的属性就是关系的属性,实体的码就是关系的码。对于实体间的联系则有以下不同的情况:一个m:n联系转换为一个关系模式。与该联系相连的各实体的码以及联系本身的属性均转换为关系的属性,而关系的码为各实体码的组合。一个1:n联系可以转换为一个独立的关系模式,也可以与n端对应的关系模式合并。如果转换为一个独立的关系模式,则与该联系相连的各实体的码以及联系本身的属性均转换为关系的属性,而关系的码为n端实体的码。 一个1:1联系可以转换为一个独立的关系模式,也可以与任意一端对应的关系模式合并。三个或三个以上实体

10、间的一个多元联系可以转换为一个关系模式。与该多元联系相连的各实体的码以及联系本身的属性均转换为关系的属性,而关系的码为各实体码的组合。具有相同码的关系模式可合并。4.3 数据库模式定义 数据库的模式定义包括三个方面: (1)数据的逻辑结构; (2)数据之间的联系; (3)数据有关的完整性约束、安全性要求。 表4.3.1用户信息表属性名数据类型是否允许为空说明namechar 否用户姓名passwordchar 否密码shenfenchar 否身份 表4.3.2题目信息表属性名数据类型是否允许为空说明tihaochar否题号timuchar 否题目neirongchar 否内容studentch

11、ar 否学生yuxuanstudentchar 否预选学生 表4.3.3学生信息表属性名数据类型是否允许为空说明stnamechar否姓名stcodechar 否学号stsexychar 否性别stagechar 否年龄staddresschar 否地址stbirthdaychar 否出生日期classchar 否班级majorchar 否系别五、系统实现登陆界面:loginframe() Toolkit kit = Toolkit.getDefaultToolkit();Dimension screenSize = kit.getScreenSize();int width = screen

12、Size.width;int height = screenSize.height;int x = (width - WIDTH) / 2;int y = (height - HETGHT) / 2;ImageIcon start = new ImageIcon("D:1_副本.png");loginframe = new JFrame("-选题系统-");loginframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);GridBagLayout lay = new GridBagLayout();se

13、tLayout(lay);loginframe.add(this, BorderLayout.WEST);loginframe.setSize(WIDTH, HETGHT);loginframe.setResizable(false);ok = new JButton("登录");cancel = new JButton("退出");JLabel name = new JLabel(" 用户名 ");JLabel password = new JLabel(" 密码 ");teacher=new JRadioBut

14、ton("教师",true);student=new JRadioButton("学生");ButtonGroup group=new ButtonGroup();group.add(teacher);group.add(student);JLabel headlog = new JLabel();headlog.setIcon(start);nameinput = new JTextField(15);passwordinput = new JPasswordField(15);GridBagConstraints constraints = new

15、GridBagConstraints();constraints.fill = GridBagConstraints.NONE;constraints.anchor = GridBagConstraints.CENTER;constraints.weightx = 4;constraints.weighty = 5;add(headlog, constraints, 0, 0, 4, 1);add(name, constraints, 2, 1, 1, 1);add(password, constraints, 2, 2, 1, 1);add(nameinput, constraints, 3

16、, 1, 1, 1);add(passwordinput, constraints, 3, 2, 1, 1);add(teacher, constraints, 2, 3, 1, 1);add(student, constraints, 3, 3, 1, 1);add(ok, constraints, 2, 4, 1, 1);add(cancel, constraints, 3, 4, 4, 1);loginframe.setLocation(x, y);loginframe.setVisible(true);getRootPane().setDefaultButton(ok);ok.addA

17、ctionListener(this);cancel.addActionListener(this);teacher.addActionListener(this);student.addActionListener(this);教师界面:class teachermainframe extends JPanel implements ActionListener static final int WIDTH = 1000;static final int HETGHT = 500;private JFrame usermainframe;private JMenu timu,xuanti,x

18、uesheng, help,quanxian;private JMenuItem studentadd,helpa, about, timuadd,timuchange,timudelete,timusearch,xueshengsearch,xuantiqueren,xuantisearch;public void add(Component c, GridBagConstraints constraints, int x, int y,int w, int h) constraints.gridx = x;constraints.gridy = y;constraints.gridwidt

19、h = w;constraints.gridheight = h;add(c, constraints);public teachermainframe() Toolkit kit = Toolkit.getDefaultToolkit();Dimension screenSize = kit.getScreenSize();int width = screenSize.width;int height = screenSize.height;int x = (width - WIDTH) / 2;int y = (height - HETGHT) / 2;usermainframe = ne

20、w JFrame("-选题管理系统-");usermainframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);GridBagLayout lay = new GridBagLayout();setLayout(lay);usermainframe.add(this, BorderLayout.WEST);usermainframe.setSize(1000, 500);usermainframe.setLocation(x, y);usermainframe.setResizable(false);usermainfra

21、me.setVisible(true);String path = "D:5.png"ImageIcon background = new ImageIcon(path);JLabel label = new JLabel(background);label.setBounds(0, 0, usermainframe.getWidth(),usermainframe.getHeight();JPanel imagePanel = (JPanel) usermainframe.getContentPane();imagePanel.setOpaque(false);userm

22、ainframe.getLayeredPane().add(label,new Integer(Integer.MIN_VALUE);JPanel contentPane = new JPanel() public void paint(Graphics g) Graphics2D g2 = (Graphics2D) g;g2.setFont(new Font("华文行楷", Font.BOLD, 56);g2.shear(0.0, 00.0);g2.drawString("-教师界面-", 280, 230);usermainframe.add(con

23、tentPane);JMenuBar menubar = new JMenuBar();usermainframe.setJMenuBar(menubar);timu = new JMenu("题目管理");xuesheng = new JMenu("学生管理");xuanti = new JMenu("选题管理");help = new JMenu("帮助");quanxian = new JMenu("权限");about = new JMenuItem("关于");he

24、lpa = new JMenuItem("帮助手册");timuadd = new JMenuItem("题目添加");timuchange = new JMenuItem("题目修改");timudelete = new JMenuItem("题目删除");timusearch = new JMenuItem("题目查询");xueshengsearch = new JMenuItem("学生查询");xuantiqueren=new JMenuItem("选题确

25、认");xuantisearch=new JMenuItem("选题查询");studentadd = new JMenuItem("添加用户");menubar.add(timu);menubar.add(xuesheng);menubar.add(xuanti);menubar.add(help);menubar.add(quanxian);quanxian.add(studentadd);timu.add(timuadd);timu.add(timuchange);timu.add(timudelete);timu.add(timusea

26、rch);xuesheng.add(xueshengsearch);xuanti.add(xuantiqueren);xuanti.add(xuantisearch);help.add(helpa);help.add(about);helpa.addActionListener(this);about.addActionListener(this);xueshengsearch.addActionListener(this);timuadd.addActionListener(this);timuchange.addActionListener(this);timudelete.addActi

27、onListener(this);timusearch.addActionListener(this);xuantiqueren.addActionListener(this);xuantisearch.addActionListener(this);studentadd.addActionListener(this);教师题目管理界面:public void actionPerformed(ActionEvent e) Object source = e.getSource();if (source = about) String message = " 课程设计选题管理系统 V1

28、.0 版 "JOptionPane.showMessageDialog(null, message); else if (source = helpa) String message = " 帮助功能待续. "JOptionPane.showMessageDialog(null, message);else if (source = studentadd) yonghuaddframe main=new yonghuaddframe();else if (source = xueshengsearch) String sql="select * from

29、 studentBean where class='二班'and major='计算机系'"studentinformationframe main=new studentinformationframe(sql);else if (source = timuadd|source =timuchange|source =timudelete|source =timusearch) String sql="select * from timuBean"timuinformationframe main=new timuinformat

30、ionframe(sql);else if (source = xuantiqueren) timuqurenframe main=new timuqurenframe();else if (source = xuantisearch) timusearchframe main=new timusearchframe(); 学生管理界面:权限界面:class yonghuaddframe extends JPanel implements ActionListener static final int WIDTH = 400;static final int HETGHT = 300;priv

31、ate static final long serialVersionUID = 1L;private JButton ok,chage;JFrame flatAddframe;private String inputname,inputquanxian, inputpassword;private JComboBox duty;private JTextField passwordinput,nameinput;private String oldname,password;private int num=0;static userBean ss;private String dutyinp

32、ut;public void add(Component c, GridBagConstraints constraints, int x, int y,int w, int h) constraints.gridx = x;constraints.gridy = y;constraints.gridwidth = w;constraints.gridheight = h;add(c, constraints);public yonghuaddframe() flatAddframe = new JFrame();flatAddframe.setTitle("用户添加界面"

33、);String str = "用户添加界面"flatAddframe.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);flatAddframe.setSize(WIDTH, HETGHT);flatAddframe.setVisible(true);Toolkit kit = Toolkit.getDefaultToolkit();Dimension screenSize = kit.getScreenSize();int width = screenSize.width;int height = screenSize.

34、height;int x = (width - WIDTH) / 2;int y = (height - HETGHT) / 2;flatAddframe.setLocation(x, y);flatAddframe.setResizable(false);flatAddframe.add(this, BorderLayout.CENTER);GridBagLayout lay = new GridBagLayout();setLayout(lay);JLabel name = new JLabel("用户");JLabel password = new JLabel(&q

35、uot;密码");JLabel quanxian = new JLabel("权限");JLabel title = new JLabel(str);duty = new JComboBox();duty.addItem("教师");duty.addItem("学生");nameinput = new JTextField(10);passwordinput = new JTextField(10);GridBagConstraints constarints = new GridBagConstraints();const

36、arints.fill = GridBagConstraints.NONE;constarints.weightx = 4;constarints.weighty = 6;ok = new JButton("确认添加");add(title, constarints, 0, 0, 4, 1);add(name, constarints, 0, 1, 1, 1);add(nameinput, constarints, 1, 1, 1, 1);add(password, constarints, 0, 2, 1, 1);add(passwordinput, constarint

37、s, 1, 2, 1, 1);add(quanxian, constarints, 2, 2, 1, 1);add(duty, constarints, 3, 2, 1, 1);add(ok, constarints, 3, 5, 1, 1);ok.addActionListener(this); 学生界面:public studentmainframe(final String oldname) nameee=oldname;Toolkit kit = Toolkit.getDefaultToolkit();Dimension screenSize = kit.getScreenSize()

38、;int width = screenSize.width;int height = screenSize.height;int x = (width - WIDTH) / 2;int y = (height - HETGHT) / 2;usermainframe = new JFrame("-选题管理系统-");usermainframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);GridBagLayout lay = new GridBagLayout();setLayout(lay);usermainframe.ad

39、d(this, BorderLayout.WEST);usermainframe.setSize(1000, 500);usermainframe.setLocation(x, y);usermainframe.setResizable(false);usermainframe.setVisible(true);String path = "D:5.png"ImageIcon background = new ImageIcon(path);JLabel label = new JLabel(background);label.setBounds(0, 0, usermai

40、nframe.getWidth(),usermainframe.getHeight();JPanel imagePanel = (JPanel) usermainframe.getContentPane();imagePanel.setOpaque(false);usermainframe.getLayeredPane().add(label,new Integer(Integer.MIN_VALUE);JPanel contentPane = new JPanel() public void paint(Graphics g) Graphics2D g2 = (Graphics2D) g;g

41、2.setFont(new Font("华文行楷", Font.BOLD, 56);g2.shear(0.0, 00.0);g2.drawString("-学生界面-", 280, 230);usermainframe.add(contentPane);JMenuBar menubar = new JMenuBar();usermainframe.setJMenuBar(menubar);timu = new JMenu("课题管理");help = new JMenu("帮助");about = new JMen

42、uItem("关于");helpa = new JMenuItem("帮助手册");xuanti = new JMenuItem("选择课题");menubar.add(timu);menubar.add(help);timu.add(xuanti);help.add(helpa);help.add(about);helpa.addActionListener(this);about.addActionListener(this);xuanti.addActionListener(this);学生课题管理界面:class xuanze

43、timuframe extends JPanelstatic final int WIDTH=700; static final int HETGHT=400; private static final long serialVersionUID=1L; final JComboBox tihaoinput; final JTextField timuinput; final JTextField neironginput; JFrame studentinfoframe; storesystem2 store=new storesystem2(); Connection con=store.

44、getConnection(); private GridBagConstraints constarints; public void add(Component c,GridBagConstraints constraints,int x,int y,int w,int h) constraints.gridx=x; constraints.gridy=y; constraints.gridwidth=w; constraints.gridheight=h; add(c,constraints); public xuanzetimuframe(final String oldname) S

45、tring str="课题选择界面" String sql="select * from timuBean" studentinfoframe=new JFrame(); studentinfoframe.setTitle(str); studentinfoframe.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); studentinfoframe.setSize(WIDTH,HETGHT); Toolkit kit=Toolkit.getDefaultToolkit(); Dimension scr

46、eenSize=kit.getScreenSize(); int width=screenSize.width; int height=screenSize.height; int x=(width-WIDTH)/2; int y=(height-HETGHT)/2; studentinfoframe.setLocation(x,y); studentinfoframe.setResizable(true); studentinfoframe.add(this,BorderLayout.CENTER); GridBagLayout lay=new GridBagLayout(); setLay

47、out(lay); JLabel tihao=new JLabel("题号"); JLabel timu=new JLabel("题目"); JLabel neirong=new JLabel("内容"); JLabel title=new JLabel(str); tihaoinput=new JComboBox(); timuinput=new JTextField(10); neironginput=new JTextField(50); Vector vec=store.gettimuBean(con, sql); for(i

48、nt i=0;i<vec.size();i+) timuBean one=(timuBean)vec.get(i); String nameselect=one.gettihao(); String getyuxuanstudent=one.getyuxuanstudent(); if(getyuxuanstudent=null) tihaoinput.addItem(nameselect); String namestring=(String) tihaoinput.getSelectedItem(); timuBean p=store.getobject(con, namestrin

49、g); if (p = null) String message = " 对不起,没有可选择的课题! "JOptionPane.showMessageDialog(null, message); else studentinfoframe.setVisible(true); String inputtimu=p.gettimu(); String inputneirong=p.getneirong(); timuinput.setText(inputtimu); neironginput.setText(inputneirong); JButton ok=new JButton("确认选择"); JButton bereturn=new JButton("返回"); constarints=new GridBagConstraints(); constarints.fill=GridBagConstraints.NONE; constarints.weightx=4; constarints.weighty=

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论