Python Class and Objects Create a class named "Account" and “Bank” The class “Account” should have a parameter of  id   - integer type name - string type balance - float type # (Optional) You may add more parameters for your convenience     3. Create a method for “Account” class:  checkBalance(self)    -  this will show the Account's remaining balance or money withdraw(self, amount)   - this will withdraw an amount from the Account deposit(self, amount) - this will deposit an amount from the Account # (Optional) You may add more methods like sendMoney() etc.     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

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

Python Class and Objects

  1. Create a class named "Account" and “Bank”
  2. The class “Account” should have a parameter of 

id   - integer type

name - string type

balance - float type

# (Optional) You may add more parameters for your convenience

   

3. Create a method for “Account” class

checkBalance(self)    -  this will show the Account's remaining balance or money

withdraw(self, amount)   - this will withdraw an amount from the Account

deposit(self, amount) - this will deposit an amount from the Account

# (Optional) You may add more methods like sendMoney() etc.

   

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

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 4 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY