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, 23.06.2019 08:00
The managing director of a company sends a christmas greeting to all his employees through the company email. which type of network does he use? he uses an .
Answers: 3
question
Computers and Technology, 23.06.2019 09:30
Write an essay on online collaboration, how to do it, the challenges, resolving the challenges, and consider whether the risks are greater than rewards. ( need )
Answers: 1
question
Computers and Technology, 23.06.2019 16:00
What is the biggest difference between section breaks and regular page breaks? section breaks are more difficult to add than page breaks. section breaks make it easier for you to view the document as an outline. section breaks allow you to have areas of the document with different formatting. section breaks are smaller than regular page breaks.
Answers: 2
question
Computers and Technology, 23.06.2019 23:40
4. what is the reason for including the following code snippet in the header file animal.h? #ifndef animal_h #define animal_h class animal { public: animal(); animal(double new_area_hunt); void birth(); void hunt(double new_area_hunt); void death(); double get_area_hunt() const; private: double area_hunt; }; #endif
Answers: 3
You know the right answer?
For this assignment, you are going to enhance the Employee Hierarchy that you created in Programming...
Questions
question
Mathematics, 13.01.2021 17:40
question
Mathematics, 13.01.2021 17:40
question
Mathematics, 13.01.2021 17:40