Question: Write a complete Java program that: 1. Prompts an employee to enter the number of hours that they have worked in a given week and

Write a complete Java program that: 1. Prompts an employee to enter the number of hours that they have worked in a given week and stores their response in a variable named hoursWork - Only whole hours are tallied, no partial hours 2. Prompts the employee to enter their hourly wage in dollars and stores their response in a variable named payRate 3. Computes the employee's weekly pay check under the following rules: All hours up to and including 40, are paid at exactly the employee's hourly wage - regular pay . Any / All remaining hours, are paid at one and one half times the employee's hourly wage - overtime pay 4. Displays to the screen a brief report including: The value of all of the user's inputs . The amount of regular pay earned The amount of overtime pay earned You can find two separate sample runs of such a program in the unnamed box below the editor window. Sample Run 1: Enter the number of hours you worked this week: 8 Enter your hourly wage $ 5 8 hours of work at an hourly wage of $5.0 results in: $40.0 of regular pay $0.0 of overtime pay Sample Run 2: Enter the number of hours you worked this week:42 Enter your hourly wage $ 10.50 42 hours of work at an hourly wage of $10.5 results in: $420.0 of regular pay $31.5 of overtime pay
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
