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

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

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 Databases Questions!