4. Create a method for “Bank” class: addAccount(self, account) – used to register an account to the bank # (Optional) You may add more methods for your convenience 4. Create 3 Account objects with the following attributes in the main method: account1 - id=(any number), name=(Any Name You Want), balance=7000 (strictly use this value) account2 - id=(any number), name=(Any Name You Want), balance= (any amount) account3 - id=12, name= Jose Rizal , balance= 25000 !(use these values for account3) # (Optional) You may add more objects if you want. 5. In the main method. Write a program that will act as an ATM. The ATM will prompt for account ID A menu for check balance, deposit, withdraw and exit shall display 6. Test your program with the following scenario: Output 1: Use Account 1 Check Balance Withdraw 2000 Exit (End Transaction) program will prompt another user id Output 2: Use Account 2 Deposit an amount of 500 Exit (End Transaction) program will prompt another user id Use Account 3 Check Balance Exit (End Transaction) program will prompt another user id

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter10: Introduction To Inheritance
Section: Chapter Questions
Problem 1GZ
icon
Related questions
Question
100%

4. Create a method for “Bank” class: addAccount(self, account) – used to register an account to the bank # (Optional) You may add more methods for your convenience

4. Create 3 Account objects with the following attributes in the main method: account1 - id=(any number), name=(Any Name You Want), balance=7000 (strictly use this value) account2 - id=(any number), name=(Any Name You Want), balance= (any amount) account3 - id=12, name= Jose Rizal , balance= 25000 !(use these values for account3) # (Optional) You may add more objects if you want.

5. In the main method. Write a program that will act as an ATM. The ATM will prompt for account ID A menu for check balance, deposit, withdraw and exit shall display

6. Test your program with the following scenario: Output 1: Use Account 1 Check Balance Withdraw 2000 Exit (End Transaction) program will prompt another user id Output 2: Use Account 2 Deposit an amount of 500 Exit (End Transaction) program will prompt another user id Use Account 3 Check Balance Exit (End Transaction) program will prompt another user id

6. Test your program with the following scenario:
Output 1:
Use Account 1
Check Balance
Withdraw 2000
Exit (End Transaction) program will prompt another user id
Output 2:
Use Account 2
Deposit an amount of 500
Exit (End Transaction) program will prompt another user id
Use Account 3
Transcribed Image Text:6. Test your program with the following scenario: Output 1: Use Account 1 Check Balance Withdraw 2000 Exit (End Transaction) program will prompt another user id Output 2: Use Account 2 Deposit an amount of 500 Exit (End Transaction) program will prompt another user id Use Account 3
4. Create a method for "Bank" class:
addAccount(self, account) – used to register an account to the bank
# (Optional) You may add more methods for your convenience
4. Create 3 Account objects with the following attributes in the main method:
accountl - id=(any number), name=(Any Name You Want), balance=7000 (strictly use this value)
account2 - id=(any number), name=(Any Name You Want), balance= (any amount)
account3 - id=12, name= Jose Rizal, balance= 25000
!(use these values for account3)
# (Optional) You may add more objects if you want.
5. In the main method. Write a program that will act as an ATM.
The ATM will prompt for account ID
A menu for check balance, deposit, withdraw and exit shall display
Transcribed Image Text:4. Create a method for "Bank" class: addAccount(self, account) – used to register an account to the bank # (Optional) You may add more methods for your convenience 4. Create 3 Account objects with the following attributes in the main method: accountl - id=(any number), name=(Any Name You Want), balance=7000 (strictly use this value) account2 - id=(any number), name=(Any Name You Want), balance= (any amount) account3 - id=12, name= Jose Rizal, balance= 25000 !(use these values for account3) # (Optional) You may add more objects if you want. 5. In the main method. Write a program that will act as an ATM. The ATM will prompt for account ID A menu for check balance, deposit, withdraw and exit shall display
Expert Solution
steps

Step by step

Solved in 3 steps with 6 images

Blurred answer
Knowledge Booster
Unreferenced Objects
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
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,