14. Bank Charges A bank charges $10 per month plus the following check fees for a commercial checking account: $.10 each for fewer than 20 checks $.08 each for 20-39 checks $.06 each for 40-59 checks $.04 each for 60 or more checks The bank also charges an extra $15 if the balance of the account falls below $400 (before any check fees are applied). Write a program that asks for the beginning bal- ance and the number of checks written. Compute and display the bank's service fees for the month.
Max Function
Statistical function is of many categories. One of them is a MAX function. The MAX function returns the largest value from the list of arguments passed to it. MAX function always ignores the empty cells when performing the calculation.
Power Function
A power function is a type of single-term function. Its definition states that it is a variable containing a base value raised to a constant value acting as an exponent. This variable may also have a coefficient. For instance, the area of a circle can be given as:
C++
Also prompt the user for the total amount deposited. Do not accept a value less than zero; display an error message and exit the program if this occurs.
If the number of checks entered is greater than zero, prompt the user for the total amount of the checks written. Do not accept a value of zero or less; provide an error message and exit if the user enters invalid data.
We will also bring this problem into the 21st century and consider ATM transactions as well. Prompt the user for the number of ATM transactions. Like number of checks written, do not accept a negative number here. If the number of transactions is greater than zero, also prompt for the total amount withdrawn. Do not accept zero or less for that total amount. The first five ATM transactions are free; charge a dime for each subsequent transaction.
If the balance after charges and withdrawals are applied but before the deposit is credited is less than the minimum balance of 400.00, charge them the low balance fee. Yes, banks actually do it that way. If that balance is less than zero display an "overdrawn" notice and charge them an additional "overdrawn fee" of $20.
Show your results as a vertical table, using appropriate formatting. All dollar amounts should be shown with exactly two digits after the decimal, and aligned by the decimal point in the table. Counts (like the number of checks written) should be integers. Include lines for the initial balance, the monthly charge, the number of checks written (if not zero) and the check charge and the checks written amount, the number of ATM transactions (if not zero) and the ATM charge and amount withdrawn, the final balance at this point, the low balance fee (if applied), the overdrawn fee (if applied), the amount deposited, and the final balance.
For your screen shot, enter an initial balance of 365.50, a deposit total of of 208.56, 22 checks written for a total of $410.55, and 7 ATM transactions for a total of $240. But in your testing make sure you first enter invalid values at every opportunity to demonstrate your program's ability to catch those errors.



Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 2 images









