Extra Credit Lab - File I/O
Write a program to read in Inventory.txt and output the following
To Screen and to InventoryRpt.txt
DRC:\WINDOWS\system32\cmd.exe
Name Quantity # Cat Price Discount Total Discount Saved
Price Total
Books 10 1 per carton A $ 22.25 $ 20.22 $ 222.50 $ 202.20 $ 20.30
Pencils 100 25 per box B $ 1.50 $ 1.25 $ 150.00 $ 125.00 $ 25.00
Stapler 25 5 per box C $ 10.25 $ 9.25 $ 256.25 $ 231.25 $ 25.00
To InventoryOut.csv - Verity that the file is correct by opening in Excel
Name Quantity, #, Cat, Price, Discount, Total, Discount, Saved,
Price, Total,
Books 10, 1, per carton, A, 22.25, 20.22, 222.50, 202.20, 20.30
Pencils 100, 25, per box B, 1.50, 1.25, 150.00, 125.00, 25.00
Stapler 25, 5, per box C, 10.25, 9.25, 256.25, 231.25, 25.00
Note: You can have two PrintWriter objects.
In order to received extra credit the outputs must be exactly as shown. Source code must be laid out neatly
and variable name must be good. You will not receive credit for partially completed lab.