(Game: ATM machine) Use the Account class created in our previous Lab Exercise to simulate an ATM machine. Create ten accounts in an array with id 0, 1, . . ., 9, ... and initial balance $100. The system prompts the user to enter an id. If the id is entered incorrectly, ask the user to enter a correct id. Once an id is accepted, the main menu is displayed as shown in the sample run. You can enter a choice 1 for viewing the current balance, 2 for withdrawing money, 3 for depositing money, and 4 for exiting the main menu. Once you exit, the system will prompt for an id again. Thus, once the system starts, it will not stop.

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter5: Control Structures Ii (repetition)
Section: Chapter Questions
Problem 26SA
icon
Related questions
Question
(Game: ATM machine) Use the Account class created in our previous Lab Exercise
to simulate an ATM machine. Create ten accounts in an array with id 0, 1, . . ., 9,
and initial balance $100. The system prompts the user to enter an id. If the id is
entered incorrectly, ask the user to enter a correct id. Once an id is accepted, the
main menu is displayed as shown in the sample run. You can enter a choice 1 for
viewing the current balance, 2 for withdrawing money, 3 for depositing money,
and 4 for exiting the main menu. Once you exit, the system will prompt for an id
again. Thus, once the system starts, it will not stop.
Transcribed Image Text:(Game: ATM machine) Use the Account class created in our previous Lab Exercise to simulate an ATM machine. Create ten accounts in an array with id 0, 1, . . ., 9, and initial balance $100. The system prompts the user to enter an id. If the id is entered incorrectly, ask the user to enter a correct id. Once an id is accepted, the main menu is displayed as shown in the sample run. You can enter a choice 1 for viewing the current balance, 2 for withdrawing money, 3 for depositing money, and 4 for exiting the main menu. Once you exit, the system will prompt for an id again. Thus, once the system starts, it will not stop.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Print statement
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning