小型公司工资管理系统(C++)源代码

上传人:cl****1 文档编号:445820357 上传时间:2023-11-27 格式:DOC 页数:12 大小:39KB
返回 下载 相关 举报
小型公司工资管理系统(C++)源代码_第1页
第1页 / 共12页
小型公司工资管理系统(C++)源代码_第2页
第2页 / 共12页
小型公司工资管理系统(C++)源代码_第3页
第3页 / 共12页
小型公司工资管理系统(C++)源代码_第4页
第4页 / 共12页
小型公司工资管理系统(C++)源代码_第5页
第5页 / 共12页
点击查看更多>>
资源描述

《小型公司工资管理系统(C++)源代码》由会员分享,可在线阅读,更多相关《小型公司工资管理系统(C++)源代码(12页珍藏版)》请在金锄头文库上搜索。

1、includeiomanip.h#includeiostream。hincludeincludestdlib.hclass Employ/基类雇员类protected: int num; char name10; char sex; int age; int wage;public:virtual void set()=0;virtual void print()=0;virtual void reserved()=0;class Manager:public Employ/经理类public: void set(); void print();void reserved();;class S

2、alesman:public Employ/销售员类protected:int salesvolume;int snum;public: void set(); void print();void reserved();void printinfor();int getsales()return salesvolume;int getsnum()return snum;;class MarketMan:public Manager/销售经理类protected:int salesvolume;public: void set(); void print();void reserved(); i

3、nt resetwage();int getnum()return num;chargetname()return name;int getamount(Salesman s,int n)salesvolume=0;for(int i=0;in;i+)if(si。getsnum()=num)salesvolume+=si.getsales();return salesvolume;;class Technician:public Employ/技术员类protected:int worktime;public: void set(); void print();void reserved();

4、;void Manager::set()wage=8000;coutnum;coutname;coutsex;cout年龄:”;cinage;void Manager::print()/经理类成员函数coutendl;coutsetw(12)num”setw(12)name”setw(12)sex;cout”setw(12)age”setw(12)wage”endl;void Manager::reserved()ofstream employf(E:0529gzglxt。txt”,ios:app);employf经理的编号:numendl ”其姓名:nameendl ”性别(m/w):sex

5、endl 年龄:”ageendl;void MarketMan::set()wage=resetwage();coutnum;coutname;coutsex;cout”年龄:;cinage; void MarketMan:print() resetwage();cout”endl;coutsetw(12)numsetw(12)name”setw(12)sex;cout”setw(12)age”setw(12)wage”endl;void MarketMan::reserved() ofstream employf(E:0529gzglxt.txt”,ios:app);employf销售经理的

6、编号:numendl ”其姓名:”nameendl 性别(m/w):”sexendl ”年龄:ageendl;int MarketMan:resetwage()wage=5000+int(salesvolume*0。005);return wage;void Salesman::set()/销售员类定义coutnum;coutname;cout”性别(m/w):;cinsex;coutage;cout”销售额:”;cinsalesvolume;coutsnum; wage=int(salesvolume*0。04);void Salesman:printinfor()cout”endl;cou

7、t”setw(14)num”setw(14)name”setw(14)salesvolumeendl;void Salesman::print()cout”endl;cout”setw(8)num”setw(10)namesetw(10)sex;coutsetw(10)age”setw(10)wage”setw(16)getsnum()”endl; void Salesman::reserved()ofstream employf(E:05-29gzglxt.txt”,ios:app);employf”销售员的编号:numendl ”其姓名:nameendl ”性别(m/w):sexendl

8、年龄:ageendl ”销售额:salesvolumeendl 所属销售经理的编号snumendl;void Technician:set()/技术员类定义coutnum;coutname;coutsex;cout年龄:”;cinage;coutworktime;wage=worktime*100; void Technician:print()cout”endl;coutsetw(12)num”setw(12)name”setw(12)sex;coutsetw(12)age”setw(12)wageendl; void Technician:reserved() ofstream emplo

9、yf(”E:05-29gzglxt.txt,ios::app);employf技术员的编号:”numendl ”其姓名:”nameendl 性别(m/w):sexendl ”年龄:”ageendl ”工作时间:worktimeendl;/主函数int t,m,s,mm;Technicianpt;Managerpm;Salesman*ps;MarketManpmm;void setin();void count();void printdata();void reservedall();void single();void main()cout请分别输入技术员,经理,销售员,销售经理人数:”tm

10、smm;pt=new Techniciant;pm=new Managerm;ps=new Salesmans;pmm=new MarketManmm;if((!pt)|(!pm)|(!ps)(!pmm)cout”堆内存分配失败!endl;exit(1);single();void single() cout”小型公司工资管理系统”endl;cout”endl;cout 请选择所需的操作 endl;cout endl;cout” 数据输入:1,并按回车键 endl;cout endl;cout 数据统计:2,并按回车键 ”endl;cout” endl;cout 数据打印:3,并按回车键 endl;cout” ”endl;cout” 数据备份:4,并按回车键 endl;cout ”endl;cout 退出系统:5,并按回车键 ”endl;cout

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

当前位置:首页 > 商业/管理/HR > 创业/孵化

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