Question: For this programming assignment, you will simulate a bank's automated teller machine (ATM) that allows for deposits, withdrawals, and balance inquiries. An input file (named
For this programming assignment, you will simulate a bank's automated teller machine (ATM) that allows for deposits, withdrawals, and balance inquiries. An input file (named balances.txt) contains the account balances of twenty (25) customers; these values must be read into an array. You will create a menu-driven program that will allow the customer to deposit an amount, withdraw an amount, and/or view the account's balance. Your program will contain at least three (3) user-defined functions with the following names and descriptions: deposit: Prompts the user for the account number (i.e., a number between 1 and 25) and the amount to deposit; updates the customer's balance. The deposit amount must be at least $5. withdrawal: Prompts the user for the account number (i.e., a number between 1 and 25) and the amount to withdraw; updates the customer's balance. If the customer's balance is less than the $25 minimum balance requirement, the program notifies the user and does not allow the withdrawal. displayBalance: Displays the customer's account number and balance. If the customer's balance is less than the $25 minimum balance requirement, the program notifies the user that withdrawals are not allowed until the balance reaches $25. Once the user is ready to quit the program, your program will write to an output file (named
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
