Java 图书馆管理系统(附全代码)_课程设计报告.pdf
![资源得分’ title=](/images/score_1.gif)
![资源得分’ title=](/images/score_1.gif)
![资源得分’ title=](/images/score_1.gif)
![资源得分’ title=](/images/score_1.gif)
![资源得分’ title=](/images/score_05.gif)
《Java 图书馆管理系统(附全代码)_课程设计报告.pdf》由会员分享,可在线阅读,更多相关《Java 图书馆管理系统(附全代码)_课程设计报告.pdf(78页珍藏版)》请在淘文阁 - 分享文档赚钱的网站上搜索。
1、数据库系统概论课程报告数据库系统概论课程报告课题名称:课题名称:小型图书管理系统小型图书管理系统课题负责人名(学号):best同组成员名单(角色):指导教师:评阅成绩:评阅成绩:评阅意见:提交报告时间:2015 年 12 月 15 日课程名称:数据库系统概论小型图书管理系统小型图书管理系统计算机科学与技术专业学生指导老师学生指导老师 摘要摘要随着计算机技术的飞速发展,利用计算机来获得和处理信息是当今信息管理的一大特点.伴随计算机硬件的快速发展,有关信息管理的软件数据库系统软件也在迅猛发展着。图书馆是高等院校的重要组成部门,是教师和学生获取知识的重要场所。由于图书馆主要从事大量的图书资料的储存和
2、流通。所以一直以来,计算机在图书馆的图书管理中得到了广泛的应用.本系统实现图书信息管理的系统化,规范化和自动化,以最大程度提高操作人员的办公效率.关键词关键词:JAVA、JDBC、SQL Server、数据库、图书馆管理一、实验题目:小型图书管理系统二、实验的目的和要求:完成一个小型图书管理系统,功能要求如下:-1-课程名称:数据库系统概论1)能够通过书籍基本信息(包括:书号、书名、出版社、出版日期、作者、内容摘要)单个或以 AND 方式组合多个条件查询书籍信息;2)对于每一种书籍,除可查看其基本信息之外还可查看其总数以及目前在馆数量3)可增添新的书籍4)可删除已有书籍(如有读者借了该书籍尚未
3、归还,则不允许删除)5)可修改书籍的基本信息6)能够通过读者基本信息(包括:证号、姓名、性别、系名、年级)单个或以 AND 方式组合多个条件查询读者信息7)对于每位读者除可查看其基本信息之外,还可查看其已借的书籍列表、数量、借还日期8)可增添新的读者9)可删除已有读者(如该读者有尚未归还的借书,则不允许删除)10)可修改读者的基本信息11)可完成借还书籍的手续12)还书时如超期,应该显示超期天数13)借书时如果有超期的书没有还,则不允许借书14)可查询有哪些读者有超期的书没有还,列出这些读者的基本信-2-课程名称:数据库系统概论息三、实验的环境:1、硬件环境:CPU:Intel(R)Core
4、i5 3230 2.60GHz RAM:8GB2、软件环境:操作系统:Windows 7 Ultimate SP1编译软件:Eclipse Luna Microsoft SQL Server 2014四、系统 ER 图添加读者删除读者删除图书修改读者修改图书编号姓名性别年级总量系名超期时间应还时间借阅时间现存量添加图书用户名密码权限拥有管理员编号书名管理管理作者出版社读者借阅图书出版时间摘要-3-课程名称:数据库系统概论五、表结构定义(使用表格说明)-4-课程名称:数据库系统概论-5-课程名称:数据库系统概论-6-课程名称:数据库系统概论六、系统功能模块1)能够通过书籍基本信息单个或组合多个条
5、件查询书籍信息;2)对于每一种书籍,除可查看其基本信息之外还可查看其总数以-7-课程名称:数据库系统概论及目前在馆数量3)可增添新的书籍4)可删除已有书籍(如有读者借了该书籍尚未归还,则不允许删除)5)可修改书籍的基本信息6)能够通过读者基本信息单个或组合多个条件查询读者信息7)对于每位读者除可查看其基本信息之外,还可查看其已借的书籍列表、数量、借还日期8)可增添新的读者9)可删除已有读者(如该读者有尚未归还的借书,则不允许删除)10)可修改读者的基本信息11)可完成借还书籍的手续12)还书时如超期,应该显示超期天数13)借书时如果有超期的书没有还,则不允许借书14)可查询有哪些读者有超期的书
6、没有还,列出这些读者的基本信息七、程序框架流程图-8-课程名称:数据库系统概论登录主界面图书管理读者管理借阅列表增加书籍编辑书籍删除书籍组合查询借阅书籍归还书籍增加读者编辑读者删除读者组合查询详细信息详细信息-9-课程名称:数据库系统概论九、程序运行结果-10-课程名称:数据库系统概论-11-课程名称:数据库系统概论-12-课程名称:数据库系统概论-13-课程名称:数据库系统概论八、核心代码AddBookAddBook。javajavaimportimport java.awt.BorderLayout;importimport java.awt。Container;importimport
7、java。awt.GridLayout;importimport java.awt.event.*;importimport java。util.ArrayList;importimport javax。swing。*;-14-课程名称:数据库系统概论publicclasspublicclass AddBookextendsextends JFrame implementsimplements ActionListener SQLOperationop=newnew SQLOperation();Containerc=getContentPane();JPanel p1=newnew JPan
8、el();JLabel bookNumber =newnew JLabel(”Book Number:”);JLabel bookName =newnew JLabel(Book Name:);JLabel bookAuthor =newnew JLabel(”Book Author:);JLabel press=newnew JLabel(”Press:);JLabel pressTime =newnew JLabel(”Press time:”);JLabel bookAbstract =newnew JLabel(Abstract:);JLabel storage=newnew JLab
9、el(Storage:”);JLabel remain=newnew JLabel(”Remain);JLabel remain1=newnew JLabel(Update with Storage”);JTextField numberField =newnewJTextField();JTextField nameField =newnewJTextField();JTextField authorField =newnewJTextField();JTextField pressField =newnewJTextField();JTextField pressTimeField =ne
10、wnewJTextField();JTextField abstractField =newnewJTextField();JTextField storageField =newnewJTextField();JButton cancel=newnew JButton(”Cancel);JButton confirm=newnew JButton(”Confirm!!);publicpublic AddBook()c.add(p1,BorderLayout.NORTHNORTH);p1。setLayout(newnew GridLayout(9,2,20,10));p1.add(bookNu
11、mber);p1。add(numberField);p1。add(bookName);p1.add(nameField);p1。add(bookAuthor);p1.add(authorField);p1。add(press);p1.add(pressField);p1.add(pressTime);p1.add(pressTimeField);p1。add(bookAbstract);p1。add(abstractField);p1.add(storage);p1。add(storageField);-15-课程名称:数据库系统概论p1.add(remain);p1.add(remain1)
12、;p1。add(cancel);p1。add(confirm);cancel.addActionListener(thisthis);confirm.addActionListener(thisthis);publicvoidpublicvoid actionPerformed(ActionEvente)/TODOTODO Auto-generated method stubifif(e。getSource()=cancel)thisthis.dispose();ifif(e.getSource()=confirm)thisthis.dispose();BookInfo book=newnew
13、 BookInfo(numberField。getText(),nameField.getText(),authorField。getText(),pressField。getText(),pressTimeField。getText(),abstractField。getText(),Integer。parseInt(storageField.getText(),Integer.parseInt(storageField。getText()));ArrayList String strArray =newnew ArrayList();strArray =op.addBookJudgemen
14、t();intintn=0;intintreplicate =0;whilewhile(n strArray =newnew ArrayList();strArray =op.addReaderJudgement();intintn=0;intintreplicate =0;-18-课程名称:数据库系统概论whilewhile(n Integer.parseInt(strArray.get(0)))n+;ifif(numberField.getText().equals(strArray。get(n))replicate+;ifif(replicate =0)ifif(!sexField。ge
15、tText()。equals(”boy”)&!sexField。getText().equals(girl)JOptionPane。showMessageDialog(nullnull,In the Sex field,you can only input boy or girl!,Warning”,JOptionPane.INFORMATION_MESSAGEINFORMATION_MESSAGE);elseelse op.saveReader(reader);JOptionPane.showMessageDialog(nullnull,Add a reader successfully!,
16、Information”,JOptionPane。INFORMATION_MESSAGEINFORMATION_MESSAGE);elseelse JOptionPane.showMessageDialog(nullnull,This reader(number)has already existed!”,Warning,JOptionPane.INFORMATION_MESSAGEINFORMATION_MESSAGE);BookDetails。javaimportimport java。awt.BorderLayout;importimport java。awt。Container;imp
17、ortimport java。awt.Dimension;importimport java。awt.GridLayout;-19-课程名称:数据库系统概论importimport java。awt.event。*;importimport java。util.ArrayList;importimport javax。swing。*;importimport javax.swing。table.DefaultTableModel;publicclasspublicclass BookDetails extendsextends JFrame implementsimplementsAction
18、ListenerSQLOperationop=newnew SQLOperation();Containerc=getContentPane();JPanel p1=newnew JPanel();JPanel p2=newnew JPanel();JPanel p3=newnew JPanel();JLabel bookNumber =newnew JLabel(Book Number:”);JLabel bookName =newnew JLabel(Book Name:);JLabel author=newnew JLabel(”Author:”);JLabel press=newnew
19、 JLabel(”Press:”);JLabel pressTime =newnew JLabel(Press time:”);JLabel bookAbstract =newnew JLabel(Abstract:);JLabel storage=newnew JLabel(Storage:);JLabel remain=newnew JLabel(”Remain:”);JLabel numberField =newnew JLabel();JLabel nameField =newnew JLabel();JLabel authorField =newnew JLabel();JLabel
20、 pressField =newnew JLabel();JLabel pressTimeField =newnew JLabel();JLabel abstractField =newnew JLabel();JLabel storageField =newnew JLabel();JLabel remainField =newnew JLabel();JButton cancel=newnew JButton(Cancel);JLabel details=newnew JLabel(Borrow and reaturn details”);Object s=”Reader number,”
21、Borrow time,”Deadline,Over time ;Object ob1=newnew Object7 4;JTable table=newnew JTable(ob1,s);JScrollPanescrollPane =newnew JScrollPane(table);publicpublic BookDetails(Stringnumber)-20-课程名称:数据库系统概论BookInfo book=newnew BookInfo(number);ob1=op.borrowListForBook(number);forfor(intinti=0;i 5;i+)Default
22、TableModelbooks=newnew DefaultTableModel(ob1,s);forfor(intintn=0;n 7;n+)forfor(intintm=0;m 4;m+)ob1nm=thisthis.ob1nm;table。setModel(books);table。invalidate();ArrayListstrArray =newnew ArrayListString();strArray =op.outputBook(book);numberField。setText(number);nameField.setText(strArray.get(1);author
23、Field。setText(strArray.get(2);pressField.setText(strArray。get(3));pressTimeField。setText(strArray。get(4);abstractField.setText(strArray。get(5);storageField。setText(strArray。get(6));remainField。setText(strArray.get(7));c。add(p1,BorderLayout。NORTHNORTH);c。add(p2,BorderLayout。CENTERCENTER);c。add(p3,Bor
24、derLayout.SOUTHSOUTH);p1。setLayout(newnew GridLayout(9,2,20,10);p1.add(bookNumber);p1.add(numberField);p1。add(bookName);p1.add(nameField);p1。add(author);p1。add(authorField);p1。add(press);p1。add(pressField);p1。add(pressTime);p1。add(pressTimeField);p1.add(bookAbstract);p1。add(abstractField);p1.add(sto
25、rage);p1.add(storageField);p1。add(remain);-21-课程名称:数据库系统概论p1.add(remainField);p1。add(details);scrollPane.setBounds(0,0,800,300);p2。add(scrollPane);p3。add(cancel);table。setPreferredScrollableViewportSize(newnew Dimension(400,100);cancel。addActionListener(thisthis);publicvoidpublicvoid actionPerformed
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- Java 图书馆管理系统附全代码_课程设计报告 图书馆 管理 系统 代码 课程设计 报告
![提示](https://www.taowenge.com/images/bang_tan.gif)
限制150内