Question: Part I - Polymorphism Payroll System Using Inheritance and Polymorphism You need to implement the following header file and classes. Define the following constants in

Part I - Polymorphism
Payroll System Using Inheritance and Polymorphism
You need to implement the following header file and classes.
Define the following constants in a header file called Employee.h
FACULTY_MONTHLY_SALARY =5000.00
STAFF_MONTHLY_HOURS_WORKED =160
Implement an abstract class Employee with the following requirements:
Attributes
last name (String)
first name (String)
ID number (String)
Default argument constructor and argument constructors.
Public Methods
putData that displays the following information:
ID Employee number :
Employee name:
pure virtual method monthlyEarning that returns the monthly earning.
Implement a class called Staff extending from the class Employee with the following requirements:
Attribute
Hourly rate
Default argument and argument constructors
Public Methods
@ get and set
The method monthlyEarning returns monthly salary (hourly rate times 160)
Implement a class Education with the following requirements:
Attributes
Degree (MS or Ph.D.) String type
Major (Engineering, Chemistry, English, etc ...) String type
Research (number of researches)
Default argument and argument constructors.
Public methods
@ get and set
Implement a class Faculty extending from the class Employee with the following
requirements:
Attributes
Level (use enum statement)
"AS": assistant professor
"AO": associate professor
"FU": professor
Education object
Default argument and argument constructor
Public Methods
@ get and set
The method monthlyEarning returns monthly salary based on the
faculty's level.
AS - faculty monthly salary
AO -1.2 times faculty's monthly salary
Hours works per month:
Monthly Salary:
Implement a test driver program that creates an array or a vector of class Employees to store the objects Staff, Faculty,
and Partime.
Using polymorphism, display all employees using the method putData.
Use the following data to create Employee objects in your program.
Staff
Last name: Allen
First name: Paita
ID: 123
Hourly rate: $50.00
Last name: Zapata
First Name: Steven
ID: 456
Hourly rate: $35.00
Last name:Rios
First name:Enrique
ID: 789
Hourly rate: $40.00
Faculty
Last name: Johnson
First name: Anne
ID: 243
Level: Full
Degree: Ph.D
Major: Engineering
Reseach: 3
Last name: Bouris
First name: William
ID: 791
Level: Associate
Degree: Ph.D
Major: English
Reseach: 1
Last name: Andrade
First name: Christopher
ID: 623
Level: Assistant
Degree: MS
Major: Physical Education
Research: 0
Part-time
Last name: Guzman
First name: Augusto
ID: 455
Hourly rate: $35.00
Hours worked per week: 30
Last name: Depirro
First name: Martin
ID: 678
Hourly rate: $30.00
Hours worked per week: 15
Last name: Aldaco First name: Marque
ID: 945
Hours worked per week: 35
Runtime output
ID Employee number: 123
Employee name: Paita Allen
Full Time
Monthly Salary: 8000
ID Employee number: 456
Employee name: Steven Zapata
Full Time
Monthly Salary: 5600
ID Employee number: 789
Employee name: Enrique Rios
Full Time
Monthly Salary: 6400
ID Employee number: 243
Employee name: Anne Johnson
Full Professor
Monthly Salary: 7000
ID Employee number: 791
Employee name: William Bouris
Associate Professor
Monthly Salary: 6000
ID Employee number: 623
Employee name: Christopher Andrade
Assistant Professor
Monthly Salary: 5000
ID Employee number: 455
Employee name: Augusto Guzman
Hours work per month: 120
Monthly Salary: 4200
ID Employee number: 678
Employee name: Martin Depirro
Hours work per month: 60
Monthly Salary: 1800
ID Employee number: 945
Employee name: Marque Aldaco
Hours worked per month: 140
Monthly Salary: 2800
Total monthly salary for all the part-time staff: $8800
Total monthly salary for faculty: ____________
Total monthly salary for all staff: _____________
Total monthly salary for all employees: $46800
Note: I do not provide the monthly salary for faculty and staff so I can verify your answer for grading.
Hint:
Employee *emp[9];
int n=0;
emp[n++]= new Staff(_________);
......
emp[n++]=new Faculty(_______);
for(int i=0;imonthlyEarning();
Part II - File processing
Create a main function with the following menu:
a-- add data for an employee from a user
d-- display data for all employees
w-- write all employee data to file
r-- read all employee data from file
Part I - Polymorphism Payroll System Using

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 Programming Questions!

Q:

K