Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ project ATM Simulator ill write the code to help the Oiler Bank get their ATM up and running. To start out, your On startup,

C++ project
image text in transcribed
ATM Simulator ill write the code to help the Oiler Bank get their ATM up and running. To start out, your On startup, the In today's lab you version will only have a few operations. Assume that the user has an initial balance of $1,000.00 program should display the balance and this menu: **Oiler Banking** [D] Deposit [W] Withdraw [B] Balance [X] Done Have the user enter a character selection (D, W ,B, or X) and perform the operation based on the description below. The menu and actions below should loop (using a while loop) until the user chooses the "Done" option. Deposit: Ask the user for the amount deposited. The value must be between S0.01 and s5,000.00. If the value is acceptable, add it to the current balance and display the new balance formatted to two decimal digits and with a currency symbol (S), otherwise print a message indicating that an invalid amount has been entered. Withdrawal: Ask the user for the amount to be withdrawn. The value must be a positive number, a multiple of 10, and less than or equal to the balance. For example, a valid withdrawal for a balance of S500 would be 20 70 or 500. An invalid withdrawal for a balance of $500 would be 15, -20, 700 or 0. If the value is acceptable, subtract it from the balance and display the new balance formatted to two decimal digits; otherwise print a message indicating the problem. The message should read either amount not a positive number, amount not a multiple of 10, or insufficient funds depending on the problem. Do not worry about the amount that falls into more than one category. For instance, for an input amount of -23 your error message would just state that the amount is not a positive number. Even though -23 is also not a multiple of 10, you do not need to print that message (but can if you would prefer). Balance: Just print the balance, formatted to two decimal digits and with a currency symbol (S) in front of the value. Done: Print a farewell message and exit the program. Otherwi: Indicate that a valid choice has not been entered. Print a farewell message and exit the program. To gain some addition (G.e. D, W ,B, X) using awitch statement. You may use if-else statements within the individual cases if you would like. practice, create two versions of your above program. One will model your menu options only if-else statements. One will model your menu options (i.e. D, W ,B, X) using a

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

Intelligent Information And Database Systems Third International Conference Achids 2011 Daegu Korea April 2011 Proceedings Part 2 Lnai 6592

Authors: Ngoc Thanh Nguyen ,Chong-Gun Kim ,Adam Janiak

2011th Edition

3642200419, 978-3642200410

More Books

Students also viewed these Databases questions

Question

What is the purpose of forecasting?

Answered: 1 week ago