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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started