ABC Hardware Company” has hired you to write a JAVA program for it’s Accounts Receivable department (AR are accounts that owe ccounts that owe money to the company because they have purchased items and have not yet paid for them)

There are two types of input data

1) A master file in ascending order by customer number (customer numbers are 4 digits long).

The file also contains a 20 character customer name and a balance due.

2) A transaction file that contains records of each transaction.

This file is also in ascending order by customer number There should be more than one transaction record per master record. Each related group of data in a fle b called a record. A record should be stored in a structure.

Each record starts with a character, “O* for order or “P for payment. Each record also contains the tour-digit customer number, a four-digit transaction number, and up to three more values:

If the code is “O”, the record contains the ltem ordered (20 characters), the quantity ordered (an integer) plus the cost of the item. (You must multiply to get the total cost)

If the code is “P”, the record contains the amount of the payment You are to read in records one at a time from the two files and use the transaction file records to file. Process all transaction records transaction record contains a “P” in column 1, subtract the payment from the balance due. K Balance of ABC Company (That is the sum of the balances due for each customer. transaction file records to update the master the next master record. If the for each master record before going on to record contains an “O” in column 1, calculate the order amount and add it to the balance due. If 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 that do not appear in the master file.

After processing a master record and all It’s transactions the program should which lists the customer name, number, previous balance (balance before transactions were performed) transactions, and the final balance due (balance after transactions are prepare an invoice for each customer all performed.

Dont forget, payments reduce the balance and orders increase it. You are to create your own customers with an average of 5 transactions each. Test 7 customers

please write the program in Java, thank you

Source link

Leave a Reply

Your email address will not be published. Required fields are marked *