Question: Write a program with three classes: Program, Employee and Manager Create two implementations of the calculate Pay method (override it) Employee version returns _hours_hourlySalary
Write a program with three classes: Program, Employee and Manager Create two implementations of the calculate Pay method (override it) Employee version returns _hours_hourlySalary Manager version returns _hours *_hourlySalary + _bonus In the main method create an Employee object and a Manager object (add/use setters to initialize) Calculate and print their pay amount Note: Don't write any constructors (yet) . Program < >+main() Employee #_name #_hours # hourly Salary +calculate Pay() Manager -bonus +calculate Pay() Note:+means public, - means private, and # means protected
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
