Question: You are to read in records one at a time from the two files and use the transaction file records to update the master file.

You are to read in records one at a time from the two files and use the transaction file records to update the master file. Process all transaction records for each master record before going on to the next master record. 

 

If the transaction record contains an "O" in column 1 calculate the order amount and add it to the balance due.

 

 If the record contains a "P" in Column 1 subtract the payment from the balance due. 

 

Keep a running total of the A/R Balance of ABC Company (that is the sum of the balances due for each customer). 

 

Your program should 

 

Check for errors such as duplicate master records or records in the transaction file with a customer number that does not appear in the master file.

 

After processing a master record and all its transaction records prepare an invoice for each customer which lists on top the customer name and number, a line depicting the previous balance (the original balance in the master record before any transactions) followed by the transactions and the a balance due. 

 

It should look like this

 

Customer Name     Customer Number

 

                                                Previous Balance     $xxxxxxxxxx.xx

 

transaction number                   item ordered          order amount

transaction number                   item ordered          order amount

transaction number                   payment               payment amount

transaction number                   item ordered          order amount

 

                                                Balance Due          $xxxxxxxxx.xx

 

 

Don't forget payments reduce balances orders increase balances. You are to create your own data using at least 7 to 10 customers with an average of 4 to 5 transactions each.

 

Step by Step Solution

3.42 Rating (161 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

1 transactionjava package abccompany abstract type class public abstract class Transaction int transactionnumber transaction number constructor public Transactionint transactionnumber super thistransa... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!