Please write code in JAVA Step 1: An Account class stores a current balance, and provides getBalance, deposit, withdraw, and toString methods in addition to at least one constructor. Add an account class to the project. Step 2: A CheckingAccount class extends the Account class and has additional attribute overdraft limit and additional method chequeDeposit. Implement the CheckingAccount class in the project. Make sure you add a constructor to the class. Step 3: Override the toString method in the CheckingAccount class to add the overdraft limit as well to the returned string. Step 4: A SavingsAccount class extends the Account class and has additional attribute interest rate and a method named addInterest to calculate and add the interest to the account. Implement the SavingsAccount class in the project. Implement the SavingsAccount class in the project. Make sure you add a constructor to the class. Step 5: Add a test class named AccountTester to the project and implement a main method in the AccountTester class. Inside the main method, create an account array object (of size between 5 and 10) and add Account objects, SavingsAccount objects and CheckingAccount objects (at lease one from each type) to the array. Print the return value of the toString method of each object in the account array.
Please write code in JAVA
Step 1: An Account class stores a current balance, and provides getBalance, deposit, withdraw, and toString methods in addition to at least one constructor. Add an account class to the project.
Step 2: A CheckingAccount class extends the Account class and has additional attribute overdraft limit and additional method chequeDeposit. Implement the CheckingAccount class in the project. Make sure you add a constructor to the class.
Step 3: Override the toString method in the CheckingAccount class to add the overdraft limit as well to the returned string.
Step 4: A SavingsAccount class extends the Account class and has additional attribute interest rate and a method named addInterest to calculate and add the interest to the account. Implement the SavingsAccount class in the project. Implement the SavingsAccount class in the project. Make sure you add a constructor to the class.
Step 5: Add a test class named AccountTester to the project and implement a main method in the AccountTester class. Inside the main method, create an account array object (of size between 5 and 10) and add Account objects, SavingsAccount objects and CheckingAccount objects (at lease one from each type) to the array. Print the return value of the toString method of each object in the account array.
Trending now
This is a popular solution!
Step by step
Solved in 2 steps