Add an instance variable named department of type string


Make a class Employee with a name and salary.

Make a class Manager inherit from Employee.

Add an instance variable, named department, of type String. Supply a method toString that prints the manager's name,department, and salary. Make a class Executive inherit from Manager.

Supply appropriate toString methods for all classes.

Supply a test program that tests these classes and methods.

Solution Preview :

Prepared by a verified Expert
JAVA Programming: Add an instance variable named department of type string
Reference No:- TGS01249367

Now Priced at $20 (50% Discount)

Recommended (95%)

Rated (4.7/5)