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