Question: Done in .Java In this project, you need to modify SavingsAccount.java to implement the following items: - add member variables with proper types: nextId ,
Done in .Java


In this project, you need to modify SavingsAccount.java to implement the following items: - add member variables with proper types: nextId , id , openingDate , balance , interestRate ; Notice represents a percentage, for example, if interestRate is 4.5, it means 4.5%; - add a constructor that takes three parameters: name, balance, and interestRate; - add member functions: getters for id, openingDate, balance; getters and setters for interestRate; - add member function: calculateMonthlyInterest(), this method should calculate the interest amount for one month based on the it returns the interest; - add member function: updateBalanceWithInterest (), this method should update balance based on the monthly interest; - add member function credit() method to deposit a certain amount in the checking account. - add member function debit() method to withdraw a certain amount from the checking account. If there is no enough money in the account, display an error message: no enough balance. 3456789181112importjava,math.BigDecimal;importjava.time.LocalDate;importjava.util.Random;publicclassSavingsAccount{//Tooo:createmembervariables,constructors,andmemberfunctions:}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
