USE named constants where appropriate.

A bank charges $10 per month plus the following check fees for a commercial checking account:

$0.10 each for 1-19 checks
$0.08 each for 20-39 checks
$0.06 each for 40-59 checks
$0.04 each for 60 or more checks

(Note that the same fee is charged for all checks. If the customer writes 21 checks, all 21 checks are billed at the $0.08 rate)

The bank also charges an additional $15, if the balance of the account falls below $400 (after applying the $10 fee but before any check fees are applied).

Write a function named getFees() which takes two arguments: a double representing the account balance, and an int representing the number of checks written during the past month. This function returns a double value representing the total amount that will be charged in fees for this month.

Write a void function named getData() that asks for the account balance and number of checks written and returns the values through its argument list (note, you must pass values by reference for this to work). Make sure that the user enters account balance values of 0 or more. Also, make sure that the number of check is more than 0.

In a main function, call the functions to process the data and display results.

For example, getFees(1000.0, 14) would return 11.4 (the basic $10 fee plus 14 * 0.1 for the checks). getFees(250.75, 50) would return 28.0 (the basic $10 fee, plus a $15 penalty for falling below $400.00, plus 50 * 0.06 for the checks).

Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.