Create class SavingsAccount. Use a static variable annualInterestRate to store the annual interest rate for all account holders. Each object of the class contains a private instance variable savingsBalance indicating the amount the saver currently has on deposit. Provide method calculateMonthlyInterest to calculate the monthly interest by multiplying the savingsBalance by annualInterestRate divided by 12- this interest should be added to savingsBalance. Provide a static method setInterestRate that sets t

Respuesta :

Answer:

Class SavingsAccount( ):

annual_interest_rate

def.__init__(self, savings_balance):

self.savingsBalance = savings_balance

def calculatMonthlyInterest( ):

self.savingsBalance += (self.savingsBalance * annual_interest_rate) /12

return self.savingsBalance

def setInterestRate_(self, value):

self.annual_interest_rate = value

Explanation:

The python class above is used to create a savings account data for a customer, with methods to change the static interest rate and to calculate the monthly interest rate.