Question: The program generates a customer's invoice for CS Carpet Service. This student-run company provides carpet cleaning services to the community. Sales data are recorded in

The program generates a customer's invoice for CS Carpet Service. This student-run company provides carpet cleaning services to the community. Sales data are recorded in plain text files that serve as data input. The sales tax rate is fixed at 8.375%. The program will read data from an input file stream and write output to an output file stream. The program computes and writes a neatly-formatted invoice including the subtotal, sales tax, and total with tax. The output must be formatted exactly as shown in the Sample Output below. Note: I have provided two sample input data files and two expected output files in the /home/shared/cs135/kmess/ directory. You may want to copy these to your project directory for convenience. Command line examples below assume you have copies of these files in your project directory. Note: This program requires the use of four streams. Direct user interaction is conducted using the standard output stream (e.g., cout) and the standard input stream (e.g., cin). Additionally, the program reads data from an input file stream (i.e., an ifstream) and writes an invoice to an output file stream (i.e., an ofstream). Note: Do not hard-code file names or paths into your program; the program must prompt the user for input and output filenames and use those filenames when opening the respective file streams. Note: Code to the specification: your statements should be general enough so that if the content of the input file changes and the program is run again (without editing and recompiling), it outputs the appropriate results.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!