Question: c++ can you solve it with cout and cin? Program 2 Write a program to simulate an ATM machine, at which you can see the

c++
can you solve it with cout and cin?  c++ can you solve it with cout and cin? Program 2

Program 2 Write a program to simulate an ATM machine, at which you can see the balance, deposit or withdraw money. Your program should first ask the user to input what the current balance is (don't we all wish we could do that with our own accounts?). Then, the user will be asked what the program should do. Use a switch structure to let the user choose an action (see balance, deposit, withdraw or quit). Each action should direct the program to a different function. All functions will have parameters; the deposit and withdraw functions will pass the balance by reference. Functions: void intro(); void getBalance(float& bal); void getOption(char& opt); // title of the program & basic instructions // prompts user for original balance & returns balance // prompts the user for an action: B for see balance, D for deposit, W for withdraw, E for exit (only those), data validation should be included // amount to deposit passed in by value; balance passed by ref // amount to withdraw passed in by value; balance passed by reference; data validation that user doesn't withdraw more than amount in the account! // displays the balance void deposit(float, float); void withdraw(float, float&); void showBalance(float)

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!