文件名称:CPP
-
所属分类:
- 标签属性:
- 上传时间:2012-11-16
-
文件大小:598byte
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
假设某销售公司有销售经理和销售员工,月工资的计算办法是:销售经理的固定月薪为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
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.