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. We are expecting you to follow the naming conventions taught in class.
Your assignment is to (using TDD of course) develop a Bank that allows for account management.
Specifically, you can 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.
Examples: 12345678, 00000001, 89456185
• An APR value from 0 to 10. APRs can have decimal values.
Examples: 0, 0.3, 3, 5.7, 7.9, 9.8, 10.
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.