Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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.

image text in transcribed

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 D2L

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

What Is A Database And How Do I Use It

Authors: Matt Anniss

1st Edition

1622750799, 978-1622750795

More Books

Students also viewed these Databases questions

Question

Write short notes on Interviews.

Answered: 1 week ago