欢迎来到天天文库
浏览记录
ID:49691170
大小:71.00 KB
页数:12页
时间:2020-03-03
《小型公司工资管理系统 C++ 源代码.doc》由会员上传分享,免费在线阅读,更多相关内容在应用文档-天天文库。
1、#include#include#include#includeclassEmploy//基类-雇员类{protected:intnum;charname[10];charsex;intage;intwage;public:virtualvoidset()=0;virtualvoidprint()=0;virtualvoidreserved()=0;};classManager:publicEmploy//经理类{public:voidset();voidprint();voidres
2、erved();};classSalesman:publicEmploy//销售员类{protected:intsalesvolume;intsnum;public:voidset();voidprint();voidreserved();voidprintinfor();intgetsales(){returnsalesvolume;}intgetsnum(){returnsnum;}};classMarketMan:publicManager//销售经理类{protected:intsalesvolume;public:voidset();voidprint();vo
3、idreserved();intresetwage();intgetnum(){returnnum;}char*getname(){returnname;}intgetamount(Salesmans[],intn){salesvolume=0;for(inti=0;i4、);voidprint();voidreserved();};voidManager::set(){wage=8000;cout<<"经理的编号:";cin>>num;cout<<"其姓名:";cin>>name;cout<<"性别(m/w):";cin>>sex;cout<<"年龄:";cin>>age;}voidManager::print()//经理类成员函数{cout<<"┣━━━━━━╋━━━━━━╋━━━━━━╋━━━━━━╋━━━━━━┫"<5、etw(12)<6、";cin>>num;cout<<"其姓名:";cin>>name;cout<<"性别(m/w):";cin>>sex;cout<<"年龄:";cin>>age;}voidMarketMan::print(){resetwage();cout<<"┣━━━━━━╋━━━━━━╋━━━━━━╋━━━━━━╋━━━━━━┫"<7、l;}voidMarketMan::reserved(){ofstreamemployf("E:\05-29\gzglxt.txt",ios::app);employf<<"销售经理的编号:"<
4、);voidprint();voidreserved();};voidManager::set(){wage=8000;cout<<"经理的编号:";cin>>num;cout<<"其姓名:";cin>>name;cout<<"性别(m/w):";cin>>sex;cout<<"年龄:";cin>>age;}voidManager::print()//经理类成员函数{cout<<"┣━━━━━━╋━━━━━━╋━━━━━━╋━━━━━━╋━━━━━━┫"<5、etw(12)<6、";cin>>num;cout<<"其姓名:";cin>>name;cout<<"性别(m/w):";cin>>sex;cout<<"年龄:";cin>>age;}voidMarketMan::print(){resetwage();cout<<"┣━━━━━━╋━━━━━━╋━━━━━━╋━━━━━━╋━━━━━━┫"<7、l;}voidMarketMan::reserved(){ofstreamemployf("E:\05-29\gzglxt.txt",ios::app);employf<<"销售经理的编号:"<
5、etw(12)<6、";cin>>num;cout<<"其姓名:";cin>>name;cout<<"性别(m/w):";cin>>sex;cout<<"年龄:";cin>>age;}voidMarketMan::print(){resetwage();cout<<"┣━━━━━━╋━━━━━━╋━━━━━━╋━━━━━━╋━━━━━━┫"<7、l;}voidMarketMan::reserved(){ofstreamemployf("E:\05-29\gzglxt.txt",ios::app);employf<<"销售经理的编号:"<
6、";cin>>num;cout<<"其姓名:";cin>>name;cout<<"性别(m/w):";cin>>sex;cout<<"年龄:";cin>>age;}voidMarketMan::print(){resetwage();cout<<"┣━━━━━━╋━━━━━━╋━━━━━━╋━━━━━━╋━━━━━━┫"<7、l;}voidMarketMan::reserved(){ofstreamemployf("E:\05-29\gzglxt.txt",ios::app);employf<<"销售经理的编号:"<
7、l;}voidMarketMan::reserved(){ofstreamemployf("E:\05-29\gzglxt.txt",ios::app);employf<<"销售经理的编号:"<
此文档下载收益归作者所有