121k views
2 votes
Your assignment this week you will build a CheckingAccount class and associated driver application. The class should contain appropriate attributes that you would find in a normal checking account: name, address, accounts number, balance, etc

The balance should be "private" to the class since it should only be changed through appropriate debit/credit methods. Recall, you can simulate the private aspect using the _ character at the start of the variable name.

The class should be saved in a file called CheckingAccount.py

Build a driver application that instantiates a Checking Account object and performs a variety of debits and credits as well as prints the balance as appropriate.

User Pragya
by
5.9k points

1 Answer

3 votes

Answer:

This answer is made up of two code:

1. Checking Account. py- It consists of the Checking Account object, which stores and performs different aspects of the account.

2. driver. py- This is the code that initializes and maintains the object. It can also print the balance, name of the account holder, address of the account. It can also do debit and credit operations on the go.

Please look at attachment for code and output screenshot.

Your assignment this week you will build a CheckingAccount class and associated driver-example-1
Your assignment this week you will build a CheckingAccount class and associated driver-example-2
User David Bronn
by
5.7k points