Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Problem 1) Write a MATLAB script that would simulate a user-interface for an Aut

ID: 3602239 • Letter: P

Question

Problem 1) Write a MATLAB script that would simulate a user-interface for an Automated Teller Machine (ATM). When it first executes, it should ask the user to enter a PIN. You may have this PIN stored as a variable in the system. If the user fails to enter the PIN correctly in 3 attempts, it should inform the user that the bank card they have entered is being destroyed, ending the program/loop. After entering the correct PIN, it should then present the user with options to 1) Deposit Funds 2) Withdrawal Funds 3) View Balance 4) Exit Note - use a switch/case structure for this section. You may want to use fprintf and input combined to make a menu with descriptions as above. Each selection should then allow the user to input an amount of money to add/subtract from their balance based on user inputs... or view the balance.

Explanation / Answer

Ans: According to question,the program is as follows:

Public class Transaction{

static void Main(string[] args){

int n=0; int pin=1234;

Console.WriteLine("Please enter your pin:"+n);

Console.ReadLine();

while(n!=pin)

{

int count=1;

count++

}

if(count==3)

{

Console.WriteLine("Incorrect pin,You have already exceeded the limit to enter pin");

return;

}

else{

switch(option)

case 1: Deposit(); break;

case 2 : Withdrawal(); break;

case 3: ViewBalance(); break;

case 4:Exit();break;

}

}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote