Write a program that will be an automated teller machine


Problem:

Question: Write a program that will be an Automated Teller Machine (ATM). It will allow a customer to log in with a PIN number, check the PIN, and then allow the customer to withdraw money up to the balance in their account. The customer may also deposit money, and that money should be added to the current balance.

Since the program will not read from a database, declare 2 variables called MyPIN and MyBalance. Set these 2 variables to 1234 and 2,000.00 respectively.

Case 1: When the program runs, ask for the PIN. Whatever input they type in, compare against MyPIN and only allow withdrawals or deposits if they are equal.

Case 2: Give a short menu to the customer after the PIN is succesfully entered.

Case 3: For example, 1. Withdrawal, 2. Deposit, 3. Log off.

Case 4: Only allow the 3 options. Repeat the menu if incorrect.

Case 5: When withdrawing, ask for the amount. Verify that that amount can be withdrawn, then "pretend" to give them the cash. Deduct from the current balance.

Case 6: When depositing, ask for the amount. Make sure it is a valid amount. "Pretend" to let them deposit the money. Add to the current balance.

Case 7: When the transaction is completed, show the menu again.

Case 8: It is ok for the balance to be reset each time the program is run.

Show the code, demonstrate it works properly and describe what it is doing.

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: Write a program that will be an automated teller machine
Reference No:- TGS0891458

Expected delivery within 24 Hours