Question: PRG - 4 . Modify PRG - 3 to add anther class named SalaryHourlyEmployee whose ob - ject receives a fixed amount of salary per

PRG-4. Modify PRG-3 to add anther class named SalaryHourlyEmployee whose ob-
ject receives a fixed amount of salary per month and extra pay if she works
more than 180 hours per month using the same rate received by an hourly
employee. Use two more abstract classes, SalaryType and HourlyType to
avoid multiple inheritance (Mixin classes) as shown below. Write the inter-
face files, the implementation files for all classes and then test them in an
annlication file (The samnle int main () is stated as follows )
int main ()
{
// Handling a salary employee
SalaryEmployee john ("John",'A', "Pape", 2500);
john.print();
// Handling an hourly employee
HourlyEmployee lucie ("Lucie",'C', "Bush" ,70,20.0);
lucie.print ();
// Handling a salary-hourly employee
SalaryHourlyEmployee ann ("Ann",'A', "White", 3500,230,20.0);
ann.print ();
return 0;
}
 PRG-4. Modify PRG-3 to add anther class named SalaryHourlyEmployee whose ob-

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!