Assignment Chef icon Assignment Chef

[SOLVED] Csc160 assignment 9

5.0 1 customer review Digital download

Digital download

$25.00

Availability
In stock
Checkout
One item

Need a hand?

Message us on WhatsApp for payment or download support.

WhatsApp QR code

Write an employee payroll program that uses polymorphism to calculate and print the weekly payroll for your company. There are three types of employees — hourly, salaried, and salaried plus commission. Each type of employee gets paid using a different formula. However, for all employee types, if the calculated paycheck exceeds $1000, the actual paycheck must be decreased to $1000.

Use this class hierarchy:

Employee

Salaried Plus Commission

Employee class (abstract ??):

Instance variables:
name
social security number
birthday month
birthday week.

load method :
Prompts the user for instance-variable values and loads the entries.

toString method:
Returns a string that shows the employee’s name, social security number, and paycheck. Use the String format method (See Java API documentation to help you format the string as shown in the sample session’s paycheck report.) Here is an example from the sample session:
employee: Biff Sanchez
social security number: 111-11-1111
paycheck: $800.00

getBonus method (Extra Credit):
Generates a $100 employee birthday bonus. Compare the employee’s birthday with the current date found on your computer system. Use the Calendar class to generate the current date. (See the Java API documentation.) If the employee’s birthday month and”