Question: You have been asked to create a program for a Bank to process a set of transactions (i.e., deposit and withdraw) against a set of
You have been asked to create a program for a Bank to process a set of transactions (i.e., deposit and withdraw) against a set of accounts, and produce a statement for each account. Input to the program will be two files one containing a list of accounts and the other a list of transactions. On file is text the other binary. Output will be a report to standard out. The format of each file is as follows:
Accounts.txt a text file containing a set of records in a csv format. Each record represents an account. The format of a record is:
Fields
Description
Account number
Digits
First name
String of characters
Last name
String of characters
Balance
Digits with decimal point and two fractional digits
Transactions.dat a binary file containing a set of records. Each record represents an account. The format of a record is:
Fields
Description
Account number
4 byte twos complement
Date
1 byte twos complement for month, followed by 1 byte twos complement for day, followed by 2 bytes twos complement year
Type
1 byte ASCII either D for deposit or W for withdraw
Amount
Double precision floating point
In addition, the program is to output the updated accounts to a new file in the same format as the input.
Your program must pass the file names on the command line. In the event the files are not passed on the command line, then ask the user to enter the file names for the accounts, transaction, and new accounts files. Using those files, the program will process the transactions, print the statement report and write the new accounts file. A sample output of the statement report is as follows:
Bank Statement
Account No : 73829123
Account Name : Bill Smith
Beginning Balance : $ 1,030.50
Ending Balance : $ 1,018.28
**Transaction Detail**
Date Type Amount Balance
10/12/09 Withdraw $ 500.00 $ 530.50
10/13/09 Withdraw $ 300.00 $ 230.50
10/14/09 Deposit $ 1,287.78 $ 1,518.28
10/15/09 Withdraw $ 500.00 $ 1,018.28
Bank Statement
Account No : 73829999
Account Name : Mary Jones
Beginning Balance : $ 3,000.89
Ending Balance : $ 3,500.89
**Transaction Detail**
Date Type Amount Balance
10/16/09 Deposit $ 500.00 $3,500.89
programing type java
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
