Question: Suppose you want to implement a class TimeDepositAccount. A time deposit account has a fixed interest rate that should be set in the constructor, together
Suppose you want to implement a class TimeDepositAccount. A time deposit account has a fixed interest rate that should be set in the constructor, together with the initial balance. Provide a method to get the current balance. Provide a method to add the earned interest to the account. This method should have no arguments because the interest rate is already known. It should have no return value because you already provided a method for obtaining the current balance. It is not possible to deposit additional funds into this account. Provide a withdraw method that removes the entire balance. Partial withdrawals are not allowed.
Step by Step Solution
3.40 Rating (159 Votes )
There are 3 Steps involved in it
Sure I can help you implement this class Heres how you might implement it in Python python class Tim... View full answer
Get step-by-step solutions from verified subject matter experts
