Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Problem 6 (20 points): MATLAB script-6 Write a program for the interface of a simple ATM When the user start the program, ask them to

image text in transcribed
Problem 6 (20 points): MATLAB script-6 Write a program for the interface of a simple ATM When the user start the program, ask them to input their checking account balance in a viable Catand their savings account balance in Seal These inputs will be used to calculate two variables New Cal and New Balcontaining the checking and savings balances after the transaction is completed. The script should do the following Display a mena titled "Main Menu with the following the optione Get cash Giet balance - 01 If "Get cash is selected, another menetidled Withdrawal on with the following four items is displayed: 0520 O S40 S100 $200 . . After selecting an amount, u menu titled "From which account should be displaced showing the following 2 options Checking Savings . At this point, the program should verify that the selected account contains sufficient funds for the requested withdrawal. If not, a message should be displayed this ways. "Sorry. You do not have sufficient funds in your SSSS account to withdraw XX where SSSS is either Savings or Checking and SXX is the selected withdrawal amount. Then the program should terminate If funds are available, the program should calculate then print un fprintf statement that tells the user how many $20 bills were dispensed "Get balance" is selected, another menu titled "Which account should appear with 2 choices O Checking Savings Then the program should display "Your SSSS balances Shbbb." where SSSS is either Checking of Savings and Sbb bb is the balance in the selected account After processing the "Get cash" or "Get balance request, the program should return to the main menu If quit is selected, the script should retum the current balances New Cal and New Bal If the user closes the menu rather than making a selection, warning message should be displayed and the ser given 2 more chances to make a selection from that menu. If they still close the menu on the 3 simptan error message should be displayed that says the program has been terminated

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

Step: 3

blur-text-image

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

More Books

Students also viewed these Databases questions