Question: C++ Program This assignment asks you to implement ATM simulator which should create bank account class and also process Login process before using ATM system.

C++ Program

This assignment asks you to implement ATM simulator which should create bank account class and also process Login process before using ATM system.

Create a bank account with a user id and password.

User enters id and password through the screen

System reads both information and create an account

After creating 10 bank instances, each account information will be used for login.

If login was successful, the user will be able to do the following:

Withdraw money.

Deposit money.

Request balance.

If login was not successful (for example the id or password did not match), then the user will be taken back to the introduction menu.

Implementation

This project will require you create a class named Account and then complete the code.

Whenever deposit or withdraw, you have to check validation.

Numeric amount should be displayed with 2 decimal places.

//Account.cpp

Class Account

{

Public:

Account(string, string, double);

bool login(string, string);

bool deposit(double);

bool withdraw(double);

void requestBalance();

private:

string id;

string password;

double balance;

};

//driver.cpp

int main()

{

//Create five account with id, pwd, and initial deposit amount using array

//WRITE A WELCOME MESSAGE HERE

//Ask user to login

//If login is correct,

do

{

d -> Deposit Money

w -> Withdraw Money

r -> Request Balance

q -> Quit

} while(menu != q);

//display Thanks for your shopping

return 0;

}

SAMPLE RUN

Hi! Welcome to the ATM Machine!

Please enter your user id: 12

Please enter your password 1234

******** LOGIN FAILED! ********

Please enter your user name: 12

Please enter your password: 2345

Access Granted!

D -> Deposit Money

W -> Withdraw Money

R -> Request Balance

Q -> Quit

> D

Amount of deposit: $2000

D -> Deposit Money

W -> Withdraw Money

R -> Request Balance

Q -> Quit

> R

Your balance is $2000.

D -> Deposit Money

W -> Withdraw Money

R -> Request Balance

Q -> Quit

> W

Amount of withdrawal: $1200

D -> Deposit Money

W -> Withdraw Money

R -> Request Balance

Q -> Quit

> R

Your balance is $800.00

D -> Deposit Money

W -> Withdraw Money

R -> Request Balance

Q -> Quit

> Q

Thanks for using the ATM Machine!

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 Databases Questions!