![仓库管理数据结构课程设计报告有代码C语言仓库管理系统_第1页](http://file3.renrendoc.com/fileroot_temp3/2022-1/11/1d8ac52d-e10f-467b-8aa3-ef453f3f15c7/1d8ac52d-e10f-467b-8aa3-ef453f3f15c71.gif)
![仓库管理数据结构课程设计报告有代码C语言仓库管理系统_第2页](http://file3.renrendoc.com/fileroot_temp3/2022-1/11/1d8ac52d-e10f-467b-8aa3-ef453f3f15c7/1d8ac52d-e10f-467b-8aa3-ef453f3f15c72.gif)
![仓库管理数据结构课程设计报告有代码C语言仓库管理系统_第3页](http://file3.renrendoc.com/fileroot_temp3/2022-1/11/1d8ac52d-e10f-467b-8aa3-ef453f3f15c7/1d8ac52d-e10f-467b-8aa3-ef453f3f15c73.gif)
![仓库管理数据结构课程设计报告有代码C语言仓库管理系统_第4页](http://file3.renrendoc.com/fileroot_temp3/2022-1/11/1d8ac52d-e10f-467b-8aa3-ef453f3f15c7/1d8ac52d-e10f-467b-8aa3-ef453f3f15c74.gif)
![仓库管理数据结构课程设计报告有代码C语言仓库管理系统_第5页](http://file3.renrendoc.com/fileroot_temp3/2022-1/11/1d8ac52d-e10f-467b-8aa3-ef453f3f15c7/1d8ac52d-e10f-467b-8aa3-ef453f3f15c75.gif)
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、1第一早系统目标(三号楷体加粗)仓库管理应用程序系统可以实现信息多次追加入录、信息显示、删除信息、修改信 息、查询信息、价格升序等基本功能,这些功能模块都用函数的形式 来实现。学生信息保存在文件中,需要时可以随时从文件中读取出来。 方便用户随时可查询。进行仓库管理。第二章 系统分析(三号楷体加粗)正文(四号楷体)明确用户的需求,如操作界面需求,系 统功能需求,数据的 具体流程等。开始运行时界面如下:你可以根据所对应的信息提示进行操作便可对其进行数据的记录 与查询第三章系统设计化表妳黄除壽脣岀岀初数插删更查升保读退1HH徵咽徴,12 3 4-3 4 5 6 7 wr0-2提示按任意键,便可返回界
2、面输入数据初始化清空记录数据删除数据插入单价升序数据更新数据查询提示“输入错误”按任意键可以继续3第四章系统实现正文(四号楷体)给出具体的实现环境(如用什么语言?在什么操作系统?)用 C 语言编程,用 cokeblock 编译器,在 windows xp 操作系统 下编译成功。给出主函数和每个算法的实现代码。#in clude#in clude#in clude#in clude #i ncludevstri ng.h #define SIZE 100typedef struct char n ame10; char fam10; int pay;int num; Store;typedef
3、struct nodeStore elem;struct node *next;In;In *head=NULL;void appendInfo();4void List();void menu(void);In*Init();void Start();void Insert();void Del();void renew();void Wsave();void Read();void SortUp();void PreFile();int main()char select;PreFile();menu();while(select=toupper(getch()!=0) system(cl
4、s); switch(select)case 1 :Start();system(pause);menu(); break;case 2:appendInfo();system(pause);menu();break;case 3:Insert();system(pause);menu(); break;case 4:Del();system(pause);menu(); break;case 5:renew();system(pause);menu();break;case 6:List();system(pause);menu(); break;case 7:5SortUp();syste
5、m(pause);menu();break;case W:Wsave();system(pause);menu();break;case R:Read();system(pause);menu();break;default:printf(Input error!n);system(pause); menu(); break;return 0;In*Init()In*L;L=(In*)malloc(sizeof(In);L-next=NULL;return L;void appendInfo()int i,j;In*p,*s;A1:printf( 请输入要存放的记录数 :);scanf(%d,
6、&j);if(jnext; while(p-next!=NULL)p=p-next;for(i=0;);scanf(%s,&s-elem.fam);scanf(%d,&s-elem.pay);scanf(%d,&s-elem.num); p-next=s;p=s;void List()In *p;if(head=NULL)printf(None of information products.n);return;elsep=head-next;printf( 名称 品牌 单价 数量 n); while(p!=NULL)printf(%st%s
7、t%dt%dn,,p-elem.fam,about7p-elem.pay,p-elem.num); p=p-next;void menu() system(cls); printf(|-printf(-|n);printf(-|n);|-|家电仓库管理请输入选项编号|n);|-printf(-|n);printf(|1- 数据初始化|n);printf(|2- 创建数据表|n);printf(|3- 数据插入|n);printf(|4- 数据删除|n);printf(|5- 数据更新|n);printf(|6- 数据查询|n);printf(|7- 单价升序|n);pri
8、ntf(|w- 数据保存|n);printf(|r- 数 据读 出|n);printf( |0- 系统退出 (exit)|n);printf(|-|n);printf( 请输入你的选择 :);void Start()char com;8printf( 你想清空所有资料吗?( Y/N ):);fflush(stdin);com=getchar();if(com=Y|com=y)printf( 已经初始化了、 n);head=NULL;return;else printf(资料仍在、n);return ;void Insert()In*pi,*p;char str10;printf( 请问要在哪个
9、学生后面插入(输入姓名) :);fflush(stdin);gets(str);pi=Init();printf( 名称 品牌 单价 数量 n);scanf(%s,&);scanf(%s,&pi-elem.fam);scanf(%d,&pi-elem.pay);scanf(%d,&pi-elem.num);if(head=NULL)printf( 前面没有数据,默认接在表头p=Init();head=p;p-next=pi;elsep=head-next;while(strcmp(,str)!=0)&p-ne
10、xt!=NULL)p=p-next;if(p-next!=NULL) pi-next=p-next; p-next=pi;else p-next=pi;void Del()In*pi,*p,*s;n);9char str10;if(head=NULL)printf( 没有商品资料。 n); return;printf( 请输入要删除产品的名称: );fflush(stdin);gets(str);p=head-next;while(strcmp(,str)!=0)&p-next!=NULL)pi=p;p=p-next;if(strcmp(,s
11、tr)=0)printf( 所删除的记录为: n);printf(%st%st%dt%dn,,p-elem.fam,p-elem.pay,p-elem.num);if(p=head-next)s=Init();head=s;s-next=p-next;elsepi-next=p-next;free(p);else printf( 找不到相应的商品资料。 n);void renew()In*pi,*p,*s;char str10;if(head=NULL)printf( 没有商品资料。 n);return;List();printf( 请输入要更新产品的名称: );fflu
12、sh(stdin);gets(str);p=head-next;10while(strcmp(,str)!=0)&p-next!=NULL) pi=p;p=p-next;if(strcmp(,str)=0)printf( 所要更新的记录为: n);printf(%st%st%dt%dn,,p-elem.fam,p-elem.pay,p-elem.num);printf( 品牌 单价 数量 n); scanf(%s,&p-elem.fam);scanf(%d,&p-elem.pay);scanf(%d,&a
13、mp;p-elem.num);printf( 更新后的记录为: n);printf(%st%st%dt%dn,,p-elem.fam,p-elem.pay,p-elem.num);else printf( 找不到相应的商品资料。 n);void Wsave()FILE*fp;In*p;if(head=NULL)printf( 你还未有资料。 );return;if(fp=fopen(store.dat,wb)=NULL) printf(Cannotopen file!n);elsefor(p=head-next;p!=NULL;p=p-next)if(fwrite(p,s
14、izeof(In),1,fp)!=1) printf(File writeerror!n);printf(ttt 保存成功。 nn);fclose(fp);void Read()In*p;FILE*fp;11if(head=NULL)printf( 你还未有资料。 );return;if(fp=fopen(store.dat,rb)=NULL) printf(CannotOpen.);return;for(p=head-next;p!=NULL;p=p-next) p=Init();fread(p,sizeof(In),1,fp);printf(%st%st%dt%dn,
15、,p-elem.fam,p-elem.pay,p-elem.num);printf(nttt 读取成功 n);fclose(fp);void SortUp()In*p1,*p2,*p3;p3=(In*)malloc(sizeof(In);if(head=NULL)printf( 没有记录,无法排序。 );return;for(p1=head-next;p1-next!=NULL;p1=p1-next)for(p2=p1-next;p2!=NULL;p2=p2-next)if(p1-elem.payp2-elem.pay) p3-elem=p1-elem;p1-elem=p2-elem; p2-
16、elem=p3-elem;printf(n 已经排序好了。 n);List();void PreFile()int Flag=0;In *he,*p,*q;FILE *fp;if(fp=fopen(store.dat,ab+)=NULL)printf(Openfileerror!n); exit(0);he=Init();12q=he;p=Init();he-next=p;for(;fread(p,sizeof(In),1,fp)!=0;p=Init()he-next=p;he=p;p-next=NULL;Flag=1; if(Flag)head二q; else head二NULL ; fcl
17、ose(fp);第五章系统测试正文(四号楷体)模拟一组数据,通过多次运行,测试系统的每一个功能,给 出测试运行结果例如:1.先输入:6 就会读出原本已保存的文件的记录。2. 按任意键后,就会弹出原有界面3. 输入:3 后按提示做插入操作4. 再按任意键后,会弹出原有界面5. 再输入:6 后界面就变为如下:136.再输入:7 后界面就变为7.再输入:2,即再在后面添加数据。8.再输入:6 后界面就变为如下:即添加到了数据后面。这也已经默认了添加时是接在原有文件的后 面。9.再输入:w 或 W 时,保存成功请按任意键继续10.关闭界面,重新运行时。输入:6 或 R 或 r 时,运行结果 为:14J i-TB-T媳:迸:銅蕊归卫丙8去刃i
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 现代科技助力白水泥行业财务风险管理
- 卫浴洁具国庆节活动方案
- 环境艺术设计与室内设计的审美互动
- 生产工艺流程中的质量控制与安全管理
- 现代服务业在商业地产中的价值挖掘
- 物流技术与管理教育的新模式
- Unit 4 Plants around us Lesson 6(说课稿)-2024-2025学年人教PEP版(2024)英语三年级上册
- 7《可爱的动物》(说课稿)2023-2024学年统编版道德与法治一年级下册
- Unit 2 Whats your name (Story time)(说课稿)-2024-2025学年译林版(三起)(2024)英语三年级上册001
- Unit 4 A glimpse of the future 说课稿-2023-2024学年高二下学期英语外研版(2019)选择性必修第三册001
- 输变电工程监督检查标准化清单-质监站检查
- 2024-2025学年北京海淀区高二(上)期末生物试卷(含答案)
- 【超星学习通】马克思主义基本原理(南开大学)尔雅章节测试网课答案
- 人教版八年级上册地理2024-2025学年八年级上册地理第一章 从世界看中国 测试卷(一)(含答案)
- 2024年中国工业涂料行业发展现状、市场前景、投资方向分析报告(智研咨询发布)
- 化工企业重大事故隐患判定标准培训考试卷(后附答案)
- 工伤赔偿授权委托书范例
- 食堂餐具炊具供货服务方案
- 员工安全健康手册
- 自然科学基础(小学教育专业)全套教学课件
- 华为客服制度
评论
0/150
提交评论