Problem Description: (The Account class) Design a class named Account that contains: A constructor that creates an accou
Posted: Tue Jul 12, 2022 8:04 am
Problem Description: (The Account class) Design a class named Account that contains: A constructor that creates an account with the specified private "id", "balance", and "annualInterestRate". A method named "withdraw" withdraws a specified amount from the account and checks if the amount is less than the balance or not. If the amount is less, it prints ("Not allowed. Withdraw a sum less than the balance.") A method named deposit that deposits a specified amount to the account. A method named getMonthlyInterestRate that returns the monthly interest rate *(by dividing it by the number of months in the year.). A method named getMonthlyInterest() returns the monthly interest *(by multiplying the balance by the MonthlyInterestRate). ▸ . The first try is free; after that, 5% for each try. For example: Test account Account(0, 0, 1.5) account.withdraw(2508) account.deposit(3000) print("ID is " + str(account.getId())) account withdraw(2508) print("Balance is " + str(account.getBalance())) print("Monthly interest rate is + str(account.getMonthlyInterest Rate())) print("Monthly interest is " + str(account.getMonthlyInterest())) Result Not allowed. Withdraw a sum less than the balance. ID is e Balance is see Monthly interest rate is 0.125 Monthly interest is 62.5