Question
1. Create an Employee class. Employee has 2 instance variables: -name -salary 2. Create the appropriate 2 parameter constructor for Employee. 3. Create a toString
1. Create an Employee class. Employee has 2 instance variables: -name -salary
2. Create the appropriate 2 parameter constructor for Employee.
3. Create a toString for Employee that SOPs the name and salary.
4. Create a Manager class. The Manager inherits from the Employee class and has one additional instance variable: -department
5. Create the appropriate 3 parameter constructor for Manager.
6. Create a toString for Manager that SOPs the name, salary and department.
7. Create an Executive class that inherits from Manager.
8. Create the appropriate 3 parameter constructor for Executive.
9. Create a toString for Executive that SOPs the name, salary and department.
10. You must utilize the power of inheritance and use the super keyword where appropriate in your constructors and toStrings.
11. Supply the EmployeeTester program that tests these classes and methods. You must have at least 5 employee objects, 5 manager objects and 5 executive objects that contain differing data. SOP all of the objects neatly.
12. Submit Employee, Manager, Executive and EmployeeTester to D2L.
Employee 1. Create an Employee class. Employee has 2 instance variables: -name -salary 2. Create the appropriate 2 parameter constructor for Employee. 3. Create a tostring for Employee that SOPs the name and salary. 4. Create a Manager class. The Manager inherits from the Employee class and has one additional instance variable: -department 5. Create the appropriate 3 parameter constructor for Manager. 6. Create a tostring for Manager that SOPs the name, salary and department. 7. Create an Executive class that inherits from Manager. 8. Create the appropriate 3 parameter constructor for Executive. 9. Create a tostring for Executive that SOPs the name, salary and department. 10. You must utilize the power of inheritance and use the super keyword where appropriate in your constructors and tostrings. 11. Supply the EmployeeTester program that tests these classes and methods. You must have at least 5 employee objects, 5 manager objects and 5 executive objects that contain differing data. SOP all of the objects neatly. 12. Submit Employee, Manager, Executive and EmployeeTester to D2LStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started