文件名称:CPP
- 所属分类:
- 书籍源码
- 资源属性:
- [Text]
- 上传时间:
- 2012-11-26
- 文件大小:
- 1kb
- 下载次数:
- 0次
- 提 供 者:
- xiewe******
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
假设某销售公司有销售经理和销售员工,月工资的计算办法是:销售经理的固定月薪为8000元并提取销售额的5/1000作为工资;销售员工只提取销售额的5/1000作为工资。编一程序,定义一个基类Employee,它包含三个数据成员number、name和salary,以及用于输入编号和姓名的构造函数。由Employee类派生Salesman类,再由Salesman类派生Salesmanager类。Salesman类包含两个新数据成员 commrate和sales,还包含用于输入销售额并计算销售员工工资的成员函数pay和用于输出的成员函数print。Salesmanager类包含新数据成员 monthlypay,以及用于输入销售额并计算销售经理工资的成员函数pay、用于输出的成员函数print()。在main函数中,测试你的类结构,求若干个不同员工的工资-Assuming a sales company sales managers and sales staff, and the method of calculation of the monthly wage: sales manager fixed monthly salary of 8,000 yuan and extract sales 5/1000 as wages sales sales staff only extract 5/1000 as wages. Compile a program, define a base class Employee, which contains three data member number, name, and salary, as well as to enter the number and name of the constructor. Salesman class derived by the Employee class, then by the the Salesman class derived Salesmanager class. The Salesman class contains two new data members commrate and sales, also contains member functions used to enter sales and to calculate sales staff wages pay for the member function print output. The Salesmanager class contains the new data member monthlypay, for input sales and calculate sales manager member function pay wages for output member function print (). Seeking a number of different employees' wages in the main function to test your class structure,
(系统自动生成,下载前可以参看下载内容)
下载文件列表
C++.txt