Create a Java program for the transaction of an ATM. The main class is responsible for allowing the user to choose the type of transaction. Create another class named Account that is responsible for the following methods: o checkBal() – it displays the current balance o deposit() – ask input from the user to be added to the balance o withdraw() – ask input from the user to be deducted from the balance sample output is in the picture

Programming with Microsoft Visual Basic 2017
8th Edition
ISBN:9781337102124
Author:Diane Zak
Publisher:Diane Zak
Chapter11: Sql Server Databases
Section: Chapter Questions
Problem 3E
icon
Related questions
Question
100%

Create a Java program for the transaction of an ATM. The
main class is responsible for allowing the user to
choose the type of transaction. Create another class named Account
that is responsible for the following methods:
o checkBal() – it displays the current balance
o deposit() – ask input from the user to be added to the balance
o withdraw() – ask input from the user to be deducted from the balance

sample output is in the picture

Spesi fy Transaction
Specify Transaction
[2] Deposit Amount
run:
(1] Check Balance
[3] Withdraw Amount
[4] End Transaction
[2] Deposit Amount
Specify Transaction
Pressed the no. of choice: 3
[3] Withdraw Amount
(1] Check Balance
Enter the amount to withdraw: 1200
[4] End Transaction
[2] Deposit Amount
Pressed the no. of choice: 2
Specify Transaction
[3] Withdraw Amount
Enter the amount to deposit: 500
(1] Check Balance
[4] End Transaction
[2] Deposit Amount
Pressed the no. of choice: 1
[3] Withdraw Amount
t41 Fnd
Specify Transaction
Current Balance: 0
[4] End Transaction
[1] Check Balance
Pressed the no. of choice: 1
[2] Deposit Amount
Specify Transaction
Current Balance: 300
[3] Withdraw Amount
e
[1] Check Balance
[4] End Transaction
Specify Transaction
[2] Deposit Amount
Pressed the no. of choice: 1
(1] Check Balance
[3] Withdraw Amount
[2] Deposit Amount
[3] Withdraw Amount
Current Balance: 1500
[4] End Transaction
[3]
Pressed the no. of choice: 2
[4] End Transaction
Specify Transaction
Pressed the no. of choice: 6
Enter the amount to deposit: 1000
(1] Check Balance
Please input correctly from 1-4.
[2] Deposit Amount
Specify Transaction
ene ennee
Specify Transaction
[3] Withdraw Amount
(1] Check Balance
[2] Deposit Amount
[3] Withdraw Amount
(1] Check Balance
[4] End Transaction
[2] Deposit Amount
Pressed the no. of choice: 3
[3] Withdraw Amount
Enter the amount to withdraw: 2000
[4] End Transaction
[4] End Transaction
Insufficient funds
Pressed the no. of choice: 4
Pressed the no. of choice: 1
BUILD SUCCESSFUL (total time: 53 seconds)
Current Balance: 1000
Transcribed Image Text:Spesi fy Transaction Specify Transaction [2] Deposit Amount run: (1] Check Balance [3] Withdraw Amount [4] End Transaction [2] Deposit Amount Specify Transaction Pressed the no. of choice: 3 [3] Withdraw Amount (1] Check Balance Enter the amount to withdraw: 1200 [4] End Transaction [2] Deposit Amount Pressed the no. of choice: 2 Specify Transaction [3] Withdraw Amount Enter the amount to deposit: 500 (1] Check Balance [4] End Transaction [2] Deposit Amount Pressed the no. of choice: 1 [3] Withdraw Amount t41 Fnd Specify Transaction Current Balance: 0 [4] End Transaction [1] Check Balance Pressed the no. of choice: 1 [2] Deposit Amount Specify Transaction Current Balance: 300 [3] Withdraw Amount e [1] Check Balance [4] End Transaction Specify Transaction [2] Deposit Amount Pressed the no. of choice: 1 (1] Check Balance [3] Withdraw Amount [2] Deposit Amount [3] Withdraw Amount Current Balance: 1500 [4] End Transaction [3] Pressed the no. of choice: 2 [4] End Transaction Specify Transaction Pressed the no. of choice: 6 Enter the amount to deposit: 1000 (1] Check Balance Please input correctly from 1-4. [2] Deposit Amount Specify Transaction ene ennee Specify Transaction [3] Withdraw Amount (1] Check Balance [2] Deposit Amount [3] Withdraw Amount (1] Check Balance [4] End Transaction [2] Deposit Amount Pressed the no. of choice: 3 [3] Withdraw Amount Enter the amount to withdraw: 2000 [4] End Transaction [4] End Transaction Insufficient funds Pressed the no. of choice: 4 Pressed the no. of choice: 1 BUILD SUCCESSFUL (total time: 53 seconds) Current Balance: 1000
Expert Solution
steps

Step by step

Solved in 5 steps with 3 images

Blurred answer
Knowledge Booster
Developing computer interface
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning
Oracle 12c: SQL
Oracle 12c: SQL
Computer Science
ISBN:
9781305251038
Author:
Joan Casteel
Publisher:
Cengage Learning
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage