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

1 Expert Approved Answer
Step: 1 Unlock

class Employee private String name private double salary public EmployeeString name double salary th... View full answer

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

Document Format (2 attachments)

PDF file Icon

2106_60f58f350e477_873117.pdf

180 KBs PDF File

Word file Icon

2106_60f58f350e477_873117.docx

120 KBs Word File

Students Have Also Explored These Related Java Concepts Late Objects Questions!