Read transactions from multiple files simulatenously
Posted on 2004-04-10
write a Java program that manages a simple checking account.
There are 2 simple transactions: deposit and withdrawal. Both transactions come from a simple text file with the following columns: customer_last_name, branch, branch_account_number, transaction, amount. For example:
Silver 1000 001 withdrawal 20
Smith 1001 001 withdrawal 40
Black 1000 002 deposit 20
Bush 1003 005 deposit 100
Silver 1000 001 withdrawal 40
Note that branch_account_number is only unique within a branch!
Your program should be able to read transactions from multiple files simultaneously (think how you are going to protect the integrity of your data). The program should execute the transactions, maintaining the right balances. You may hardcode the number of input files (where transactions are stored). You do not have to remember the exact syntax of file operations, etc. Make reasonable assumptions. Remember that file i/o may fail, you have to handle exceptions gracefully.