Question: Use the C++ code below to build an atm management system. The user should also have the option to change their pin. All these records

Use the C++ code below to build an atm management system. The user should also have the option to change their pin. All these records should be from a txt file. Any withdrawal, deposit or pin change should reflect/update the original txt file.

NOTE: Create your own txt file with data that your system will source information from and update as need be.

#include

#include

using namespace std;

double yourBalance = 0.0;

char differentTransaction;

double withdrawAmount;

double depositAmount;

int yourChoices;

void theTransactions()

{

cout

cout

cout

cout

cout

cout

cout

cout \";

cin >> yourChoices;

switch(yourChoices)

{

case 1: // Balance

cout

cout \">

cout

cout \";

cin >> differentTransaction;

if(differentTransaction == 'Y' ||differentTransaction == 'y' )

theTransactions();

else

cout \">

break;

case 2: // Deposit choice

cout

cout

cin >> depositAmount;

yourBalance += depositAmount;

cout.setf(ios::fixed|ios::showpoint);

cout

cout

cout

cout \";

cin >> differentTransaction;

if (differentTransaction == 'Y'||differentTransaction == 'y' )

{

theTransactions();

}

else

cout \">

break;

case 3: // Withdarw choice

cout

cout

cin >> withdrawAmount;

if (withdrawAmount > yourBalance)

{

cout

cout

cout

cout \";

cin >> differentTransaction;

if (differentTransaction == 'Y'||differentTransaction == 'y' )

{

theTransactions();

}

}

else

{

yourBalance -= withdrawAmount;

cout.setf(ios::fixed|ios::showpoint);

cout

cout

cout

cout

cout

cout \";

cin >> differentTransaction;

if(differentTransaction == 'Y'||differentTransaction == 'y' )

theTransactions();

else

cout \">

} break;

}

}

int main()

{

theTransactions();

return 0;

}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!