# include
# include
# include
using namespace std;
The class Date {
Public:
Int year;
Int mon;
Int day;
};
The class ployee {
Public:
String P_name;
Int P_id;
The Date P_birthdate;
Double P_salary;
Public:
Ployee () {};
~ ployee () {};
Ployee (string p, int a) {
This - & gt; P_name=p;
This - & gt; P_id=a;
}
Public:
Virtual void salarysum (double a, b double, double c, double d and double e)=0.//a for water or hours weekly salary, b for the working hours, c for sales, d for sales commission, e for base salary
Public:
Virtual void print ()=0;
};
The class SalariedEmployee: public ployee {
Public:
SalariedEmployee (c string p, int, int a=2021, int b=01, int e=01) {
P_name=p;
P_id=c;
This - & gt; P_birthdate. Year=a;
This - & gt; P_birthdate. Mon=b;
This - & gt; P_birthdate. Day=e;
}
SalariedEmployee () {};
~ SalariedEmployee () {};
Void salarysum (double a=0, double b=0, double c=0, double d=0, double e=0) {
P_salary=P_salary + a;
}
Public:
Void the print () {
Cout & lt; <"Employee categories: employees paid" & lt;
};
Int jud (ployee& P, int n) {
If (p.P _birthdate. Mon==n) {
P.P _salary +=100;
}
Return p.P _salary;
}
Int main () {
String s;
Int id=0, mon=0, day=0, year=0, t=0;
Cout & lt; <"Please enter the name of employees" & lt;
Cout & lt; <"Please enter the employee number" & lt;
Cout & lt; <"Please enter the employee birthday" & lt;
SalariedEmployee p=SalariedEmployee (s, id);
Cout & lt; <"Please enter the employee weekly" & lt;
Cout & lt; <"Please enter the current month" & lt;
P.p rint ();
return 0;
}