Answered step by step
Verified Expert Solution
Question
1 Approved Answer
1. Create a project named Bank YourLastName on Netbeans 2. Have a driver class named Driver which will have the main method 3. Create an
1. Create a project named Bank YourLastName on Netbeans 2. Have a driver class named Driver which will have the main method 3. Create an abstract class named Account in a separate file. It has the properties account number, balance, date created. It will also have the abstract methods deposit and withdraw. 4. Create a concrete subclass for checking account in a separate file. It will extend the Account abstract class. 5. Create a concrete subclass for savings account in a separate file. It will extend the Account abstract class. 6. Implement the following constructors for both checking and savings account classes. Constructors need to initialize the account number, balance and date created values A constructor that creates an account with the specified account number. A constructor that creates an account with the specified account number and balance. 7.Add the annual interest only to the savings account class 8. Add the accessor (get) and mutator (set) methods for an account number, balance, annual interest (only to savings account) 9.Add annual interest rate property to the savings account 10. Add the accessor method for date created 11. Add the following to the savings account A method that returns mountly interest rate by dividing the annual interest by 12 A method that returns monthly interest by multiplying balance and mountly rate. 12. Note that you need to implement the deposit and withdraw methods for the concrete classes. 13. Your driver class should do the followings: Declare a variable account of abstract Account type Ask the user if they would like to open a savings or checking account. Create and assign the object of the selected concrete account class to the previously declared abstract class variable. As the user how much does she/he want to deposit? Get the amount and deposit to the account. Check the class's object type using instanceof and if the type is a savings account class type, use the monthly interest method to print the balance for the next 12 months
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