SDSU CS 535 Object-Oriented Programming
Spring Semester, 2003
Assignment 8
    Assignment Index        
© 2003, All Rights Reserved, SDSU & Roger Whitney
San Diego State University -- This page last updated 23-Apr-03

Assignment 8
Due May 15, 7:00 pm

1. Modify the BankAccount class from assignments 2, 4 and 5 to use Money rather than FixedPoint numbers. This means that the balance is a money object. Deposits and withdrawals are done using money objects. Users deposit or withdrawal amounts in the currencies from assignment 6. When an account is created its currency is set. The balance is always in this currency.

2. Banks record all transactions. A transaction contains the amount of the transaction (as money in the original currency of the transaction), the account the money is coming from and the account the money is going to, the date and time of the transaction (see Timestamp class>>now) and a transaction ID. Each transaction has it own unique id. When a transaction is done, both accounts are modified. All transactions must have two valid accounts. When a transaction is undone, both accounts are modified, using the currency rates that were in effect when the transaction was originally done. It must be possible to obtain a list of transactions for an individual account. This allows the account owner to view information about past activity in the account.

3. We need the ability to manage bank accounts and transactions. This involve creating accounts, listing existing accounts, creating and performing transactions between accounts, listing transactions in an account, listing all transactions, and undoing transactions. While it would be nice to have a GUI for all this, time does not permit it.

4. The image is a handy place to store data. When you save the image all data in the image is stored. There are several problems with relying on the image to store data. First, if the image file becomes corrupted you lose the data. Second, if the data is accessible only in one place. It would be hard to allow multiple tellers in a bank access accounts at the same time. Ideally we would store the accounts, transactions, etc in a database, but time is short. So we will store the bank data (accounts, transactions and other data you might have) in a file. When you start a session the data is read from the file. When you end a session the data is saved to a file.

Grading

Item
Points
Unit Tests
5
Names & Formatting
5
Structure of code
10
Part 1
5
Part 2
10
Part 3
10
Part 4
5


Copyright ©, All rights reserved.
2003 SDSU & Roger Whitney, 5500 Campanile Drive, San Diego, CA 92182-7700 USA.
OpenContent license defines the copyright on this document.

    visitors since 23-Apr-03