文件名称:my-CPP
介绍说明--下载内容均来自于网络,请自行研究使用
假设某销售公司有销售经理和销售员工,月工资的计算办法是:销售经理的固定月薪为8000元并提取销售额的5/1000作为工资;销售员工只提取销售额的5/1000作为工资。编一程序,定义一个基类Employee,它包含三个数据成员number、name和salary,以及用于输入编号和姓名的构造函数。由Employee类派生Salesman类,再由Salesman类派生Salesmanager类。Salesman类包含两个新数据成员 commrate和sales,还包含用于输入销售额并计算销售员工工资的成员函数pay和用于输出的成员函数print。Salesmanager类包含新数据成员 monthlypay,以及用于输入销售额并计算销售经理工资的成员函数pay、用于输出的成员函数print()。在main函数中,测试你的类结构,求若干个不同员工的工资。
-Suppose a sales company with sales managers and sales staff, the calculation of monthly salary is: sales manager and a fixed monthly salary of 8,000 yuan
Extract sales 5/1000 as wages sales sales staff to extract only 5/1000 as wages. Compile a program, define a
Base class Employee, which contains three data members number, name and salary, as well as for the input number and the name of the constructor.
The number. Salesman class derived from the Employee class, then by the Salesman class derived Salesmanager class. Salesman class contains two
New data members commrate and sales, also includes sales and calculate the sales for the input member functions wages and pay for
Output of the member function print. Salesmanager class contains the new data member monthlypay, as well as sales and account for input
Considered a member function sales manager salary pay, the member function for the output print (). In the main function to test your class results
Institutions, seekin
-Suppose a sales company with sales managers and sales staff, the calculation of monthly salary is: sales manager and a fixed monthly salary of 8,000 yuan
Extract sales 5/1000 as wages sales sales staff to extract only 5/1000 as wages. Compile a program, define a
Base class Employee, which contains three data members number, name and salary, as well as for the input number and the name of the constructor.
The number. Salesman class derived from the Employee class, then by the Salesman class derived Salesmanager class. Salesman class contains two
New data members commrate and sales, also includes sales and calculate the sales for the input member functions wages and pay for
Output of the member function print. Salesmanager class contains the new data member monthlypay, as well as sales and account for input
Considered a member function sales manager salary pay, the member function for the output print (). In the main function to test your class results
Institutions, seekin
(系统自动生成,下载前可以参看下载内容)
下载文件列表
my C++.doc