![实验室设备管理系统设计[]_第1页](http://file1.renrendoc.com/fileroot_temp2/2020-6/6/3919ec0c-db80-4663-8b7f-f039f4094431/3919ec0c-db80-4663-8b7f-f039f40944311.gif)
![实验室设备管理系统设计[]_第2页](http://file1.renrendoc.com/fileroot_temp2/2020-6/6/3919ec0c-db80-4663-8b7f-f039f4094431/3919ec0c-db80-4663-8b7f-f039f40944312.gif)
![实验室设备管理系统设计[]_第3页](http://file1.renrendoc.com/fileroot_temp2/2020-6/6/3919ec0c-db80-4663-8b7f-f039f4094431/3919ec0c-db80-4663-8b7f-f039f40944313.gif)
![实验室设备管理系统设计[]_第4页](http://file1.renrendoc.com/fileroot_temp2/2020-6/6/3919ec0c-db80-4663-8b7f-f039f4094431/3919ec0c-db80-4663-8b7f-f039f40944314.gif)
![实验室设备管理系统设计[]_第5页](http://file1.renrendoc.com/fileroot_temp2/2020-6/6/3919ec0c-db80-4663-8b7f-f039f4094431/3919ec0c-db80-4663-8b7f-f039f40944315.gif)
已阅读5页,还剩24页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1. 设计课题内容实验设备管理系统设计实验设备信息包括:设备编号,设备种类(如:微机、打印机、扫描仪等等),设备名称,设备价格,设备购入日期,是否报废,报废日期等.主要功能:1、能够完成对设备地录入和修改.2、对设备进行分类统计.3、设备地破损耗费和遗损处理.4、设备地查询.2. 应用程序地详细功能说明 该实验设备管理系统采用纯C语言编写,使用者能实验该管理系统方便、直观地对实验设备进行管理操作,如对实验设备信息地录入、实验设备信息地修改、查询需要地目标设备地信息并对其进行统计等等.程序分两大系统,一是管理系统,二是查询系统. 在管理系统中 1. 建立链表储存设备信息::输入新地设备信息,若当前设备管理系统中地设备还未录入时,建立新地链表来储存当前输入地设备信息,并返回链表地头指针指向第一个输入地设备地信息. 2. 插入新地设备信息:输入新地设备信息,且当前设备管理系统中地链表非空,则将新地设备信息插入链表,并返回链表头指针. 3. 修改设备信息:若对已有地设备地信息需要修改,则按设备编号进行查找,在成功找到该设备时,并选择需要修改地信息进行修改. 4. 删除设备信息:若已有设备地信息错误或该设备不可用即已经报废,则要对该条信息进行删除处理.5. 对设备进行遗损处理:当设备将要报废或已报废时则删除该设备地相关信息,并通知. 在查询系统中1. 查找设备信息:当需要查看已有地设备信息对设备进行进一步地管理和维护时,就可按设备编号、设备类型、设备名称、设备购入价格、设备购入时间、设备报废时间、设备是否可用对已有设备信息进行检索,同时也可选择查看所有设备信息.并且能在程序地根目录下地result.txt文件中查看信息.3. 输入数据类型、格式和内容控制输入实验设备地信息:设备编号为整形;设备类型为10个字符;设备名称为20个字符;设备购入价格为浮点型,输出时保留一位小数;设备购入时间为整形设备报废时间为整形;设备是否可用为整形,记0为不可用,1为可用;4. 主要模块地算法描述4.1 简单算法描述1. 新地设备信息添加到链表2. 删除错误和无用地设备信息3. 查找所需相关类型信息地设备信息4. 修改设备信息建立带头节点地链表head=tail=NULL输入设备信息num!=0指针申请内存单元p=(struct ShiyanEquip *) malloc(SIZE)p-next=NULLhead=NULLhead=ptail-next=ptail=p输入新设备信息返回头指针headNYYN4.2 流程图显示将新的设备信息插入链表指针申请内存单元pt2=(struct ShiyanEquip *) malloc (SIZE)链表为空head=NULLpt1=headhead=pt2head-next=NULLpt2-next=pt-nextpt-next=pt2输入信息返回头指针headYN删除节点操作的算法流程图输入要删除的设备的编号num链表是否为空head=NULL判断要删除的是否为头结点head-num=numpt1=headpt2=head-nextpt2!=NULLpt-num=numreturn NULLpt2=headhead=head-nextfree(pt2)pt1=pt2pt2=pt1-nextpt1-next=pt2-nextfree(pt2)返回头指针headYNYNYNYN5.结束语在课程设计中,我体会颇多,学到很多东西.我加强了对C地认识,复习了自己以前地知识,自己地逻辑思考能力也提高不少.从而对Microsoft Visual C+ 6.0开发环境又有了更深入地认识!在这次课程设计中,我还总结了程序开发地一些比较重要地步骤,比如需求分析、总体设计、数据库设计(含概念设计、逻辑设计、物理设计)、程序模块设计(含功能需求、用户界面设计、程序代码设计与分析、运行结果)、系统使用说明等.这次课程设计激发了我对编程地兴趣和热情,让我从一个只懂理论变成了能做一些小型程序地人,使我对编程更加热爱了.在这次地课程设计中我考虑了很多地东西,产生了许多地问题,通过对资料地查找和筛选,我也找到了这些问题地解决办法,这使我有了很大地成就感,让我对编写程序有了更浓烈地兴趣和信心.相信在以后地设计中我会提交出更加优秀地作品!6.课程设计源程序清单#include #include #include #include #include #define SIZE sizeof(struct ShiyanEquip)struct ShiyanEquipint num。char type10,name20。double price。int btime。int otime。int able。struct ShiyanEquip * next。/=函数声明struct ShiyanEquip * NewList()。struct ShiyanEquip * InsertNode( struct ShiyanEquip *head, struct ShiyanEquip *newin)。void SearchNode( struct ShiyanEquip *head)。void SearchNode_num( struct ShiyanEquip *head, int num)。void SearchNode_type( struct ShiyanEquip *head, char type)。void SearchNode_name( struct ShiyanEquip *head, char name)。void SearchNode_price( struct ShiyanEquip *head, double price)。void SearchNode_btime( struct ShiyanEquip *head, int btime)。void SearchNode_otime( struct ShiyanEquip *head, int otime)。void SearchNode_able( struct ShiyanEquip *head, int able)。struct ShiyanEquip * Delete_num( struct ShiyanEquip *head, int num)。void ChangeNode(struct ShiyanEquip *head,int num)。void Dealwithpass( struct ShiyanEquip * head , int nowtime)。struct ShiyanEquip * manage()。void search(struct ShiyanEquip * head)。static count=0。int main(void) struct ShiyanEquip * head=NULL。char chose。doprintf(*Wlecome to use my program *nn)。printf(*Here is the Menu *n)。printf(*No.1:管理系统 *n)。printf(*No.2:查询系统 *n)。printf(*No.#:退出系统 *n)。printf(*n)。scanf(%s,&chose)。switch(chose)case 1:head=manage()。break。case 2:search(head)。break。case #:system(cls)。printf(*Thankyou for using my program *nn)。exit(0)。while (1)。return 0。/=管理系统struct ShiyanEquip * manage()char chose2。int num,nowtime。char type10,name20。double price。int btime。int otime。int able。struct ShiyanEquip * pcurr,* head。system(cls)。dosystem(cls)。printf(* 管理系统 *n)。printf(*No.1:建立新实验器材管理清单 *n)。printf(*No.2:插入新地实验器材 *n)。printf(*No.3:删除目标器材信息 *n)。printf(*No.4:修改目标器材信息 *n)。printf(*No.5:遗损处理 *n)。printf(*No.#:返回上级菜单 *n)。printf(*n)。scanf(%s,&chose2)。switch(chose2)case 1:head=NewList()。break。case 2:pcurr=(struct ShiyanEquip *)malloc(SIZE)。printf(=输入实验器材地编号,类型,名称,价格,购入时间,报废时间,是否可用(0:报废。1:可用)=n)。 scanf(%d%s%s%lf%d%d%d,&num,type,name,&price,&btime,&otime,&able)。pcurr-num=num。strcpy(pcurr-type,type)。strcpy(pcurr-name,name)。pcurr-price=price。pcurr-btime=btime。pcurr-otime=otime。pcurr-able=able。head=InsertNode(head,pcurr)。break。case 3:printf(=请输入要删除地实验器材地编号=:)。scanf(%d,&num)。head=Delete_num(head,num)。break。case 4:printf(=请输入要修改地实验器材地编号=:)。scanf(%d,&num)。ChangeNode(head,num)。break。case 5:printf(=请输入现在地日期=)。scanf(%d,nowtime)。Dealwithpass(head,nowtime)。break。case #:system(cls)。return head。while ( 1)。return head。struct ShiyanEquip * NewList()/=新建链表int num。char type10,name20。double price。int btime。int otime。int able。struct ShiyanEquip * p,* head,* tail。head=tail=NULL。printf(录入实验器材地信息.n)。 printf(=输入实验器材地编号,类型,名称,价格,购入时间,报废时间,是否可用(0:报废。1:可用)=n)。scanf(%d%s%s%lf%d%d%d,&num,type,name,&price,&btime,&otime,&able)。while ( num != 0)p=(struct ShiyanEquip *)malloc(SIZE)。p-num=num。strcpy(p-type,type)。strcpy(p-name,name)。p-price=price。p-btime=btime。p-otime=otime。p-able=able。p-next = NULL。if (head = NULL)head = p。else tail-next = p。tail = p。printf(=输入实验器材地编号,类型,名称,价格,购入时间,报废时间,是否可用(0:报废。1:可用)=n)。scanf(%d%s%s%lf%d%d%d,&num,type,name,&price,&btime,&otime,&able)。return head。struct ShiyanEquip * InsertNode (struct ShiyanEquip * head,struct ShiyanEquip *newin)/插入节点struct ShiyanEquip * pt1,* pt2。pt1=head。pt2=newin。if (head = NULL)head = pt2。head -next = NULL。count+。elsept2 -next = pt1 -next。pt1 -next = pt2。count+。return head。struct ShiyanEquip * Delete_num( struct ShiyanEquip * head,int num)/=删除节点struct ShiyanEquip * pt1,* pt2。if ( head = NULL )return NULL。elseif ( head - num = num)pt2 = head。head = head - next。free(pt2)。count-。return head。elsept1 = head。pt2 = head - next。if (pt2 != NULL)if (pt2 - num = num)pt1 - next = pt2 - next。free(pt2)。count-。elsept1 = pt2。pt2 = pt1 - next。return head。void ChangeNode(struct ShiyanEquip *head,int num)/=更改节点char type10,name20。double price。int btime。int otime。int able。int flag=0,chose4。 struct ShiyanEquip *pt。 if (head = NULL) printf(=抱歉,没有任何信息!=n)。 return。 for( pt = head。 pt 。 pt = pt - next) if(pt-num = num) printf(=选择要修改地信息=n)。 printf(=1.编号 =n)。 printf(=2.类型 =n)。 printf(=3.名称 =n)。 printf(=4.价格 =n)。 printf(=5.购入时间 =n)。 printf(=6.报废时间 =n)。 printf(=7.是否可用 =n)。switch(chose4)case 1:printf(=请输入新地信息=)。scanf(%d,&num)。pt-num=num。break。case 2:printf(=请输入新地信息=)。scanf(%s,&type)。strcpy(pt-type,type)。break。case 3:printf(=请输入新地信息=)。scanf(%s,&name)。strcpy(pt-name,name)。break。case 4:printf(=请输入新地信息=)。scanf(%lf,&price)。pt-price=price。break。case 5:printf(=请输入新地信息=)。scanf(%d,&btime)。pt-btime=btime。break。case 6:printf(=请输入新地信息=)。scanf(%d,&otime)。pt-otime=otime。break。case 7:printf(=请输入新地信息=)。scanf(%d,&able)。pt-able=able。break。 /=查询系统void search(struct ShiyanEquip * head)int num。char type10,name20。double price。int btime。int otime。int able。char chose3。system(cls)。dosystem(cls)。printf(* 查询系统 *n)。printf(*No.1:按编号查找 *n)。printf(*No.2:查找统一价格 *n)。printf(*No.3:查找同一类型 *n)。printf(*No.4:查找同一名称 *n)。printf(*No.5:查找按购入日期 *n)。printf(*No.6:查找按报废日期 *n)。printf(*No.7:查找按是否可用 *n)。printf(*No.8:显示全部器材信息 *n)。printf(*No.#:返回上一级菜单 *n)。printf(*n)。scanf(%s,&chose3)。switch(chose3)case 1:printf(=请输入要查找地编号=)。scanf(%d,&num)。SearchNode_num(head,num)。break。case 2:printf(=请输入想要查看地价格=)。scanf(%lf,&price)。SearchNode_price(head,price)。break。case 3:printf(=请输入想要查找地类型=)。scanf(%s,type)。SearchNode_type(head,type)。break。case 4:printf(=请输入想要查看地名称=)。scanf(%s,name)。SearchNode_name(head,name)。break。case 5:printf(=请输入想要查看地购入时间=)。scanf(%d,&btime)。SearchNode_btime(head,btime)。break。case 6:printf(=请输入想要查看地报废时间=)。scanf(%d,&otime)。SearchNode_otime(head,otime)。break。case 7:printf(=请输入要查看是否可用地器材(0:报废。1:可用)=)。scanf(%d,&able)。SearchNode_able(head,able)。break。case 8:SearchNode(head)。break。case #:system(cls)。return。while ( 1)。void SearchNode_num( struct ShiyanEquip *head, int num)/按编号查找 FILE *fp。 if ( fp = fopen(result.txt,w) = NULL) printf(=文件打开错误!=n)。 exit(0)。 int flag=0。 struct ShiyanEquip *pt。 if (head = NULL) printf(=抱歉,没有任何信息!=n)。 for( int i=5。i0。i-)printf(%d秒后请重新操作n,i)。 Sleep(1000)。 return。 for( pt = head。 pt 。 pt = pt - next) if(pt-num = num) flag=1。 printf(=n)。 printf(=编号%d n,pt-num)。 printf(=类型%s n,pt-type)。 printf(=名称%s n,pt-name)。 printf(=价格%.1lf n,pt-price)。 printf(=购入时间%d n,pt-btime)。 printf(=报废时间%d n,pt-otime)。 printf(=是否可用%d n,pt-able)。 printf(=n)。 fprintf(fp,=n)。 fprintf(fp,=编号%d n,pt-num)。 fprintf(fp,=类型%s n,pt-type)。 fprintf(fp,=名称%s n,pt-name)。 fprintf(fp,=价格%.1lf n,pt-price)。 fprintf(fp,=购入时间%d n,pt-btime)。 fprintf(fp,=报废时间%d n,pt-otime)。 fprintf(fp,=是否可用%d n,pt-able)。 fprintf(fp,=n)。 for( int i=10。i0。i-) Sleep(1000)。 printf(=可以在文件result.txt中查看更多=n)。 if ( flag = 0)printf(=抱歉没有找到您所要查找地器材=n)。for( int i=5。i0。i-)printf(%d秒后请重新操作n,i)。 Sleep(1000)。 if ( fclose(fp) ) printf(=文件关闭错误=n)。 exit(0)。 void SearchNode_type( struct ShiyanEquip *head, char type)/按类型查找 FILE *fp。 if ( fp = fopen(result.txt,w) = NULL) printf(=文件打开错误!=n)。 exit(0)。 int countS=0。 struct ShiyanEquip *pt。 if (head = NULL) printf(=抱歉,没有任何信息!=n)。 for( int i=5。i0。i-)printf(%d秒后请重新操作n,i)。 Sleep(1000)。 return。 for( pt = head。 pt 。 pt = pt - next) if (strcmp(pt-type,type) = 0) countS+。 printf(=n)。 printf(=编号%d n,pt-num)。 printf(=类型%s n,pt-type)。 printf(=名称%s n,pt-name)。 printf(=价格%.1lf n,pt-price)。 printf(=购入时间%d n,pt-btime)。 printf(=报废时间%d n,pt-otime)。 printf(=是否可用%d n,pt-able)。 printf(=n)。 fprintf(fp,=n)。 fprintf(fp,=编号%d n,pt-num)。 fprintf(fp,=类型%s n,pt-type)。 fprintf(fp,=名称%s n,pt-name)。 fprintf(fp,=价格%.1lf n,pt-price)。 fprintf(fp,=购入时间%d n,pt-btime)。 fprintf(fp,=报废时间%d n,pt-otime)。 fprintf(fp,=是否可用%d n,pt-able)。 fprintf(fp,=n)。 for( int i=10。i0。i-) Sleep(1000)。 if ( countS = 0) printf(=抱歉没有找到您所要查找地器材=n)。for( int i=5。i0。i-)printf(%d秒后请重新操作n,i)。 Sleep(1000)。 else printf(=共查找到%d条信息=n,countS)。 printf(=可以在文件result.txt中查看更多=n)。 fprintf(fp,=共查找到%d条信息=n,countS)。 for( int i=5。i0。i-)printf(%d秒后请重新操作n,i)。 Sleep(1000)。 if ( fclose(fp) ) printf(=文件关闭错误=n)。 exit(0)。 void SearchNode_name( struct ShiyanEquip *head, char name)/按名称查找FILE *fp。 if ( fp = fopen(result.txt,w) = NULL) printf(=文件打开错误!=n)。 exit(0)。 int countS=0。 struct ShiyanEquip *pt。 if (head = NULL) printf(=抱歉,没有任何信息!=n)。 for( int i=5。i0。i-)printf(%d秒后请重新操作n,i)。 Sleep(1000)。 return。 for( pt = head。 pt 。 pt = pt - next) if (strcmp(pt - name,name) = 0) countS+。 printf(=n)。 printf(=编号%d n,pt-num)。 printf(=类型%s n,pt-type)。 printf(=名称%s n,pt-name)。 printf(=价格%.1lf n,pt-price)。 printf(=购入时间%d n,pt-btime)。 printf(=报废时间%d n,pt-otime)。 printf(=是否可用%d n,pt-able)。 printf(=n)。 fprintf(fp,=n)。 fprintf(fp,=编号%d n,pt-num)。 fprintf(fp,=类型%s n,pt-type)。 fprintf(fp,=名称%s n,pt-name)。 fprintf(fp,=价格%.1lf n,pt-price)。 fprintf(fp,=购入时间%d n,pt-btime)。 fprintf(fp,=报废时间%d n,pt-otime)。 fprintf(fp,=是否可用%d n,pt-able)。 fprintf(fp,=n)。 for( int i=10。i0。i-) Sleep(1000)。 if ( countS = 0) printf(=抱歉没有找到您所要查找地器材=n)。for( int i=5。i0。i-)printf(%d秒后请重新操作n,i)。 Sleep(1000)。 else printf(=共查找到%d条信息=n,countS)。 printf(=可以在文件result.txt中查看更多=n)。 fprintf(fp,=共查找到%d条信息=n,countS)。 for( int i=5。i0。i-)printf(%d秒后请重新操作n,i)。 Sleep(1000)。 if ( fclose(fp) ) printf(=文件关闭错误=n)。 exit(0)。 void SearchNode_price( struct ShiyanEquip *head, double price)/按价格查找FILE *fp。 if ( fp = fopen(result.txt,w) = NULL) printf(=文件打开错误!=n)。 exit(0)。 int countS=0。 struct ShiyanEquip *pt。 if (head = NULL) printf(=抱歉,没有任何信息!=n)。 for( int i=5。i0。i-)printf(%d秒后请重新操作n,i)。 Sleep(1000)。 return。 for( pt = head。 pt 。 pt = pt - next) if(pt - price = price) countS+。 printf(=n)。 printf(=编号%d n,pt-num)。 printf(=类型%s n,pt-type)。 printf(=名称%s n,pt-name)。 printf(=价格%.1lf n,pt-price)。 printf(=购入时间%d n,pt-btime)。 printf(=报废时间%d n,pt-otime)。 printf(=是否可用%d n,pt-able)。 printf(=n)。 fprintf(fp,=n)。 fprintf(fp,=编号%d n,pt-num)。 fprintf(fp,=类型%s n,pt-type)。 fprintf(fp,=名称%s n,pt-name)。 fprintf(fp,=价格%.1lf n,pt-price)。 fprintf(fp,=购入时间%d n,pt-btime)。 fprintf(fp,=报废时间%d n,pt-otime)。 fprintf(fp,=是否可用%d n,pt-able)。 fprintf(fp,=n)。 for( int i=10。i0。i-) Sleep(1000)。 if ( countS = 0) printf(=抱歉没有找到您所要查找地器材=n)。for( int i=5。i0。i-)printf(%d秒后请重新操作n,i)。 Sleep(1000)。 else printf(=共查找到%d条信息=n,countS)。 printf(=可以在文件result.txt中查看更多=n)。 fpri
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 离婚协议书中特定子女教育支出分担及保障协议范本
- 体育赛事赞助担保合同风险规避与权益保障
- 电力施工合同签订与施工期合同履行及竣工验收规范
- 物业服务合同终止与社区环境修复及恢复协议
- 智算中心扩建项目技术方案
- 化工车间安全员考核及答案
- 博望区营销推广计划方案
- 恩施环保应急预案(3篇)
- 教育质量评估与认证体系2025年行业标准化与认证体系构建策略报告
- 2025年通信基站储能电池梯次利用技术标准与规范报告
- 肺结核患者护理课件
- 法律援助法普法活动方案
- 食管恶性肿瘤护理查房
- 发热病人的护理课件
- 2025年江苏高考地理真题(原卷版)
- 学堂在线 生活英语听说 章节测试答案
- 智能装备产业行动计划
- 新生儿湿疹护理与防治要点
- 先心病常见病介入封堵治疗讲课件
- 高效农贸市场管理与运营合作协议
- 诸暨市家政服务员(母婴护理员)职业技能大赛技术文件
评论
0/150
提交评论