Question: Write a function called calcGrossPay that has two parameters: one for hours (int) and one for pay rate (double). If hours is less than 0
Write a function called calcGrossPay that has two parameters: one for hours (int) and one for pay rate (double). If hours is less than 0 or greater than 60, throw an exception with a message stating that the hours are not within an acceptable range. If the pay rate is less than 7.25 throw an exception with a message stating that minimum wage is 7.25. Create a main function that includes a try/catch block and write how the catch block will handle the exception. Create a final catch block to handle any other exception that is not the expressed exceptions that you (the programmer) were responsible for throwing.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
