Banking System
This assignment asks you to implement a Bank with Accounts, while practicing and demonstrating both basic OOP design and TDD, while using the plugins we set up in week 1 lab. Follow the naming conventions taught in class.
Your assignment is to (using TDD of course) develop a Bank that allows for account management.
Specifically, create accounts, deposit money into accounts, and withdraw money from accounts.
There are three different account types:
Checking
Savings
Certificate of Deposit (CD)
All 3 account types are created with:
A unique 8-digit ID.
An APR value from 0 to 10. APRs can have decimal values.
Checking and Savings accounts are created with a balance of 0 every time. CD accounts are created with a specified balance. That is, if we say to create one with a balance of $1000, its balance will be $1000 when it’s created. CD accounts can’t be created without a specified balance. Similarly, Checking and Savings accounts can’t be created with a specified balance – they will always start at $0.
Balances should support decimal values. Creating a CD account with $2005.54 is valid.
Depositing money into an account adds money to the balance in that account. Don’t deposit negative values. Depositing decimal values is supported.
Withdrawing money from an account removes money from the balance in that account. Don’t withdraw negative values. Withdrawing decimal values is supported.
Special rule: if you try to withdraw more money than is in the account, the account’s balance goes to 0. For example, if an account has $100 and you withdraw $200 from it, the balance should be $0.