, ,

[SOLVED] Csc160 assignment 9

$25

File Name: Csc160_assignment_9.zip
File Size: 178.98 KB

5/5 - (1 vote)

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”

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[SOLVED] Csc160 assignment 9[SOLVED] Csc160 assignment 9
$25