Question: Suppose the class Employee is declared as follows: Declare a class Manager that inherits from the class Employee and adds an instance variable bonus for
Suppose the class Employee is declared as follows:

Declare a class Manager that inherits from the class Employee and adds an instance variable bonus for stor ing a salary bonus. Implement the constructors and methods, and supply a test program.
public class Employee { } private String name; private double baseSalary; public void setName (String newName) { . . . } public void setBaseSalary(double newSalary) {...} public String getName() {. . . } public double getSalary() {...}
Step by Step Solution
3.39 Rating (146 Votes )
There are 3 Steps involved in it
Based on the given description and the image of the Employee class we need to create a subclass called Manager which inherits from Employee and adds a... View full answer
Get step-by-step solutions from verified subject matter experts
