Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Readings In Database Systems

Authors: Michael Stonebraker

2nd Edition

0934613656, 9780934613651

More Books

Students also viewed these Databases questions