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

IN JAVA!!!! The goal of this program is to create an ATM interface. Create a new

ID: 3713811 • Letter: I

Question

IN JAVA!!!!

The goal of this program is to create an ATM interface.

Create a new class with a global variable of type double named balance.

Implement four ATM menu options:

Deposit - Increases the balance accordingly

Withdraw - Decreases the balance accordingly.

Show balance - Prints the balance to the user

Exit - Ends the ATM program

The functionality of all of these options, except for Exit, should be contained within a method.

The ATM should first welcome the user and display the input options. In order to specify an option, use Scanner to allow the user to enter the numbers 1, 2, 3, or 4, corresponding to the options Deposit, Withdraw, Show balance, and Exit, respectively.

The ATM should continue to prompt the user for an option (in the main) until the user decides to Exit (4) the ATM. If the user chooses 1 or 2, the ATM should prompt the user to input an amount to deposit or withdraw. If the user attempts to withdraw more money than they have, do not withdraw the money and instead print an error message.


Explanation / Answer

OUTPUT :

Welcome ot ATM
1.Deposit
2.Withdraw
3.Show Balance
4.Exit
1
Enter amount to deposit
120
1.Deposit
2.Withdraw
3.Show Balance
4.Exit
3
Balance is 120.0
1.Deposit
2.Withdraw
3.Show Balance
4.Exit
2
Enter amount to withdraw
40
1.Deposit
2.Withdraw
3.Show Balance
4.Exit
2
Enter amount to withdraw
90
Insuffecient funds
1.Deposit
2.Withdraw
3.Show Balance
4.Exit
3
Balance is 80.0
1.Deposit
2.Withdraw
3.Show Balance
4.Exit
4

Process finished with exit code 0

** Couldn't paste the screenshot because, output is huge