Help! Stuck

So basically I have no idea what to do for this. My teachers assigned this as our final project and it is way harder than anything we did in the class up to this point and when we ask questions they direct us to google. PLEASE HELP!!!! Input files are at the bottom. Thanks to anyone who helps.
( I hope this makes since to someone. Also, I typically use Visual studio as a compiler)


Input Files: Master.txt, Transaction.txt
Output Files: Updated_Master.txt, Error_Log.txt, Account_Report.txt, Archived_Master.txt
File Formats:
Master.txt will contain customer records of the following format:

cust_ID LName FName Balance Limit Status

For example,

100A100 Jones Betsy 234.56 1000 O

Legitimate Status values are O for on time accounts, P for past due accounts, S for suspended accounts, and H for accounts on hold. If the account has status S, verify that the limit is zero and if it is not, change the limit to zero. If the account is status H, update the status to O if at least 50% of the current balance is paid with an E transaction.

All correct cust_ID values will have the format digit/digit/digit/letter/digit/digit/dig…

A cust_ID value that does not follow this format indicates an error and should initiate a write to the Error_Log.txt file.

Some special methods are needed to efficiently determine if the cust_ID is of the correct format.

Suppose we have the following declaration and initialization  string str1 = “100A300”,

Then str1.length(); gives the length of the string and str1.at(i) is the char of the string that is at index i. So in this example str1.length() would equal 7 and str1.at(4) would equal 3.

Additionally, you will need some char methods that can be easily used by studying the information at this web site: http://fredosaurus.com/notes-cpp/strings/header-cctype.html

The Master.txt file will be sorted in ascending order by cust_ID.

Transaction.txt will contain three legitimate types of records – those beginning with an A, a D, or an E. These letters signify, respectively, the commands Add, Delete, or Edit. Any other initial character in a record from this file indicates an erroneous command and should initiate a write to the Error_Log.txt file.

If the record is of type A, the A should be followed by a complete customer record. This record should be inserted into the Master file in order. If a complete record does not follow, an error has occurred.

If the record is of type D, the D should be followed by a cust_ID only. The customer record with this ID should be deleted from the Master file.

If the record is of type E, the E should be followed by a complete customer record with some valid data and some placeholder data. There should always be a valid cust_ID as the first data item following a type of E. Placeholders will be zzz for string fields, z for char fields, and -9999 for numeric fields. If there is valid data, the corresponding record number in the Master file should be updated with this data. If there is placeholder data, the current record values should be retained.

The transaction file needs to be sorted by cust_ID but be certain that the order of records for a given cust_ID is not inadvertently swapped.

The output files include:
Updated_Master.txt – Master file altered by Transactions

Error_Log.txt – Any and all problems that arise are reflected here

Account_Report.txt – Includes appropriate headers and comments and Customer payments due based on the following. Amount due is 1.75% of current balance or $25.00 which is greater. If the account is over limit add $25 dollars to amount due. If the account is past due add $35 dollars to the amount due.

Archived_Master.txt – Original Master file with added header row and date of validation. Does not reflect current transactions.

Master.txt

100A100 Henderson Robert 350.23 1000 O
100F300 Knight Joseph 43.91 1000 O
100F400 Osmond Nancy 212.09 500 O
100H200 Justice Andrea 123.45 400 P
100H350 Knight Mary 543.56 1000 P

Transaction.txt

A 100D454 Jones Julie 0.00 200 O
D 100H200
E 100F300 zzz zzz -9999 1500 z
D 100A900
E 100F400 zzz zzz 55.98 -9999 z
Topic archived. No new replies allowed.