Breaking News: Grepper is joining You.com. Read the official announcement!
Check it out

Challenge 1: Implement a Banking Account

Sumit Rawal answered on May 17, 2023 Popularity 1/10 Helpfulness 1/10

Contents


More Related Answers


Challenge 1: Implement a Banking Account

0

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! 

Popularity 1/10 Helpfulness 1/10 Language python
Source: Grepper
Link to this answer
Share Copy Link
Contributed on May 17 2023
Sumit Rawal
0 Answers  Avg Quality 2/10


X

Continue with Google

By continuing, I agree that I have read and agree to Greppers's Terms of Service and Privacy Policy.
X
Grepper Account Login Required

Oops, You will need to install Grepper and log-in to perform this action.