
School of Engineering and Applied Science
Department of Computer Science
CSci 53 -- Introduction to Software Development
http://www.seas.gwu.edu/~csci53/spring04
Alice Armstrong
Project 4
due Tuesday 2/24/04
Specification:
Write an interactive application that will help the user keep track of their spending.
Your program
- must handle two types of accounts: checking and savings
- must provide three types of transactions: withdrawals, deposits, and transfers.
- is only required to handle at most one checking account and one savings account.
- does not need to handle two separate checking accounts or two or more savings accounts
- must be able to handle a user who only has a checking account or only has a savings account.
- must start by asking the user what type of accounts they have and the starting balances on those accounts.
- must use a sentinel-controlled loop that allows the user make as many transactions as they like.
- must print out a short report of the transactions on each account when the user is finished.
- must be as robust as possible. We have not discussed how to handle situations where you are expecting
an int and the user enters a String, but you should be able to handle the user not giving you a character
response the you were expecting. (e.g. 'y' instead of 'Y')
- must give the user a warning if the user finishes a session with a negative balance in their account.
- must not include information about two accounts if the user only has one.
Below is some sample output. You are free to design the user interface however you would like, but it must be clear
and easy to use.
Welcome to your personal banking system!
Do you have a checking account? (y/n)
>y
Great! What is the starting balance in your checking account?
>134.56
Thank you.
Do you have a savings account? (y/n)?
>Y
I'm sorry, I didn't understand that. Please enter y or n.
>y
Great! What is the starting balance in your savings account?
>2507.03
Here we go....
Enter:
D -> deposit
W -> withdrawal
T -> transfer
Q -> quit
>D
Which account? C -> checking, S -> savings
>C
Please enter the amount:
>123.40
Thank you!
Enter:
D -> deposit
W -> withdrawal
T -> transfer
Q -> quit
>Q
Summary:
CHECKING
Starting balance: 134.56
Ending balance: 257.96
SAVINGS
Starting balance: 2507.03
Ending balance: 2507.03
TRANSFER TOTALS
Checking to Savings: 0.00
Savings to Checking: 0.00
Goodbye!
(end of assignment)