Question: IN C++ IMPORTANT: use inheritance Create it in FILES: (main.cpp, employee.h, employee.cpp, hourly_employee.h, hourly_employee.cpp, commissioned_employee.h, commissioned_employee.cpp) Make an employee class. Some instance methods that the
IN C++
IMPORTANT: use inheritance
Create it in FILES: (main.cpp, employee.h, employee.cpp, hourly_employee.h, hourly_employee.cpp, commissioned_employee.h, commissioned_employee.cpp)
Make an employee class. Some instance methods that the class should include are:
- Rename
- Get the name
Also, define two classes: hourly employee and commission employee. Objects of class hourly employee must implement the operations to change and get hours worked, change and get hourly wage, calculate wage (no overtime), and print their information. The hourly employee class inherits from the employee class. The objects of the class employed by commission must implement the operations to change and get the sales made, change and get the commission percentage, calculate the salary and print its information. The commission employee class inherits from the employee class. All classes must implement their respective constructors with corresponding parameters.
*Reminder: The employee class is an abstract class and can be used as a superclass of other classes.*
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
