Assignment 3 – Enhanced Employee Hierarchy Solved

25.00 $

Click Category Button to View Your Next Assignment | Homework

You'll get a download link with a: . zip solution files instantly, after Payment


5/5 - (10 votes)

For this assignment, you are going to enhance the Employee Hierarchy that you created in Programming Assignment 2. The following are the requirements to modify programming Assignment 2:

1) Make the Employee Class an abstract class and declare in it the abstract method earnings().

2) Add the abstract method void raise(double percent) to the Employee class.

3) Implement the raise method in each of the subclasses in the following manner:

CommissionEmployee Class – increase the commission rate by the percent specified.
BasePlusCommissionEmployee Class – increase the commission rate by the percent specified and increase the base salary by the percent specified.
SalariedEmployee – increase the salary by the percent specified.
HourlyEmployee – increase the hourly wage by the percent specified.

4) In your main method, after the code from Programming Assignment 2, you will add code to polymorphically process an array of Employees to give each employee a raise. You will create a 5 element Employee array and assign each of the 5 employees to an element of the array. You will then write an java enhanced for loop to loop through the array and give each employee a 2 percent raise except SalariedEmployees will be given a 4 percent raise. Print out each employee to show the new information for each employee.

You should use good standard programming practices in all of your coding.