急求一C++程序!!跪求高手解决,我将非常感激....

编写程序,某公司雇员( employee )包括经理( manager ),技术人员( technician )和销售员( salesman )。开发部经理( developermanger ),既是经理也是技术人员( salesmanager )。销售部经理( salesmanager ),既是经理也是销售员。
以 employ 类为虚基类派生出 manager , technician 和 salesman 类;再进一步多重派生出 developermanager 和 salesmanager 类。
employee 类的属性包括姓名、职工号、工资级别,月薪(实发基本工资加业绩工资)。操作包括月薪计算函数( page() ),该函数要求输入请假天数,扣去应扣工资后,得出实发基本工资。
technician 类派生的属性有每小时附加酬金和当月工作时数,及研究完成进度系数。业绩工资为三者之积。也包括同名的 pay() 函数,工资总额为基本工资加业绩工资。
salesman 类派生的属性有当月销售额和酬金提取百分比,业绩工资为两者之积。也包括同名的 pay() 函数,工资总额为基本工资加业绩工资。
manager 类派生属性有固定奖金额和业绩系数,业绩工资为两者之积。工资总额也为基本工资加业绩工资。
而 developermanager 类, pay() 函数是将作为经理和作为技术人员业绩工资之和的一半作为业绩工资。
salesamanager 类, pay() 函数则是经理的固定奖金额的一半,加上部门总销售额与提成比例之积,这是业绩工资。
注意: pay() 应用同名覆盖的方法。要求有拷贝构造函数,并测试是否正确。
我想知道这个程序是谁写的...能告诉我下吗?我自己也写了个...想请教他下
还有一个错误... fatal error C1083: Cannot open include file: 'employee.h': No such file or directory

// 主函数,保存为:main.cpp
#include <cstdlib>
#include <iostream>
#include "employee.h"
using namespace std;

int main(int argc, char *argv[])
{
employee e2= employee("lz","bh007",4,6666); //底薪6666,旷工4天
employee e1 = e2; // 复制构造函数
cout << e1.pay() << endl;
system("PAUSE");
return 0;
}

// 下面这些保存为:employee.h
#ifndef EMPLOYEE_H_
#define EMPLOYEE_H_

#include <iostream>
#include <string>
using std::cin;
using std::cout;
using std::endl;
using std::string;

class employee{
private:
string name;
string id;
int level;
float salary;

public:
employee(string n,string i,int l,float s){
name = n;
id = i;
level = l;
salary = s;
};
employee(const employee& e)
{
name = e.name;
id = e.id;
level = e.level;
salary = e.salary;
};

virtual ~employee(){};
virtual float pay();
};

class technician:virtual public employee{
private:
float extra;
int hours;
float schedule;

public:
technician(string n,string i,int l,float s,float e=0,int h=0,float s2=0)
:employee(n,i,l,s),extra(e),hours(h),schedule(s2) {};
float pay()
{
return employee::pay() + extra*hours*schedule;
};
};

class salesman:virtual public employee{
private:
float sales;
float rate;

public:
salesman(string n,string i,int l,float s,float s2 = 0,float r=0)
:employee(n,i,l,s),sales(s2),rate(r) {};
float pay()
{
return employee::pay() + sales*rate;
};
};

class manager:virtual public employee{
private:
float extra;
float rate;

public:
manager(string n,string i,int l,float s,float e,float e2 = 0,float r=0)
:employee(n,i,l,s),extra(e2),rate(r) {};

float pay()
{
return employee::pay() + extra*rate;
};
};

class developermanager:public manager, public technician{
public:
developermanager(string n,string i,int l,float s,float e,int h,float s2,float e2,float r)
:employee(n,i,l,s),technician(n,i,l,s,e,h,s2),manager(n,i,l,s,e2,r) {};
float pay()
{
return ( technician::pay() + manager::pay())/2;
};
};

class salesmanager:public manager, public salesman{
public:
salesmanager(string n,string i,int l,float s,float s2 ,float r,float e2,float r2)
:employee(n,i,l,s),salesman(n,i,l,s,s2,r),manager(n,i,l,s,e2,r2) {};
float pay()
{
return (manager::pay()-employee::pay())/2 + salesman::pay();
};
};

float employee::pay()
{
int absent=0;
cout << "Input total absent days This Month:"<< endl;
cin >> absent;
return salary - absent*100;
}
#endif
温馨提示:内容为网友见解,仅供参考
第1个回答  2010-12-05
分数太少本回答被网友采纳
第2个回答  2010-12-05
不提倡帮别人做作业的。
第3个回答  2010-12-06
自己捅咕吧
相似回答