Question: Design a Java payroll program that prompts the user to enter an employee's hourly pay rate and the number of hours worked. Validate the user's
Design a Java payroll program that prompts the user to enter an employee's hourly pay rate and the number of hours worked.
Validate the user's input so that only the pay rates in the range of $7.50 through $18.25 and hours in the range of 0 through 40 are accepted.
If incorrect hourly rate inputs prompt the user to enter pay again
If incorrect hours are input prompt the user to enter hours again
The program should also calculate the employee's gross pay only when correct totals are entered.
Step by Step Solution
3.47 Rating (154 Votes )
There are 3 Steps involved in it
Payrolljava import javautilScanner class Payroll public sta... View full answer
Get step-by-step solutions from verified subject matter experts
