Problem statement
Implement the basic structure of a parent class, Account, and a child class, SavingsAccount.
Task 1
Implement properties as instance variables, and set them to None or 0.
Account has the following properties:
title
balance
SavingsAccount has the following properties:
interestRate
Task 2
Create an initializer for Account class. The order of parameters should be the following, where Mark is the title, and 5000 is the account balance:
Account("Mark", 5000)
Task 3
Implement properties as instance variables, and set them to None or 0.
Create an initializer for the SavingsAccount class using the initializer of the Account class in the order below:
Account("Mark", 5000, 5)
Here, Mark is the title and 5000 is the balance and 5 is the interestRate.
Based and derived classes structure
Coding exercise
Design a step-by-step algorithm before trying the implementation. This problem is designed for your practice, so initially, try to solve it on your own. If you get stuck, you can always refer to the solution provided in the next lesson.
Good luck!