1. Engineering
  2. Computer Science
  3. write the code in c using visualstudio and follow the...

Question: write the code in c using visualstudio and follow the...

Question details
Write the code in C++ using visualstudio and follow the instructions carefully!
CSIS 223 Object-Oriented Programming with C++ Lab01 -Sales Receipts Sales Receipts Create a Windows console program named Labo01-SalesReceipts in a suitable folder. Store a copy of the completed version to your H:lCSIS223 folder and turn in a copy of the entire program folder when drive X: becomes available. Copy SalesReceiptstxt file from CaVCExercises00P or download from Data Files folder in BlackBoard. Right-click on the file tag and select Save target as. to copy the file to your computer system Copy the Sales Receipts.txt file into the Lab01-SalesReceipts folder contained within the project folder Open the file and check for a successful open to ensure that the file is available for input. Use streaming VO. Include the <fstream> library for an input ifstream file object and ciostream> for console display Include the <string class library to enable input and output of string values. Each record includes a last name, first name, transaction code, a price field, and the item quantity for each sales transaction. Use suitable data types and variable names for each of these fields. Calculate a total amount (price quantity) for each record. Keep a running total of this calculated amount for a grand total at the end of the report. Count each record processed and display this value at the end of the report. Close the input file after all records have been processed, before printing the total values and ending the program. 65.5 17.95 $ 1166.75 sinnens 651.58 llianson Valter 69.99 739.98 Torrance. Me lanie 1199-76 Monree. ndrea 99.80 Hanley, Laure 369.90 Saville. Eleanor 84.18 Anderson Mary 145.80Porter. Eric 512.64 Jeffersen. Katherine 16 e 14008.58 25 records processed Press any key to continue Add the <iomanip> library and use fixed and setprecision(2) output stream manipulators to display dollars and cents values for the two currency amounts and grand total. Use setw(n) to establish the width of each (all three) right-aligned numeric output fields. Line up output values as shown. The char trans- action code and the formatted name string (last name followed by a comma and space, plus the first name do not require setw0 spacing. Format the output report as shown. Align the grand total value vertically with the other total amount calcu- lated for each record. Align the record count with the quantity field for records. Use a dollar sign charac- ter variable to display S symbols for both price amounts for the first record only. Set this char variable is suitable for the overall total. Align the grand total with the decimal point for the displayed record items Use standard naming conventions for all variable names and the file object.
Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution