文件名称:a
介绍说明--下载内容均来自于网络,请自行研究使用
建一个表示雇员信息的employee类,其中包含数据成员name、empNo和salary,分别表示雇员的姓名、编号和月薪。再从employee类派生出3个类worker、technician和salesman,分别代表普通工人、科研人员、销售人员。三个类中分别包含数据成员productNum、workHours和monthlysales,分别代表工人每月生产产品的数量、科研人员每月工作的时数和销售人员每月的销售额。要求各类中都包含成员函数pay,用来计算雇员的月薪,并假定:
普通工人的月薪=每月生产的产品数×每件产品的赢利×20
科研人员的月薪=每月的工作时数×每小时工作的酬金
销售人员的月薪=月销售额×销售额提成。-Build a said employees of the employee information, including data member name, empNo and salary, respectively, said the names of the employees, Numbers and salary. Again from employee derived class 3 class worker, technician and salesman, on behalf of the ordinary workers and scientific research personnel, sales personnel. Three class contains data respectively productNum members, workHours and monthlysales, on behalf of the workers, the number of monthly production products scientific research personnel monthly work hours and sales personnel monthly sales. Requirements of all kinds contain pay member function that is used to calculate employees of monthly salary, and assume that:
The ordinary workers salary monthly production product number = × each product x 20 profit
Scientific research personnel salary = monthly working hours per hour of work reward ×
The sales staff salary = monthly sales × sales commissions.
普通工人的月薪=每月生产的产品数×每件产品的赢利×20
科研人员的月薪=每月的工作时数×每小时工作的酬金
销售人员的月薪=月销售额×销售额提成。-Build a said employees of the employee information, including data member name, empNo and salary, respectively, said the names of the employees, Numbers and salary. Again from employee derived class 3 class worker, technician and salesman, on behalf of the ordinary workers and scientific research personnel, sales personnel. Three class contains data respectively productNum members, workHours and monthlysales, on behalf of the workers, the number of monthly production products scientific research personnel monthly work hours and sales personnel monthly sales. Requirements of all kinds contain pay member function that is used to calculate employees of monthly salary, and assume that:
The ordinary workers salary monthly production product number = × each product x 20 profit
Scientific research personnel salary = monthly working hours per hour of work reward ×
The sales staff salary = monthly sales × sales commissions.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
a.cpp