预览加载中,请您耐心等待几秒...
1/10
2/10
3/10
4/10
5/10
6/10
7/10
8/10
9/10
10/10

亲,该文档总共15页,到这已经超出免费预览范围,如果喜欢就直接下载吧~

如果您无法下载资料,请参考说明:

1、部分资料下载需要金币,请确保您的账户上有足够的金币

2、已购买过的文档,再次下载不重复扣费

3、资料包下载后请先用软件解压,在使用对应软件打开

//main.cpp#include<iostream>#include<string>#include<fstream>#include<cassert>#include<iomanip>#include<conio.h>usingnamespacestd;//仓库管理员类classadmin{public:admin();private:stringname;};//仓库货架类classshelf{public:shelf();private:adminmen;//管理员stringstoreNo;//仓库编号stringkinds;//商品大类stringshelfNo;//货架号};//电器类classele{public:ele();private:stringname;//商品名doubleprice;//介格shelfsh;//所属货架longcount;//商品数量};//管理(组合类)classmana{public:mana();charfirst_face();//首页voidin_storage();//入库voidout_storage();//出库voidselect_ele();//查询voidselect_name();//按商品名称查询voidselect_price();//按商品价格查询voidselect_kind();//按大类查询voidcall_break();//商品报损private:eleaele;shelfashelf;adminabs;};//电器类默认结构函数ele::ele():sh(){name="xxx";//商品名price=0.0;//介格count=0;//商品数量}////仓库货架类默认结构函数shelf::shelf():men(){storeNo="xxx";//仓库编号kinds="xxx";//商品大类shelfNo="xxx";;//货架号}//仓库管理员类admin::admin(){name="xxx";}//管理类默认结构函数mana::mana():aele(),ashelf(),abs(){}charmana::first_face(){system("cls");cout<<endl;cout<<endl<<"\t\t◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆"<<endl<<"\t\t◆◆"<<endl<<"\t\t◆商场电器库存管理系统◆"<<endl<<"\t\t◆◆"<<endl<<"\t\t◆1.商品入库◆"<<endl<<"\t\t◆◆"<<endl<<"\t\t◆2.商品出库◆"<<endl<<"\t\t◆◆"<<endl<<"\t\t◆3.查询统计◆"<<endl<<"\t\t◆◆"<<endl<<"\t\t◆4.商品报损◆"<<endl<<"\t\t◆◆"<<endl<<"\t\t◆5.退出系统◆"<<endl<<"\t\t◆◆"<<endl<<"\t\t◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆"<<endl<<endl<<"\t\t";returngetch();}//入库voidmana::in_storage(){system("cls");stringname;//商品名doubleprice;//介格stringstoreNo;//仓库编号stringkinds;//商品大类stringshelfNo;//货架号longcount=0;//商品数量cout<<endl<<"商品入库,请输入相关信息:"<<endl<<endl;cout<<"\t商品名称:";cin>>name;cout<<endl<<"\t商品介格:";cin>>price;cout<<endl<<"\t商品数量:";cin>>count;cout<<endl<<"\t仓库编号:";cin>>storeNo;cout<<endl<<"\t商品大类:";cin>>kinds;cout<<endl<<"\t货架编号:";cin>>shelfNo;ofstreamstoreFile("store.txt",ios::app);storeFile<<setiosflags(ios::left)<<setw(20)<<name<<""<<setw(15)<<price<<""<<setw(10)<<count<<""<<setw(10)<<storeNo<<""<<setw(20)<<kinds<<""<<shelfNo<<endl;storeFile.close();cout<<endl<<endl<<"\t该商品已经入库......."<<endl<<endl<<"\t";system("pause");}//出库voidman