Question: 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.
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.
Step by Step Solution
3.43 Rating (172 Votes )
There are 3 Steps involved in it
class Employee private String name private double salary public EmployeeString name double salary th... View full answer
Get step-by-step solutions from verified subject matter experts
Document Format (2 attachments)
2106_60f58f350e477_873117.pdf
180 KBs PDF File
2106_60f58f350e477_873117.docx
120 KBs Word File
