Design a SavingsAccount class that stores a savings accounts annual interest rat
ID: 3620799 • Letter: D
Question
Design a SavingsAccount class that stores a savings accounts annual interest rate and balance. The class constructor should accept the amount of the savings accounts starting balance. The class should also have methods for substracting the amount of a withdrawal, adding the amount of a deposit, and adding the amount of monthly interest to the blance. The montly interest rate is the annual interest rate divided by twelve. To add the montly interest to the balance, multiply the montly interest rate by the balance and add the result to the blance.Test the class in a program tht calculates the blance of a savings account at the end of a period of time. it should ask the user for annual interest rate, the starting balance, and the number of months tht have passed since the acount was establisthed . a loop should then iterate once evry month perfomng the follwng:
a. ask the user for amount deposited in the account during the month.use the class method to add this amount to the account bal
b.ask the user for the amount withdrawn from the account during the month. use the class method to subtract this amount fro the acc bal
c.use the class method to calculate the monthly interest
after the last iteration, the program should display the ending balnce, the total amount of deposit, the total ambount of widthdrawals, the interest earned.