Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

nedd help with setw reading receipts file in c++ 1=======> The File: Simmons Henry C 17.95 65 Smith Katherine N 73.50 9 Johnson William N

nedd help with setw reading receipts file in c++ 1=======> The File: Simmons Henry C 17.95 65 Smith Katherine N 73.50 9 Johnson William N 27.25 2 Williamson Walter C 5.50 119 Handley Earl C 29.95 4 Brown Harry U 114.00 1 Atkins Bethany C 52.50 10 Potter William N 175.00 1 Holder Martha C 8.43 350 Bascomb Ronnie C 43.90 6 Meade Ralph C 5.00 36 Sanders Margaret N 4.20 110 Williams Walter C 5.50 90 Tilden Rosemary N 31.80 3 Everett Joseph N 75.29 1 Prentiss Rhonda C 19.37 15 Torrance Melanie N 369.99 2 Barkis Everett C 4.99 395 Monroe Andrea C 49.99 24 Hanley Lawrence C 99.95 4 Handley Earl N 29.50 10 Saville Eleanor N 8.22 45 Anderson Mary C 42.09 2 Porter Eric N 145.00 1 Jefferson Katherine C 32.04 16 

2======> What we were asked to do:

image text in transcribed

the completed version to your H:lCSIS223 folder and turn in a copy of the entire program folder when Copy SalesReceipts.txt file from C:lVCExercisesO0P 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 SalesReceipts.txt file intot Open the file and check for a successful open to ensure that the file is available for input. Use streaming LO. Include the library for an input ifstream file object and for console display Include the library and use fixed and setprecision(2) output stream manipulators to displa 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 setw) spacing Format the output report as shown. Align the grand total value vertically with the other total amount calu 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 to a blank space after the first record has been displayed. A fixed dollar sign 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

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions