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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!