Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ Write a function called calcGrossPay that has two parameters: one for hours (int) and one for pay rate (double). If hours is less than

C++ 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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Graph Databases In Action

Authors: Dave Bechberger, Josh Perryman

1st Edition

1617296376, 978-1617296376

More Books

Students also viewed these Databases questions