Virginia Tech Computer Science Department
Tom Plunkett
tplunket@csgrad.cs.vt.edu
Existing Software Program: The BankAccount Class
Textbook P.321-326, Display 6.5
Requirements
Due Date: Please email all deliverables to me by 7:00 PM, Thursday, June 17.
Overview: Our users want several enhancements to the existing program.
1)The users want the public member function "update" to have a parameter of type double. The number will be the number of days since the last time update interest was run on this account. Instead of calculating the new balance by saying new_balance=(1+interest)*old_balance, the formula should now be new_balance=(1+((interest*days)/365))*old_balance. For purposes of this program, you can ignore leap year calculations.
2)The users want new public member functions, "deposit" and "withdraw." Deposit increases the balance and withdraw reduces the balance. These functions should have two parameters of type double. One parameter is the amount of money to be added or removed, the other is the number of days since update has been run. These functions should call update based on the number of days, before depositing or withdrawing their respective amounts.
3) The main function should be modified to appropriately test the new functionality.
4) Deliverables to be submitted include: source code file, testcase files (both input & output), and a ms word file describing details of your modification process.
5) Please insert all appropriate comments into your source code.
6) You should list the following items in your description of the time spent on this project and the class in general:
a) Time spent planning your code change
b) Time spent modifying the code
c)Time spent testing the code
d)Time spent writing up your results
e)Time spent on reading the textbook (for the week)
f)Time spent on doing problems in the book and working through examples in the book with a compiler (for the week)
7) Your documentation should list all functions in the program and your justification for modifying them or not modifying them.
8) You should also list other alternative methods to modify the code and why you chose against them.
9) Please also mention any unresolved difficulties you encountered in modifying the software code or reading the textbook. A resolved difficulty is one where you ran into something while working on a task and later found out how it works. An unresolved difficulty is where you ran into a problem and avoided the subject matter to complete the task.
Software Code