An account has the properties account number, balance, annual interest rate, and date created, and methods to deposit and withdraw funds. Create two subclasses for checking and saving accounts. A checking account has an overdraft limit, but a savings account cannot be overdrawn. Write a test program that creates objects of Account, SavingsAccount, and CheckingAccount and invokes their toString() methods. The test (main) program should create a SavingsAccount object with ID 1122, a balance of 20000 and an annual interest rate of 4.5%. It should also call the withdraw method to withdraw 5000 and the deposit method to deposit 10000. The account information should be printed after each transaction with the interest computed before the first transaction. The test program should also create a Checking account with ID 1271, a balance of 150, an annual interest rate of 1.25% and an overdraft of 200. A withdrawal of 300 and a deposit of 500 should be processes with the interested credited before the first transaction.
Ask Your Question
We have verified professionals who are ready to answer your question.
Save Time and Money
We choose experts who can quickly answer your question and that suit your budget.
Get Your Answer
Your satisfaction is 100% guaranteed. You can keep on asking questions until you get the answer you need.