收藏 分销(赏)

语言图书标准管理系统专业课程设计方案报告.doc

上传人:精**** 文档编号:2531809 上传时间:2024-05-31 格式:DOC 页数:28 大小:156.04KB
下载 相关 举报
语言图书标准管理系统专业课程设计方案报告.doc_第1页
第1页 / 共28页
语言图书标准管理系统专业课程设计方案报告.doc_第2页
第2页 / 共28页
语言图书标准管理系统专业课程设计方案报告.doc_第3页
第3页 / 共28页
语言图书标准管理系统专业课程设计方案报告.doc_第4页
第4页 / 共28页
语言图书标准管理系统专业课程设计方案报告.doc_第5页
第5页 / 共28页
点击查看更多>>
资源描述

1、第三章 图书管理系统设计与实现3.1系统需求分析图书登记管理系统作为一种应用软件将为学校教师和学生提供一种对学校图书馆进一步理解并借阅、还书平台。依照系统界面提示信息对图书馆信息进行查询、初始化等操作系统功能需求分析描述如下: (1)系统主菜单:进入系统和退出系统 (2)功能菜单:显示可以进行操作(3)查询主菜单:依照图书编号、书名、作者进行查询,并可显示所有图书信息(4)借还书主菜单:可以进行借书和还书等操作3.2系统设计3.2.1 系统总统设计 下面从系统整体流程功能模块、系统界面及数据构造进行总体设计。 (1)总体思想 本系统重要设计思想是实现图书馆功能机管理系统信息查询、借书、还书等重

2、要功能。系统设计办法是构造化实际办法,系统用C语言进行开发顾客可以清晰理解图书馆内状况。 (2)系统模块构造图 依照需求分析成果,图书管理系统可以分为三大模块:查询图书模块、借书功能模块、还书功能模块。系统模块构造如图: 图书管理系统还书功能系统借书功能系统图书管理主菜单图书查询系统3.2.2 系统概要设计 系统主菜单。 显示系统主菜单,里面有相应功能代码,依照选取各功能代码进入不同界面。功能重要涉及:退出系统、查询图书、借书、还书。 查询图书信息 进入此菜单功能模块,输入您要查询图书编号、名字、作者等。图书查询模块流程如图:开始 提示输入图书编号、书名、作者输入对的查询 否 是 重新输入 是

3、退出系统 否3.3 测试成果系统主界面功能菜单查询系统菜单借还系统菜单3.4 源代码# include # include # include typedef struct linkchar number100;char bookname100;char author100;char publish100;char time100;float price;char status100;struct link *next;link;link *Cbook()int n=0;link *p,*q,*head;FILE *fp;fp=fopen(图书信息.txt,r+);if(fp=NULL)pri

4、ntf(没有找到文献,请检查);p=(link *)malloc(sizeof(link);if(p=NULL)printf(申请内存出错!n);fscanf(fp,%s%s%s%s%s,p-number,p-bookname,p-author,p-publish,p-time);fscanf(fp,%f,&p-price);fscanf(fp,%s,p-status);while(feof(fp)=0)n+;if(n=1)head=p;elseq=p;p=(link *)malloc(sizeof(link);if(p=NULL)printf(申请内存出错!n);fscanf(fp,%s%s

5、%s%s%s,p-number,p-bookname,p-author,p-publish,p-time);fscanf(fp,%f,&p-price);fscanf(fp,%s,p-status);q-next=p;p-next=NULL;fclose(fp);printf(信息已录入!);return head;void mainmenu()printf(n*n);printf(n* 欢迎使用图书管理系统 *n);printf(n* 1.进入系统 0.退出系统 *n);printf(n*n);printf(n 请选取);void menu1()printf(n*n);printf(n* 1

6、.进入图书查询系统 *n);printf(n* 2.进入图书借还系统 *n);printf(n* 3.保存所有图书信息 *n);printf(n* 4.返回上级菜单 *n);printf(n*n);printf(n请选取);void cxmenu()printf(n*n); printf(n* 1.显示所有图书信息 *n); printf(n* 2.按编号查询图书 *n); printf(n* 3.按书名查询图书 *n); printf(n* 4.按作者查询图书 *n); printf(n* 5.返回上级菜单 *n);printf(n*n); printf(n请选取);void jhmenu(

7、)printf(n*n);printf(n* 1.借书 *n);printf(n* 2.还书 *n);printf(n* 3.返回上级菜单 *n);printf(n*n);printf(n请选取); void print(link *head)link *p;p=head;printf(n);printf(n*n);printf(n编号tt书名tt作者tt出版社tt出版时间tt价格tt状态n);while(p!=NULL) printf(n);printf(%st%st%st%st%s,p-number,p-bookname,p-author,p-publish,p-time);printf(

8、tt%.2f,p-price);printf(tt%s,p-status);printf(n);p=p-next;void hold(link *head)link *p;FILE *fp;fp=fopen(图书信息.txt,w+);if(fp=NULL)printf(文献操作出错!);exit(1);p=head;for(;p!=NULL;p=p-next) fprintf(fp,%st%st%st%st%s,p-number,p-bookname,p-author,p-publish,p-time);fprintf(fp,tt%.2f,p-price);fprintf(fp,tt%s,p-

9、status);fprintf(fp,n);fclose(fp);printf(信息已保存。);void holdcx(link *t)link *p=NULL;FILE *fp;fp=fopen(查询.txt,a+);p=t;fprintf(fp,查询到信息为:n);fprintf(fp,n);fprintf(fp,n*n);fprintf(fp,n编号tt书名tt作者tt出版社tt出版时间tt价格tt状态n);fprintf(fp,n);fprintf(fp,%st%st%st%st%s,p-number,p-bookname,p-author,p-publish,p-time);fpri

10、ntf(fp,tt%.2f,p-price);fprintf(fp,tt%s,p-status);fprintf(fp,n);fclose(fp);printf(信息已保存!);link *findnumber(link *head)char key100;link *h,*t1=NULL;printf(请输入图书编号:);getchar();gets(key);for(h=head;h!=NULL;h=h-next) if(strcmp(key,h-number)=0) t1=h; break; return t1; link *findboookname(link *head)char k

11、ey100;link *h,*t2=NULL;printf(请输入图书书名:);getchar();gets(key);for(h=head;h!=NULL;h=h-next) if(strcmp(key,h-bookname)=0) t2=h; break; return t2;link *findauthor(link *head)char key100;link *h,*t3=NULL;printf(请输入作者姓名:);getchar();gets(key);for(h=head;h!=NULL;h=h-next) if(strcmp(key,h-author)=0) t3=h; bre

12、ak; return t3;link *sortnumber(link *head)link *p,*q,*temp; temp=(link *)malloc(sizeof(link); if(temp=NULL) printf(申请内存出错!); exit(1); for(p=head;p!=NULL;p=p-next) for(q=p-next;q!=NULL;q=q-next)if(strcmp(p-number,q-number)0) strcpy(temp-number,p-number); strcpy(temp-bookname,p-bookname); strcpy(temp-

13、author,p-author); strcpy(temp-publish,p-publish); strcpy(temp-time,p-time); temp-price=p-price; strcpy(temp-status,p-status); strcpy(p-number,q-number); strcpy(p-bookname,q-bookname); strcpy(p-author,q-author); strcpy(p-publish,q-publish); strcpy(p-time,q-time); p-price=q-price; strcpy(p-status,temp

14、-status); strcpy(q-number,temp-number); strcpy(q-bookname,temp-bookname); strcpy(q-author,temp-author); strcpy(q-publish,temp-publish); strcpy(q-time,temp-time); q-price=temp-price; strcpy(q-status,temp-status); return head; link *borrowbook(link *head)link *h,*p;char ch,ch1100=在库,ch2100=不在库;h=head;

15、printf(n*n);printf(tt欢迎使用借书系统!n);p=findboookname(h);if(p=NULL)printf(借书失败,书库中没有这本书!);else if(strcmp(p-status,ch2)=0)printf(借书失败,图书不在库!);else printf(确认借出?Y/N:);scanf(%c,&ch);getchar();if(ch=Y|ch=y) strcpy(p-status,ch2);printf(借书成功,请返回上级菜单保存信息!);if(ch=N|ch=n)printf(你没有借任何书!); return head; link *return

16、book(link *head) link *h,*p; char ch,ch1100=在库,ch2100=不在库; h=head;printf(n*n);printf(tt欢迎使用还书系统!n);p=findboookname(h);if(p=NULL)printf(还书失败,这不是本书库书!); else printf(确认还书?Y/N:); scanf(%c,&ch); getchar(); if(ch=Y|ch=y) strcpy(p-status,ch1);printf(还书成功,请返回上级菜单保存信息!); if(ch=N|ch=n) printf(你没有还书!); return

17、head; void main()int a,b,c,d;link *h,*t;L:system(cls);mainmenu();while(1) scanf(%d,&a);switch(a)case 1: B:system(cls); menu1(); while(1) scanf(%d,&b); switch(b) case 1: system(cls); cxmenu(); while(1) scanf(%d,&c); switch(c) case 1: print(h); break; case 2: t=findnumber(h); if(t=NULL) printf(没有要查询图书

18、!); if(t!=NULL) printf(查询图书为:); printf(n); printf(n*n); printf(n编号tt书名tt作者tt出版社tt出版时间tt价格tt状态n); printf(n);printf(%st%st%st%st%s,t-number,t-bookname,t-author,t-publish,t-time); printf(tt%.2f,t-price); printf(tt%s,t-status);printf(n); break; case 3: t=findboookname(h); if(t=NULL) printf(没有要查询图书!); if

19、(t!=NULL) printf(查询图书为:); printf(n);printf(n*n); printf(n编号tt书名tt作者tt出版社tt出版时间tt价格tt状态n); printf(n);printf(%st%st%st%st%s,t-number,t-bookname,t-author,t-publish,t-time); printf(tt%.2f,t-price); printf(tt%s,t-status); printf(n); break; case 4: t=findauthor(h); if(t=NULL) printf(没有要查询图书!); if(t!=NULL)

20、 printf(查询图书为:); printf(n); printf(n*n); printf(n编号tt书名tt作者tt出版社tt出版时间tt价格tt状态n); printf(n);printf(%st%st%st%st%s,t-number,t-bookname,t-author,t-publish,t-time); printf(tt%.2f,t-price); printf(tt%s,t-status);printf(n); break; case 5: goto B; break; break; case 2:system(cls);jhmenu();while(1)scanf(%d

21、,&d);switch(d)case 1:borrowbook(h);break;case 2:returnbook(h);break;case 3:goto B;break; break; case 3: hold(h); break; case 4: goto L; break; break;case 0:printf(ttt感谢使用,再会!);exit(0);第四章 心得体会通过一种多星期编译原理课程设计,在我努力下,顺利完毕该课程设计。通过该课程设计,掌握了编译程序工作基本过程及其各阶段基本任务,熟悉了编译程序总流程框图,理解了编译程序生成过程及其有关技术,对课本上知识也有了更深理解。

22、教师常说,课本上知识是机械,表面,要学会去运用,要举一反三。当前终于深刻理解了这句话。通过这次课程设计,发现课本上很深奥知识变更为简朴,同样,对实验原理也了有更深理解。懂得和理解了该理论在计算机中是如何执行, 对该理论在实践中应用有深刻理解 。通过该课程设计,把死板课本知识变得生动有趣,激发了学习积极性。可以把课堂上学知识通过自己设计程序表达出来,加深了对理论知识理解。课程设计中程序比较复杂,在调试时应当仔细,在程序调试时,注意指针,将不必要命令去除。除了课堂外,课程设计是最能学到东西,最考验人。在做课程设计这段时间,时刻都感到自己学知识有多么贫瘠。通过这次课程设计,让我对C+这门语言有了更深结识,操作能力有了提高要想是写出代码能运营,需要耐心细心,毅力以及充沛体力。只有通过多次编辑,多次编译,再多次运营,才干编写出更好程序,有时候需要多次改正才干达到所要运营成果。参照文献谭洁强 C程序设计 清华大学出版社张基温 C程序设计案例教程 清华大学出版社王宏 C#程序设计案例教程 清华大学出版社

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

客服