There are two kinds of bank accounts: checking and savings. You can deposit to (i.e. add money
Question:
There are two kinds of bank accounts: checking and savings. You can deposit to (i.e. add money in) or withdraw (i.e. take money out) from an account. A checking account can be withdrawn with an unlimited number of times. A savings account can only be withdrawn at most N times per calendar month. Checking accounts have no monthly fee. Savings accounts have a fixed monthly fee X. But if you deposit at least a money amount of M each month, that fee is waived. You cannot overdraft (take out more money than the current balance) a savings account. For a checking account, if you overdraft, you will have to pay an overdraft fee.
1. Design 3 classes: Account, CheckingAccount, and SavingsAccount
2. Determine the fields and methods of each class.
3. Implement the methods to deposit and withdraw.