Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please don't use any while loop or any functions, keep it as simple as possible. Thanks ... C++ #include #include #include using namespace std; Please

Please don't use any while loop or any functions, keep it as simple as possible. Thanks ... C++

#include #include #include using namespace std;

Please don't just copy the code from the other post and paste it here! Please write comments i want to understand all steps

this are the only header files allowed. Thanks

image text in transcribed

The program creates a customer's bill for CS Carpet Service. The student-run company provides carpet cleaning services. Sales are recorded in plain text files, which provide the input for this program. Output is to a file stream. The sales tax rate is 8.25%. The program will read data from the text file named input.dat and write output to the text file invoice.txt. The program computes and prints a neatly-formatted invoice including the subtotal, sales tax, and total with tax. Input specification with sample input Suppose that the file input.dat contains the following data: 0000536524 2018 09 06 Joe Blake 123 Main St Las Vegas, NV 89000 89 20 Whole House 20 5.0 Pretreat 20.0 5 Stain Trtmt 16.0 16.0 Fragrance The first line contains a 10-digit invoice number and the date as four-digit year, two-digit month, and two-digit day, each separated by whitespace. The second line contains the customer's name. The third and fourth lines contain the customer's billing address. The next four lines begin with the charge for a service in dollars, the discount applied for that service in dollars, and a description of that service, each separated by whitespace. The description ends at the newline character. Output specification The output is written to a file stream. The date is printed in month, day, year order using the character as delimiter. Column headers are right-aligned in columns. Service descriptions are left-aligned in columns. Dollar amounts are right-aligned in columns with two decimal digits. The program creates a customer's bill for CS Carpet Service. The student-run company provides carpet cleaning services. Sales are recorded in plain text files, which provide the input for this program. Output is to a file stream. The sales tax rate is 8.25%. The program will read data from the text file named input.dat and write output to the text file invoice.txt. The program computes and prints a neatly-formatted invoice including the subtotal, sales tax, and total with tax. Input specification with sample input Suppose that the file input.dat contains the following data: 0000536524 2018 09 06 Joe Blake 123 Main St Las Vegas, NV 89000 89 20 Whole House 20 5.0 Pretreat 20.0 5 Stain Trtmt 16.0 16.0 Fragrance The first line contains a 10-digit invoice number and the date as four-digit year, two-digit month, and two-digit day, each separated by whitespace. The second line contains the customer's name. The third and fourth lines contain the customer's billing address. The next four lines begin with the charge for a service in dollars, the discount applied for that service in dollars, and a description of that service, each separated by whitespace. The description ends at the newline character. Output specification The output is written to a file stream. The date is printed in month, day, year order using the character as delimiter. Column headers are right-aligned in columns. Service descriptions are left-aligned in columns. Dollar amounts are right-aligned in columns with two decimal digits

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

Question

Why We Listen?

Answered: 1 week ago