Question: Payroll System Using Inheritance and Polymorphism ( C + + ) You need to implement the following header file and classes. 1 . Define the

Payroll System Using Inheritance and Polymorphism (C++)
You need to implement the following header file and classes.
1. Define the following constants in a header file called Employee.h
FACULTY_MONTHLY_SALARY =5000.00
STAFF_MONTHLY_HOURS_WORKED =160
2. 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.
3. 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)
putData that displays the following information:
ID Employee number :_________
Employee name: __________
Full Time
Monthly Salary: _________
4. 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
FU -1.4 times faculty's monthly salary
putData that displays the following information:
ID Employee number :_________
Employee name: __________
XXXXX Professor where XXXXX can be Assistant, Associate or Full
Monthly Salary: _________
Implement a class called Partime extending from the class Staff with the following requirements:
Attributes
Hours worked per week
Default argument and argument constructors
Public Methods
set and get
The method monthlyEarning returns monthly salary which hourly rate multiplied by hours worked per week multiplied by four.
putData that displays the following information:
ID Employee number :_________
Employee name: __________
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
Continuing on lab assignment, you need to modify the main function to output to the console window the following:
Total monthly salary for all the staff
Total monthly salary for faculty
Total monthly salary for part-time
Total monthly salary for all employees

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!