Question: Problem 2 Make a class Employee with a name and salary. Make a class Manager that inherits from Employee. Add an instance variable, named department,
Problem
Make a class Employee with a name and salary.
Make a class Manager that inherits from Employee. Add an instance variable, named department, of type String.
Make a class Executive inherit from Manager.
Implement toString and equals methods for all classes; supply a test program that tests these classes and methods.
Required Submission for both problems: Submit the java source code, writeup of the solution and screenshots of the output
Additional Information
Two instances of a class are equal if all properties have the same value. Make sure to review "equals" reference article posted in Chapter Notes. Problem: feel free to create your own test data. Please include writeup of algorithim or solution
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
