Question: C++ Exercise Design a class Employee with the member variables employee name : string employee number : string hire date : string Code and test
C++
Exercise Design a class Employee with the member variables
employee name : string
employee number : string
hire date : string
Code and test a default and a parameterized ctor for class Employee, along with mutator and accessor functions for the member variables, and a print function that prints Employee data.
Design a class ProductionWorker that inherits from Employee and adds member variables
shift : integer
hourly pay rate : double
ProductionWorker shift is 1 for day and 2 for night shift. Code and test a default and a parameterized ctor for class ProductionWorker, along with mutator and accessor functions for the member variables, and a print function that prints a ProductionWorker s data. Plus, test your classes with a client function that prints a ProductionWorkers information.
Sample output is shown here:
/* Using member functions to print
Employee: Jesse James
Employee #: 123
Hire date: 12/4/1872
Shift: 2 - Night
Pay rate: $10.45
Using client function to print
Employee: Jesse James
Employee #: 123
Hire date: 12/4/1872
Shift: Night Shift #: 2
Pay rate: $10.45 */
A shift supervisor is a salaried employee who supervises a production shift. In addition to a salary, the shift supervisor earns a yearly bonus when his/her shift meets production goals. Design a ShiftSupervisor class derived from Employee specified above. The ShiftSupervisor class has member variables
salary : double annual salary
bonus : double yearly production bonus
Code a default and a parameterized ctor for class ShiftSupervisor, along with mutator and accessor functions for the member variables, and a print function that prints information about a ShiftSupervisor. Also, test your classes with a client function that prints a ShiftSupervisor s information.
Sample output is shown here:
/* Using member functions to print
Employee: Sally James
Employee #: 523
Hire date: 22/11/1871
Annual Salary: $73238.67
Bonus: $15264.17
Using client function to print
Employee: Sally
James Employee #: 523
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
