Answered step by step
Verified Expert Solution
Question
1 Approved Answer
You will create a program to simulate an ATM banking machine. Your program will generate a random PIN code consisting of 4 digits, i.e.
You will create a program to simulate an ATM banking machine. Your program will generate a random PIN code consisting of 4 digits, i.e. 3270, 0063, 0917, etc. It will also generate a random available balance from 1000 - 20000 QAR. The user will be asked to enter his PIN code. He will be allowed 3 incorrect attempts before the program stops. If the PIN code is correct, the user will be shown a menu where he can choose one of the following actions: . check balance withdraw amount deposit amount When checking the user's balance, the program should print the actual balance. If the user chooses to withdraw an amount, the program will ask the user how much he wants to withdraw and then process the request by removing it from the balance and showing the new balance. If the amount is more than the available balance, the program will show an error message and ask the user to specify a new withdrawal amount. When the user chooses to deposit an amount, the program will ask the user to specify the deposit amount and then adds that amount to the available balance and show the new balance after deposit. Upon completing any of these operations, the user will be asked to choose a new operation if desired. You should presume that software users have no prior technical knowledge and might not always enter data inside the desired range. Ensure to provide assistive prompts to guide a new or confused user as to how the program is expected to work. Your programs should never terminate abruptly. You will create a program to simulate an ATM banking machine. Your program will generate a random PIN code consisting of 4 digits, i.e. 3270, 0063, 0917, etc. It will also generate a random available balance from 1000 - 20000 QAR. The user will be asked to enter his PIN code. He will be allowed 3 incorrect attempts before the program stops. If the PIN code is correct, the user will be shown a menu where he can choose one of the following actions: . check balance withdraw amount deposit amount When checking the user's balance, the program should print the actual balance. If the user chooses to withdraw an amount, the program will ask the user how much he wants to withdraw and then process the request by removing it from the balance and showing the new balance. If the amount is more than the available balance, the program will show an error message and ask the user to specify a new withdrawal amount. When the user chooses to deposit an amount, the program will ask the user to specify the deposit amount and then adds that amount to the available balance and show the new balance after deposit. Upon completing any of these operations, the user will be asked to choose a new operation if desired. You should presume that software users have no prior technical knowledge and might not always enter data inside the desired range. Ensure to provide assistive prompts to guide a new or confused user as to how the program is expected to work. Your programs should never terminate abruptly.
Step by Step Solution
★★★★★
3.40 Rating (153 Votes )
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started