Define an abstract superclass named BankAccount that provides the basic behaviors for a bank’s checking and savings accounts. All accounts have an account number and a current balance, and they all...


Define an abstract superclass named BankAccount that provides the basic behaviors for a bank’s checking and savings accounts. All accounts have an account number and a current balance, and they all provide for deposits and withdrawals. Define the classes CheckingAccount and SavingsAccount, each of which extends BankAccount. Also define the class BonusSaverAccount, which extends SavingsAccount.


Assume that checking accounts do not pay interest but do have overdraft protection. A savings account pays interest at a certain rate. A bonus savings account pays a bonus in addition to the interest a regular savings account pays, as long as the balance is higher than a certain given amount. This account also charges a fixed penalty for every withdrawal from the account. Write a client that demonstrates your classes.



May 18, 2022
SOLUTION.PDF

Get Answer To This Question

Submit New Assignment

Copy and Paste Your Assignment Here