Please read the entire problem before jumping into the code!
Your boss at the hardware store wants you to help him develop software to automate his billing process. Hes already bought some hardware that will scan and put a list of items into a file. Your task is to write a program that will do the following:
The scanning machine can only handle up to 50 items, so your input file will never have more items than that, but you wont know ahead of time how many items are actually recorded in the file. At this point, you shouldnt worry about duplicate items in the file: treat each line as an individual item. You do know, however, that there is one record per line in the following format:
328712 Hammer 15.75
Each record consists of three components:
Example input:
328712 Hammer 15.75 33274 Pliers 8.95 1000456 Bolt-cutter 38.99 43234 Screwdriver 8.95 9833321 Fencing 75.00
Example output:
Hammer (328712) $15.75 Pliers (33274) $8.95 Bolt-cutter (1000456) $38.99 Screwdriver (43234) $8.95 Fencing (9833321) $75.00 ------------------------------- Subtotal: $147.64 Tax (5%): $7.382 Total: $155.022
Use good programming methods, including separate functions where appropriate. A copy of a sample file (order.txt) can be found in the COMMON area of the FTP site under practicals/p8.
Submit the finished CPP file to the FTP site in its own folder called P8.