C++课程设计公司工资管理系统说明书(3)
发布时间:2021-06-08
发布时间:2021-06-08
g
销售员类的声明
class Sales:public Person //销售员类 { private: double Amount; public:
Sales(char ID,char *Name,int Duty,double Amount):Person(ID,Name,Duty) {
this->Amount=Amount; }
double GetAmount() {
return Amount; }
void SetAmount(double Amount) {
this->Amount=Amount; }
void CalcSalary() {
Earning=SalesPercent/100*Amount; }
void Output() {
CalcSalary();
cout<<No<<"\t"<<Name<<"\t销售员\t"<<Amount<<"\t"<<Earning<<endl; } };
销售经理类的声明
class SalesManager:public Person //销售经理类 { private: double Amount;
下一篇:办公用品领用制度