Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

A bank charges $10.00 a month plus the following check fees for a commercial che

ID: 3805208 • Letter: A

Question

A bank charges $10.00 a 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

The bank also charges a low balance fee of $15.00 if the balance of the account falls below $400.00 (before any check fees are applied.)

Write a program that prompts the user for the beginning balance and the number of checks written. Compute the bank’s service charges for the month. Direct the service fee report to an output file.

Let the user know the name of the data file to which the service charges have been directed by writing an appropriate sentence to the console screen.

Explanation / Answer

Answer:

#include<iostream>

#include<iomanip>

using namespace std;

int main()

{

int checks;

double beginningBalance, feeOne, feeTwo, totalFees;

cout << " +++++++++++++++++++++++++++++ "

  << " Bank Charges"

  << " +++++++++++++++++++++++++++++ ";

cout << "Enter beginning balance: $";

cin >> beginningBalance;

cout << setprecision(2) << fixed;

if(beginningBalance < 0)

cout << "URGENT MESSAGE!! YOUR ACCOUNT IS OVERDRAWN!! ";

else

{

cout << "Enter number of checks written: ";

cin >> checks;

if(beginningBalance < 400)

feeOne = 15.00;

else

feeOne = 0.00;

if(checks >= 0 && checks < 20)

feeTwo = checks * 0.10;

if(checks >= 20 && checks <= 39)

feeTwo = checks * 0.08;

if(checks >= 40 && checks <= 59)

feeTwo = checks * 0.06;

if(checks >= 60)

feeTwo = checks * 0.04;

if(checks < 0)

cout << "The number of checks CANNOT be negative!! ";

totalFees = feeOne + feeTwo;

cout << " ++++++++++++++++ "

  << " Monthly Fees"

  << " ++++++++++++++++ ";

cout << "Low Balance fee: $" << feeOne << endl;

cout << "Check fees: $" << feeTwo << endl;

cout << "Total Monthly fees: $" << totalFees << " ";

}

system("pause");

return 0;

}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote