Question: STAGE 1: Calculate Gross Pay | GrossPay.java Write a program to compute gross pay. The inputs to your program are employee name, the hours worked

STAGE 1: Calculate Gross Pay | GrossPay.java

Write a program to compute gross pay. The inputs to your program are employee name, the hours worked per week, and the hourly pay rate. The rule for determining gross pay is to pay the regular pay rate for all hours worked up to 40, time-and-half for all hours over 40 up to 54, and double time for all hours over 54. Compute and display the value for gross pay using this rule. Your program should output hours worked, pay rate, and gross pay. Format you output to display two decimal places. Here are the sample runs of this program:

Enter Employee name: John Smith

Enter hours worked: 25

Enter pay rate: 10

John Smith worked for 25 hours with pay rate of $10.00. The gross pay for John Smith is $250.00

Enter Employee name: John Smith

Enter hours worked: 50

Enter pay rate: 10

John Smith worked for 50 hours with pay rate of $10.00. The gross pay for John Smith is $550.00

Enter Employee name: John Smith

Enter hours worked: 65

Enter pay rate: 10

John Smith worked for 65 hours with pay rate of $10.00. The gross pay for John Smith is $830.00

STAGE 2: Submission

Copy and Paste sample runs of stage 1 in a file called Lab03_output

I should have a file GrossPay.java, Lab03_output

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!