Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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? image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Mastering Apache Cassandra 3 X An Expert Guide To Improving Database Scalability And Availability Without Compromising Performance

Authors: Aaron Ploetz ,Tejaswi Malepati ,Nishant Neeraj

3rd Edition

1789131499, 978-1789131499

More Books

Students also viewed these Databases questions

Question

recognise typical interviewer errors and explain how to avoid them

Answered: 1 week ago

Question

identify and evaluate a range of recruitment and selection methods

Answered: 1 week ago

Question

understand the role of competencies and a competency framework

Answered: 1 week ago