




已阅读5页,还剩12页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
长 春 大 学 课程设计纸 装 订 线 目目 录录 一 设计题目 1 二 设计目的 1 三 设计分析 1 四 功能设计 1 五 设计总结 4 参考文献 4 附录 5 长 春 大 学 课程设计纸 共 19 页 第 1 页 装 订 线 一 设计题目一 设计题目 图书销售管理系统 二 设计目的二 设计目的 1 运用已学过的知识进行一个简单的应用程序的开发 2 基本掌握设计课题的基本步骤和方法 3 掌握应用系统开发中的需求分析与数据库设计方法 4 基本掌握应用系统开发中设计文档的编制 三 设计分析三 设计分析 图书管理系统包括功能 卖出图书 1 查询图书信息 2 显示图书信息 3 删除图书信息 4 添加图书信息 5 查询图书信息功能中提供了多种查询图书的方法 包含 1 按序号查询 2 按书名查询 3 按作者查询 4 按出版社查询 5 按 ISBN 查询 四 四 功能分析功能分析 此图为图书销售管理系统的功能图 此图表示出系统的所有功能模块 包 括图书登陆功能 卖书 图书维护和顾客管理功能 其中图书维护中还包括对 图书的增删改查功能 顾客管理中也包括对顾客信息的增删改查功能 如图 1 所示 长 春 大 学 课程设计纸 共 19 页 第 2 页 装 订 线 图书销售系统 增 删 改 查 显示 全删 增删改查 显示 全删 售出 图书管理 退出 顾客管理 退货 注册登陆 图 1 功能模块图 1 图书销售管理系统主界面 图 1 1 2 售出图书 图 2 1 3 查询图书界面 图 3 1 按序号查询 1 长 春 大 学 课程设计纸 共 19 页 第 3 页 装 订 线 图 3 2 按书名查询 2 图 3 3 按作者名查询 3 图 3 4 按出版社查询 4 图 3 5 按 ISBN 查询 5 图 3 6 4 显示图书信息 长 春 大 学 课程设计纸 共 19 页 第 4 页 装 订 线 图 4 10 5 添加图书信息 图 5 1 五 五 设计总结设计总结 经过这次课程设计 我认识到一门语言的学习不应该是纸上谈 兵 要注重实践 只有在机器上多写程序 自己的水平才会不断发现 和解决问题 要多思考 遇到问题要尽量去想清其缘由 要懂得查阅 有用的资料 这次课程设计也让我学会了很多文字处理技巧 还有 就是对于类的操作更加熟练 对于函数调用更加得心应手 非常感 谢这次课程设计的机会 通过这次课程设计 加强了我对学习 java 语言的热情 现在我还是缺少练习 看程序可能看得懂 而当真 正的编写程序起来就遇到困难了 虽说学 java 并不是传说的那么难 可不下些苦工夫是学不成的 从中我学会了很多东西 java 的学习 要循序渐进 不能因为学过其它基础语言而放弃对它基础的学习 参考文献 参考文献 1 Java 语法及网络应用设计 徐迎晓编著 清华大学出版社 2 Thinking in JAVA Third Edition Bruce Eckel 机械工业出版社 3 Java 2核心技术 第6版 卷I 基础知识 Cay S Horstmann Gary Cornell 程峰 等译 机械工业出版社 4 Java2参考大全 第四版 美 Herbert Schildt著 张玉清 吴浦峰 尚勇等译 清华大学出版社 长 春 大 学 课程设计纸 共 19 页 第 5 页 装 订 线 附录 程序源代码 附录 程序源代码 java 图书销售管理系统 importimport java io java io importimport java util java util classclass BookInfoBookInfo BookInfo BookInfo numnum 1 1 bookNamebookName No No information information authorauthor No No information information presspress No No information information ISBNISBN No No information information soldsold No No BookInfo BookInfo StringString sbn sbn StringString sa sa StringString sp sp StringString sISBNsISBN intint n n Menus NUMBER Menus NUMBER numnum n n bookNamebookName sbn sbn authorauthor sa sa presspress sp sp ISBNISBN sISBN sISBN soldsold No No publicpublic voidvoid setNum setNum intint n n numnum n n publicpublic voidvoid setBookName setBookName StringString n n bookNamebookName n n publicpublic voidvoid setAuthor setAuthor StringString a a authorauthor a a publicpublic voidvoid setPress setPress StringString p p presspress p p publicpublic voidvoid setISBN setISBN StringString i i ISBNISBN i i publicpublic voidvoid setsold setsold StringString i i 长 春 大 学 课程设计纸 共 19 页 第 6 页 装 订 线 soldsold i i publicpublic intint getNum getNum returnreturn num num publicpublic StringString getBookName getBookName returnreturn bookName bookName publicpublic StringString getAuthor getAuthor returnreturn author author publicpublic StringString getPress getPress returnreturn press press publicpublic StringString getISBN getISBN returnreturn ISBN ISBN publicpublic StringString getsold getsold returnreturn sold sold publicpublic voidvoid disp disp System out println System out println getNum getNum t t getBookName getBookName t t t t getAuthor getAuthor t t t t getPress getPress t t t t getISBN getISBN t t getsold getsold privateprivate intint num num privateprivate StringString bookName bookName 书名书名 privateprivate StringString author author 作者作者 privateprivate StringString press press 出版社出版社 privateprivate StringString ISBN ISBN 每本书有唯一的每本书有唯一的 ISBNISBN 号码号码 privateprivate StringString sold sold 是否被售出是否被售出 classclass MenusMenus BookInfo BookInfo numOfInfo numOfInfo ScannerScanner s s newnew Scanner System in Scanner System in Menus Menus numOfInfonumOfInfo newnew BookInfo MAX BookInfo MAX numOfInfo NUMBER numOfInfo NUMBER newnew BookInfo Java aaa BookInfo Java aaa 计算机计算机 1782 1782 numOfInfo NUMBER numOfInfo NUMBER newnew BookInfo C bbb BookInfo C bbb 软件软件 1632 1632 长 春 大 学 课程设计纸 共 19 页 第 7 页 装 订 线 numOfInfo NUMBER numOfInfo NUMBER newnew BookInfo C ccc BookInfo C ccc 网络网络 5682 5682 for for intint i i NUMBER NUMBER i i MAX MAX System out println System out println 最多只能存储最多只能存储 MAXMAX 本图书的信息 本图书的信息 mainMenu mainMenu elseelse intint n n NUMBER NUMBER trytry System out print System out print 请输入书名 请输入书名 StringString sbnsbn s nextLine s nextLine System out println System out println System out print System out print 请输入作者 请输入作者 StringString a a s nextLine s nextLine System out println System out println System out print System out print 请输入出版社 请输入出版社 StringString p p s nextLine s nextLine System out println System out println System out print System out print 请输入请输入 ISBNISBN 号码 号码 StringString sISBNsISBN s nextLine s nextLine System out println System out println numOfInfo nnumOfInfo n 1 setNum 1 setNum n n numOfInfo nnumOfInfo n 1 setBookName 1 setBookName sbnsbn numOfInfo nnumOfInfo n 1 setAuthor 1 setAuthor a a numOfInfo nnumOfInfo n 1 setPress 1 setPress p p numOfInfo nnumOfInfo n 1 setISBN 1 setISBN sISBNsISBN catch Exceptioncatch Exception e e 异常的运用异常的运用 System out println System out println 错误错误 请重新输入请重新输入 NUMBER NUMBER addMenu addMenu while true while true 长 春 大 学 课程设计纸 共 19 页 第 9 页 装 订 线 trytry System out print System out print 是否继续输入是否继续输入 y n y n StringString sinsin s nextLine s nextLine System out println System out println if if sin equals y sin equals y sin equals Y sin equals Y addMenu addMenu elseelse mainMenu mainMenu break break catch Exceptioncatch Exception e e System out println System out println 错误错误 请重新输入请重新输入 publicpublic voidvoid searchMenu searchMenu 功能功能 2 2 查询图书信息 查询图书信息 if if NUMBERNUMBER 0 0 System out println System out println 没有任何信息没有任何信息 mainMenu mainMenu elseelse System out println n System out println n 查询图书信息 查询图书信息 System out println 1 System out println 1 按序号查询按序号查询 System out println 2 System out println 2 按书名查询按书名查询 System out println 3 System out println 3 按作者查询按作者查询 System out println 4 System out println 4 按出版社查询按出版社查询 System out println 5 System out println 5 按按 ISBNISBN 查询查询 System out println 0 System out println 0 返回上级菜单返回上级菜单 System out print System out print 请选择相应的选项 请选择相应的选项 intint choosechoose 1 1 trytry 正常输出正常输出 StringString scsc s nextLine s nextLine choosechoose Integer parseInt sc Integer parseInt sc System out println System out println catch Exceptioncatch Exception e e System out println EnterSystem out println Enter error error searchMenu searchMenu switch switch choosechoose 长 春 大 学 课程设计纸 共 19 页 第 10 页 装 订 线 casecase 1 1 searchByNum searchByNum break break casecase 2 2 searchByBookName searchByBookName break break casecase 3 3 searchByAuthor searchByAuthor break break casecase 4 4 searchByPress searchByPress break break casecase 5 5 searchByISBN searchByISBN break break casecase 0 0 mainMenu mainMenu break break default default System out println EnterSystem out println Enter error error PleasePlease enterenter a a integerinteger betweenbetween 0 0 andand 5 5 searchMenu searchMenu publicpublic voidvoid searchByNum searchByNum 1 1 按序号查询按序号查询 intint n n 1 1 trytry System out print System out print 请输入要查询的序号 请输入要查询的序号 StringString scsc s nextLine s nextLine n n Integer parseInt sc Integer parseInt sc System out println System out println catch Exceptioncatch Exception e e System out println EnterSystem out println Enter error error searchByNum searchByNum intint i i 0 0 booleanboolean existexist false false System out println System out println 序号序号 t t 书名书名 t t t t 作者作者 t t t t 出版社出版社 t t t t ISBN ISBN t t t t 是否全部售出是否全部售出 System out println System out println for for i i 0 0 i i NUMBER NUMBER i i intint sourcesource numOfInfo i getNum numOfInfo i getNum if if sourcesource n n 长 春 大 学 课程设计纸 共 19 页 第 11 页 装 订 线 numOfInfo i disp numOfInfo i disp System out println System out println existexist true true if if existexist falsefalse System out println System out println 没有这个序号的信息没有这个序号的信息 searchMenu searchMenu publicpublic voidvoid searchByBookName searchByBookName 2 2 按书名查询按书名查询 StringString sbnsbn trytry System out print System out print 请输入要查询的书名 请输入要查询的书名 sbnsbn s nextLine s nextLine System out println System out println catch Exceptioncatch Exception e e System out println Error System out println Error searchByBookName searchByBookName intint i i 0 0 booleanboolean existexist false false System out println System out println 序号序号 t t 书名书名 t t t t 作者作者 t t t t 出版社出版社 t t t t ISBN ISBN t t t t 是否全部售出是否全部售出 System out println System out println for for i i 0 0 i i NUMBER NUMBER i i StringString sourcesource numOfInfo i getBookName numOfInfo i getBookName if if source equals source equals sbnsbn numOfInfo i disp numOfInfo i disp System out println System out println existexist true true if if existexist falsefalse System out println System out println 没有这个书名的信息没有这个书名的信息 searchMenu searchMenu publicpublic voidvoid searchByAuthor searchByAuthor 3 3 按作者查询按作者查询 StringString sasa trytry System out print System out print 请输入要查询的作者 请输入要查询的作者 sasa s nextLine s nextLine System out println System out println 长 春 大 学 课程设计纸 共 19 页 第 12 页 装 订 线 catch Exceptioncatch Exception e e System out println Error System out println Error searchByAuthor searchByAuthor intint i i 0 0 booleanboolean existexist false false System out println System out println 序号序号 t t 书名书名 t t t t 作者作者 t t t t 出版社出版社 t t t t ISBN ISBN t t t t 是否全部售出是否全部售出 System out println System out println for for i i 0 0 i i NUMBER NUMBER i i StringString sourcesource numOfInfo i getAuthor numOfInfo i getAuthor if if source equals source equals sasa numOfInfo i disp numOfInfo i disp System out println System out println existexist true true if if existexist falsefalse System out println System out println 没有这个作者的信息没有这个作者的信息 searchMenu searchMenu publicpublic voidvoid searchByPress searchByPress 4 4 按出版社查询按出版社查询 StringString spsp trytry System out print System out print 请输入要查询的出版社 请输入要查询的出版社 spsp s nextLine s nextLine System out println System out println catch Exceptioncatch Exception e e System out println Error System out println Error searchByPress searchByPress intint i i 0 0 booleanboolean existexist false false System out println System out println 序号序号 t t 书名书名 t t t t 作者作者 t t t t 出版社出版社 t t t t ISBN ISBN t t t t 是否全部售出是否全部售出 System out println System out println for for i i 0 0 i i NUMBER NUMBER i i StringString sourcesource numOfInfo i getPress numOfInfo i getPress if if source equals source equals spsp numOfInfo i disp numOfInfo i disp System out println System out println 长 春 大 学 课程设计纸 共 19 页 第 13 页 装 订 线 existexist true true if if existexist falsefalse System out println System out println 没有这个出版社的信息没有这个出版社的信息 searchMenu searchMenu publicpublic voidvoid searchByISBN searchByISBN 5 5 按按 ISBNISBN 查询查询 StringString sISBNsISBN trytry System out print System out print 请输入要查询的请输入要查询的 ISBNISBN sISBNsISBN s nextLine s nextLine System out println System out println catch Exceptioncatch Exception e e System out println Error System out println Error searchByISBN searchByISBN intint i i 0 0 booleanboolean existexist false false System out println System out println 序号序号 t t 书名书名 t t t t 作者作者 t t t t 出版社出版社 t t t t ISBN ISBN t t t t 是否全部售出是否全部售出 System out println System out println for for i i 0 0 i i NUMBER NUMBER i i StringString sourcesource numOfInfo i getISBN numOfInfo i getISBN if if source equals source equals sISBNsISBN numOfInfo i disp numOfInfo i disp System out println System out println existexist true true if if existexist falsefalse System out println System out println 没有这个没有这个 ISBNISBN 的信息的信息 searchMenu searchMenu publicpublic voidvoid dispMenu dispMenu 功能功能 3 3 显示图书信息 显示图书信息 if if NUMBERNUMBER 0 0 System out println System out println 没有任何信息没有任何信息 mainMenu mainMenu elseelse System out println System out println 序号序号 t t 书名书名 t t t t 作者作者 长 春 大 学 课程设计纸 共 19 页 第 14 页 装 订 线 t t t t 出版社出版社 t t t t ISBN ISBN t t t t 是否全部售出是否全部售出 System out println System out println for for intint i i 0 0 i i NUMBER NUMBER i i numOfInfo i disp numOfInfo i disp System out println System out println mainMenu mainMenu publicpublic voidvoid deleteMenu deleteMenu 功能功能 4 4 删除图书信息 删除图书信息 if if NUMBERNUMBER 0 0 System out println System out println 没有任何信息没有任何信息 mainMenu mainMenu elseelse intint n n 1 1 trytry System out println System out println 请输入要删除的序号 请输入要删除的序号 StringString scsc s nextLine s nextLine n n Integer parseInt sc Integer parseInt sc System out println System out println catch Exceptioncatch Exception e e System out println EnterSystem out println Enter error error mainMenu mainMenu intint i i 0 0 intint existexist 1 1 要删除序号的位置要删除序号的位置 for for i i 0 0 i i NUMBER NUMBER i i if numOfInfo i getNum if numOfInfo i getNum n n existexist i i break break if existif exist 1 1 System out println System out println 不存在该序号不存在该序号 n n 返回主菜单返回主菜单 mainMenu mainMenu 把要删除信息的后面所有信息都往前移把要删除信息的后面所有信息都往前移 长 春 大 学 课程设计纸 共 19 页 第 15 页 装 订 线 for for intint j j exist exist j j NUMBERNUMBER 1 1 j j numOfInfo j setNum numOfInfo j setNum numOfInfo jnumOfInfo j 1 getNum 1 getNum 1 1 numOfInfo j setBookName numOfInfo j setBookName numOfInfo jnumOfInfo j 1 getBookName 1 getBookName numOfInfo j setAuthor numOfInfo j setAuthor numOfInfo jnumOfInfo j 1 getAuthor 1 getAuthor numOfInfo j setPress numOfInfo j setPress numOfInfo jnumOfInfo j 1 getPress 1 getPress numOfInfo j setISBN numOfInfo j setISBN numOfInfo jnumOfInfo j 1 getISBN 1 getISBN numOfInfo j setsold numOfInfo j setsold numOfInfo jnumOfInfo j 1 getsold 1 getsold 把原来最后一个有效信息重置把原来最后一个有效信息重置 numOfInfo NUMBERnumOfInfo NUMBER 1 setNum 1 setNum 1 1 numOfInfo NUMBERnumOfInfo NUMBER 1 setBookName 1 setBookName No No information information numOfInfo NUMBERnumOfInfo NUMBER 1 setAuthor 1 setAuthor No No information information numOfInfo NUMBERnumOfInfo NUMBER 1 setPress 1 setPress No No information information numOfInfo NUMBERnumOfInfo NUMBER 1 setISBN
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 商超快消品合同范本5篇
- 2025企业短期用工聘用合同
- 第一课 电脑动画制作初探说课稿-2025-2026学年初中信息技术冀教版八年级全一册-冀教版
- 第六课 珍惜婚姻关系说课稿-2025-2026学年高中政治统编版2019选择性必修2法律与生活-统编版2019
- 2025电商平台产品代理合同合同协议书范本
- 2025年共同投资合作合同范本
- 精液的稀释说课稿-2025-2026学年中职专业课-畜禽繁殖与改良-畜牧类-农林牧渔大类
- 2025南京市房屋租赁合同范本
- 5. 分组实验测透镜的焦距说课稿-2025-2026学年高中物理教科版选修2-3-教科版2004
- 施工质量监督管理的实施说课稿-2025-2026学年中职专业课-建筑施工组织与管理-建筑类-土木建筑大类
- 2025年国防教育知识竞赛试题(附答案)
- 工伤受伤经过简述如何写
- 银行现金取款申请书
- 人事外包招聘代理合同
- 数字经济学-课件 第3章 数字技术
- AI引领时尚设计新潮-个性化需求的新一代解决方案
- 高二数学直线倾斜角与斜率同步练习题
- 2024-2030年全球及中国热障涂层(TBC)行业市场现状供需分析及市场深度研究发展前景及规划可行性分析研究报告
- 大轻质泡沫混凝土研究报告
- 室内装修工程质量保障措施方案
- 闽教版小学3-6年级英语词表
评论
0/150
提交评论