文件名称:daima
- 所属分类:
- 企业管理(财务/ERP/EIP等)
- 资源属性:
- [C/C++] [源码]
- 上传时间:
- 2012-11-26
- 文件大小:
- 1kb
- 下载次数:
- 0次
- 提 供 者:
- q***
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
1.某单位的职工工资包括基本工资Wage,岗位津贴Subsidy,房租Rent,水费WaterFee,电费ElecFee。设计是实现工资管理的类Salary,该类的形式如下:
Class Salary{
Double Wage,Subsidy,Rent,WaterFee,ElecFee
Pulic:
Salary(……){初始化工资数据的各分项}
Salary(){初始化工资数据的各分项数据为0}
Void setXX(double f){xx=f }
Double getXX(){return xx }
Double RealSalary() //计算实发工资
}
其中,成员函数setXX用于设置工资的各分项数据,成员函数getXX用于获取工资各分项数据,xx代表Wage,Subsidy等数据成员。
实发工资=Wage+Subsidy-Rent-WaterFee-ElecFee
编写程序完善该类的设计,并写出测试该类成员函数的主函数main。
2.设计工人类Worker,它具有姓名name,年龄age,工作部门Dept,工资salary等数据成员。其中,Salary使用上题上定义的类。完成Worker类的设计,并统计工人的人数,编写测试程序进行测试。
-1 a unit of wages including basic wage Wage, job subsidies Subsidy, rent Rent, water WaterFee, electricity ElecFee. Design is to achieve the payroll of the class Salary, such forms as follows:
Class Salary {
Double Wage, Subsidy, Rent, WaterFee, ElecFee
Pulic:
Salary (... ...) {initialize the wage data of the sub-}
Salary () {initialize the wage data of the sub-data to 0}
Void setXX (double f) {xx = f }
Double getXX () {return xx }
Double RealSalary ()// calculate the real wages
}
Among them, the member function used to set wages setXX the sub-data, member functions getXX used to obtain the wage data in the sub, xx on behalf of Wage, Subsidy and other data members.
Real wages = Wage Subsidy-Rent-WaterFee-ElecFee
Improve the design of such programming, and testing of such a member function to write the main function main.
(2) design of the workers class Worker, it has the name name, age, age, department Dept, salary wages and other data members.
Class Salary{
Double Wage,Subsidy,Rent,WaterFee,ElecFee
Pulic:
Salary(……){初始化工资数据的各分项}
Salary(){初始化工资数据的各分项数据为0}
Void setXX(double f){xx=f }
Double getXX(){return xx }
Double RealSalary() //计算实发工资
}
其中,成员函数setXX用于设置工资的各分项数据,成员函数getXX用于获取工资各分项数据,xx代表Wage,Subsidy等数据成员。
实发工资=Wage+Subsidy-Rent-WaterFee-ElecFee
编写程序完善该类的设计,并写出测试该类成员函数的主函数main。
2.设计工人类Worker,它具有姓名name,年龄age,工作部门Dept,工资salary等数据成员。其中,Salary使用上题上定义的类。完成Worker类的设计,并统计工人的人数,编写测试程序进行测试。
-1 a unit of wages including basic wage Wage, job subsidies Subsidy, rent Rent, water WaterFee, electricity ElecFee. Design is to achieve the payroll of the class Salary, such forms as follows:
Class Salary {
Double Wage, Subsidy, Rent, WaterFee, ElecFee
Pulic:
Salary (... ...) {initialize the wage data of the sub-}
Salary () {initialize the wage data of the sub-data to 0}
Void setXX (double f) {xx = f }
Double getXX () {return xx }
Double RealSalary ()// calculate the real wages
}
Among them, the member function used to set wages setXX the sub-data, member functions getXX used to obtain the wage data in the sub, xx on behalf of Wage, Subsidy and other data members.
Real wages = Wage Subsidy-Rent-WaterFee-ElecFee
Improve the design of such programming, and testing of such a member function to write the main function main.
(2) design of the workers class Worker, it has the name name, age, age, department Dept, salary wages and other data members.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
daima.cpp