C++课程设计-商品管理系统(2)

2020-04-17 07:10

实用文档 float oprice; char gys[20]; public: int id; int getId() char *getName() int getCount() float getBuy() float getSale() }; 商品类的设计 class Commodity { private: spData t[50]; char *getGys() void setId(int n) void setName(char na[]) void setCount(int c) void setBuy(float i) void setSale(float o) void setGys(char g[]) int n; public: int id; int n; char name[50]; void newFile() { 文案大全

实用文档 int count; float iprice; float oprice; char gys[20]; if(n<0) n=0; int i; spData temp; for(;;n++) { cout<<\商品编号:\cin>>id; if(id==-1) break; t[n].setId(id); cout<<\商品名:\cin>>name; t[n].setName(name); cout<<\库存量:\cin>>count; t[n].setCount(count); cout<<\进价:\cin>>iprice; t[n].setBuy(iprice); cout<<\售价:\cin>>oprice; 文案大全

实用文档 t[n].setSale(oprice); cout<<\供应商:\cin>>gys; t[n].setGys(gys); cout<<\若商品添加完毕,请按-1退出添加!\ } void showData(int i) { } void showData() { int n; spData t,*p; p=&t; cout<getId() <getName() <getCount() <getBuy() <getSale() <getGys()<t[n].getId()) { } temp=t[i]; t[i]=t[n]; t[n]=temp; 文案大全

实用文档 } cout<<\商品编号\ <0 ) showData(i); cout<<\商品种类:\void save() { ofstream fout; fout.open(\商品清单.txt\ if(!fout) { } fout<<\商品编号\ \商品名\ \库存量\ \进价\ \售价\

cout<<\return ; \供应商\ \ fout<

实用文档 } fout.close(); void xiugai() { int count; char name[100]; cout<<\售价:\ cout<<\进价:\cin>>iprice; t[temp].setBuy(iprice); cout<<\库存量:\cin>>count; t[temp].setCount(count); float iprice; float oprice; char gys[20]; int temp; temp=search(); if(temp==-1) { } else{ cout<<\请输入新数据:\ cout<<\商品名:\cin>>name; t[temp].setName(name); cout<<\return; 文案大全


C++课程设计-商品管理系统(2).doc 将本文的Word文档下载到电脑 下载失败或者文档不完整,请联系客服人员解决!

下一篇:中国老年人代步车行业市场前景分析预测报告(目录) - 图文

相关阅读
本类排行
× 注册会员免费下载(下载后可以自由复制和排版)

马上注册会员

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信: QQ: