subject

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. 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.
The output from your program should look like the following:
Employee information.
Commissioned Employee: Fred Jones with ssn: 111-11-1111
Gross Sales: 2000.00
Commission Rate: 0.0500
Earnings: $100.00
Base Salary Plus Commissioned Employee: Sue Smith with ssn: 222-22-2222
Gross Sales: 3000.00
Commission Rate: 0.0500
with Base Salary of: $300.00
Earnings: $450.00
Salaried Employee: Sha Yang with ssn: 333-33-3333
Salary: 1150.00
Earnings: $1150.00
Hourly Employee: Ian Tanning with ssn: 444-44-4444
Hourly Wage: 15.00
Hours Worked: 50.00
Earnings: $825.00
Hourly Employee: Angela Domchek with ssn: 555-55-5555
Hourly Wage: 20.00
Hours Worked: 40.00
Earnings: $800.00
Employee information after raises.
Commissioned Employee:
Fred Jones with ssn: 111-11-1111
Gross Sales: 2000.00
Commission Rate: 0.0510
Earnings: $102.00
Base Salary Plus Commissioned Employee: Sue Smith with ssn: 222-22-2222
Gross Sales: 3000.00
Commission Rate: 0.0510
with Base Salary of: $306.00
Earnings: $459.00
Salaried Employee: Sha Yang with ssn: 333-33-3333
Salary: 1196.00
Earnings: $1196.00
Hourly Employee: Ian Tanning with ssn: 444-44-4444
Hourly Wage: 15.30
Hours Worked: 50.00
Earnings: $841.50
Hourly Employee: Angela Domchek with ssn: 555-55-5555
Hourly Wage: 20.40
Hours Worked: 40.00
Earnings: $816.00

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 22:20
Pp 4.1 design and implement a class called sphere that contains instance data that represents the sphere’s diameter. define the sphere constructor to accept and initialize the diameter and include getter and setter methods for the diameter. include methods that calculate and return the volume and surface area of the sphere (see pp 3.5 for the formulas). include a tostring method that returns a one-line description of the sphere. create a driver class called multisphere, whose main method instantiates and updates several sphere objects.
Answers: 1
question
Computers and Technology, 23.06.2019 07:30
What key should you press and hold to select and open multiple files at one time? enter alt control esc
Answers: 1
question
Computers and Technology, 23.06.2019 17:00
What are the 12 colors of the spectrum called?
Answers: 1
question
Computers and Technology, 24.06.2019 12:00
Which spreadsheet operation does a look function perform?
Answers: 1
You know the right answer?
For this assignment, you are going to enhance the Employee Hierarchy that you created in Programming...
Questions
question
Mathematics, 21.05.2021 19:50
question
Health, 21.05.2021 19:50
Questions on the website: 13722363