Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started