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

I would like some help with this c++ program. Any would be appreciated. Thanks!

ID: 3636635 • Letter: I

Question

I would like some help with this c++ program. Any would be appreciated. Thanks!

Your program will act as a bank. The general behavior will be:
A customer walks into the bank.

The customer opens an account. They will enter their name, and make an initial deposit. You can determine an interest rate based on their deposit amount. Be sure to provide good customer service by explaining what the interest rate options are.

Now that the account is open, they can perform transactions. The choices of transaction type are:

Make a deposit - Ask the amount, add it to the balance, display the balance.

Make a withdrawal - Ask the amount, subtract it from the balance, display the balance. (What if they want to withdraw more than their balance?)

Print a statement - A statement of their balance and interest rate, including their name.

Projected balance - Let the user specify a number of years, and based on the current balance and interest rate, tell them what will be the balance in that many years.

After the customer leaves, handle the next customer in line. You may add other functionality if you wish, or embellish these. For example, you might want to have an array of the accounts, and recognize an existing customer if they come back.

To accomplish this, you will create a class for the bank account, containing the customer name, balance, and interest rate. The class will contain functions for each of the desired operations. You might want to call the statement function to show the balance at the end of the deposit and withdrawal functions, rather than duplicating that code. No globals except for constants and type definitions. Pass values as needed.

Explanation / Answer

#include
#include
#include

using namespace std;



int main()
{
// Declare Variables
int acctNumber;
char acctType;
float acctBalance;
double interest;
double minimumBalance;
// For input, get the account number, account type, and current balance

cout << "Enter the Account Number: ";
cin >> acctNumber;

cout << "Account Type" << endl;
cout << "C = Checking Account" << endl;
cout << "S = Savings Account" << endl;


cout << "Enter the Account Type: ";
cin >> acctType;
cout << "Enter minimum account Balance: ";
cin >> minimumBalance;
cout << "Enter the Account Balance: ";
cin >> acctBalance;

if (acctType == 'S' && acctBalance < minimumBalance)
{acctBalance = acctBalance - 10.00;}
if (acctType == 'C' && acctBalance < minimumBalance)
{acctBalance = acctBalance - 25.00;}
if (acctType == 'S' && acctBalance > minimumBalance)
{interest = (acctBalance * 4)/100;}
if (acctType == 'C' && acctBalance <= (minimumBalance + 5000.00) && acctBalance > minimumBalance)
{interest = (acctBalance * 3)/100;}
if (acctType == 'C' && acctBalance >= minimumBalance)
{interest = (acctBalance * 5)/100;}

cout << fixed << showpoint << setprecision(2);
cout << "Account Number: " << acctNumber << endl;
cout << "Account Type: " << acctType << endl;
cout << "Account Balance: $" << acctBalance << endl;
cout << "Amount of Interest Earned: $" << interest << endl;
}