Question: Input (from console): Double basePay, and integer hoursWorked Output (print to console): The totalPay or a message, calculated or determined based on the below set


Input (from console): Double basePay, and integer hoursWorked Output (print to console): The totalPay or a message, calculated or determined based on the below set of rules: An employee gets paid (hours worked) x (base pay), for each hour up to 40 hours For every hour over 40, they get overtime = (base pay) 1.5 The base pay must not be less than the minimum wage ($8.00 an hour). If it is, print "Recheck Base Payment!," do not calculate totalPay or realHourlyPayment, and do not consider the entered values for calculating the averages in Note 2. If the number of hours is greater than 70, print "Supervisor's Approval Required!", the totalPay value is calculated and printed, but is not considered in calculating the average totalPay (as in Note 2), but the entered BasePay and hoursWorked are considered in calculating the averages If an employee has worked at least five hours, they should earn at least $100, and no employee should be paid more than $1000, so if the calculated payment exceeds $1000 it should be reduced to $1000. 1. 4. 5. NOTE: For each of the above conditions, also print the realHourlyPayment which is calculated as (totalPay)/hoursWorked The function keeps receiving values and calculating and presenting totalPays until the user enters a 0 for basePay, and a 0 for hours Worked. At that point, the function shows the average values of totalPay, BasePay, and hoursWorked for all of the entered cases and stops. 1. 2
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
