Question: using python 1) a) Define a class named Account and its subclass checkingAccount. Both of the classes take balance and accountHolder as arguments and have
using python
1)
a) Define a class named Account and its subclass checkingAccount. Both of the classes take balance and accountHolder as arguments and have deposit method. This deposit method manages the deposit actions. In class Account, when a deposit is done, it prints 'Thank you' and in checkingAccount, when a deposit is done, it prints 'Salary. Also, define a class variable called interest whose value is 0.02.
b) Create two objects : one for class Account, the other for class checkingAccount. Class Account : batman and the balance is 0 Checking Account : superman and balance is 100 Deposit 30 dolar to each classes and print the balance for each one. (10 points)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
