Question
Using Python 3.1.1 create the following: Create a class called Bank Account (bankaccount.py) The class should have the following: persons name and account balance The
Using Python 3.1.1 create the following:
Create a class called Bank Account (bankaccount.py)
The class should have the following:
persons name and account balance
The class should have two methods:
A method that receives a deposit, and thenadds that amount to the customer's balance and a method that receives a withdrawal and subtracts that withdrawal from the customer's balance
Create another file (bankApp.py) which is where your program logic goes.
Create two Bank Account objects, assign them a customer name and opening balance. For customer object #1: use the withdrawal method to deduct $50 from the account balance and print out the name and the new balance. For customer object #2: use the object's deposit method to add $150 into the account balance. Print out customer object #2's name and new balance.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started