c++综合实验-儿童商品仓库管理系统报告

上传人:suns****4568 文档编号:91565824 上传时间:2019-06-29 格式:DOCX 页数:21 大小:275.57KB
返回 下载 相关 举报
c++综合实验-儿童商品仓库管理系统报告_第1页
第1页 / 共21页
c++综合实验-儿童商品仓库管理系统报告_第2页
第2页 / 共21页
c++综合实验-儿童商品仓库管理系统报告_第3页
第3页 / 共21页
c++综合实验-儿童商品仓库管理系统报告_第4页
第4页 / 共21页
c++综合实验-儿童商品仓库管理系统报告_第5页
第5页 / 共21页
点击查看更多>>
资源描述

《c++综合实验-儿童商品仓库管理系统报告》由会员分享,可在线阅读,更多相关《c++综合实验-儿童商品仓库管理系统报告(21页珍藏版)》请在金锄头文库上搜索。

1、西 南 交 通 大 学课程设计 年 级: 学 号: 姓 名: 专 业: 指 导 老 师: 二零一三年六月一.课程设计要求(简要描述课程设计的要求)实现一个简单的儿童商品仓库管理系统。系统的主要功能是登记仓库中各个儿童用品的信息情况,对部分信息进行检查和处理,并将结果保存。假设仓库中有3种不同类型的商品:食品、鞋子、玩具。对于食品,要求检查是否过期,并作相应处理;对于鞋子,要求检查是否是过季产品,如果是,就要做相应处理。二.模块划分(说明函数和类的定义)查看信息模块;添加货物模块;取出货物模块;修改信息模块; 三.源程序(程序代码,附部分注释)#include stdafx.h#include

2、time.h#include using namespace std;struct timesint year,month,day;class childgoodspublic:virtual void inputinformation()=0;virtual void add()=0;void totalnumber();public:char name20;double number;float bid;/进价;int stock;/库存;times storage_time;/入库时间;int inputnumber;class food :public childgoodspublic

3、:food()next=NULL;void inputinformation();void changeinformation(food *f);void add();void show(food *f);void showall();friend void addfood(food *f);friend void getfood(food *f);public:times shelf_life;/保质期; food *next;void food:show(food *f)int num;food *temp;cout请输入所要查看货物的编号.num;temp=f;if(temp-numbe

4、r=num)temp-showall();elsewhile(temp!=NULL)if(temp-number=num)break;temp=temp-next;temp-showall();void food:showall()cout名称 编号 进价 库存 入库时间:年 月 日 保质期:年 月 日endl;coutname number bid stock storage_time.year storage_time.month storage_time.day shelf_life.year shelf_life.month shelf_life.daynowtime)cout本食品尚

5、未过期.endl;elsecout本食品已过期,请尽快处理!endl;void food:inputinformation()cout名称:name;cout编号:number;cout进价:bid;cout入库数量:inputnumber;cout入库时间:endlstorage_time.year;coutstorage_time.month;coutstorage_time.day;cout保质期:endlshelf_life.year;coutshelf_life.month;coutshelf_life.day;stock=inputnumber;void food:changein

6、formation(food *f)int option,changenum;food *temp=*f;cout请输入要修改货品的编号:changenum;while(temp!=NULL)if(temp-number=changenum)break;temp=temp-next;if(temp=NULL)cout仓库内无此货品。endl;elsecout1.名称 2.编号 3.进价 4.库存 option;while(option4|option1)cout输入不合法,请重新输入。endl;cout1.名称 2.编号 3.进价 4.库存 option;switch(option)case

7、1:cout请输入新名称:temp-name;break;case 2:cout请输入新编号:temp-number;break;case 3:cout请输入新进价:temp-bid;break;case 4:cout请输入新库存:temp-stock;break;default:cout输入不合法,请重新输入。endl;class shoe :public childgoodspublic:void inputinformation();void changeinformation(shoe *s);void add();void show(shoe *s);void showall();v

8、oid showone();friend void addshoe(shoe *s);friend void getshoe(shoe *s);public:char season20;shoe *now;shoe *next;void shoe:inputinformation()cout名称:name;cout编号:number;cout进价:bid;cout适合季节:season;cout入库数量:inputnumber;cout入库时间:endlstorage_time.year;coutstorage_time.month;cout日:;void shoe:changeinforma

9、tion(shoe *s)int option,changenum;shoe *temp=*s;cout请输入要修改货品的编号:changenum;while(temp!=NULL)if(temp-number=changenum)break;temp=temp-next;if(temp=NULL)cout仓库内无此货品。endl;elsecout1.名称 2.编号 3.进价 4.库存 option;while(option4|option1)cout输入不合法,请重新输入。endl;cout1.名称 2.编号 3.进价 4.库存 option;switch(option)case 1:cou

10、t请输入新名称:temp-name;break;case 2:cout请输入新编号:temp-number;break;case 3:cout请输入新进价:temp-bid;break;case 4:cout请输入新库存:temp-stock;break;default:cout输入不合法,请重新输入。endl;void shoe:showall()cout名称 编号 进价 适合季节 库存 入库时间:年 月 日 endl;coutname number bid season stock storage_time.year storage_time.month storage_time.dayendl;void shoe:show(shoe *s)int num;shoe *temp;cout请输

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 大杂烩/其它

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号