Question: Don't write any constructor! Exercise 1 - Simple Inheritance Employee #_name #_hours #_hourly Salary +calculatePayo Program >+main() . Write a program with three classes: Program,

Don't write any constructor!
Exercise 1 - Simple Inheritance Employee #_name #_hours #_hourly Salary +calculatePayo Program >+main() . Write a program with three classes: Program, Employee and Manager Create two implementations of the calculatePay 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) Manager -_bonus +calculatePay() 1 . 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
