Question: In C++ write: reading data from file and output to another file The High Fashion Department Store wants a program written to produce its monthly
In C++ write: reading data from file and output to another file
The High Fashion Department Store wants a program written to produce its monthly bills. Input to the program will be the customer number, the number of the department in which that item was purchased, the item number, and the amount of the purchase. There are four departments numbered 1 through 4. On all purchases of $10.00 or more in departments 1 and 2, the customer receives a 5 percent discount. On all purchases of $25.00 or more in departments 3 and 4, the customer receives an 8 percent discount. Totals are to be produced for each department and for each customer. Sales tax of 7 percent is paid on the net total for the customer. Also a service charge is added to the bill if the amount of the bill is less than $100.00. The service charge is 10 percent of the net bill before the sales tax is added if the total is less than $50.00. Otherwise, the service charge is 5 percent. The bill for each customer is to be printed on a separate page. (You need a counter to keep track of the number of print lines used.)
You have to use at least one void function and one value-returned function for this assignment.
Make sure error checks are performed on the input data.
Customer numbers and department numbers are sorted.
Sample Input
132 2 12 8.97
132 2 65 19.80
132 3 198 67.90
132 3 292 7.77
132 3 418 18.90
132 4 190 25.91
254 1 55 25.50
254 1 678 69.80
254 2 451 69.5
254 3 66 99.0
54 3 231 1150.5
254 4 57 80.70
254 4 78 990.40
254 4 97 70.50
357 2 46 25.0
357 4 77 55.5
output
HIGH FASHION DEPARTMENT STORE
MONTHLY BILLING STATEMENT
CUSTOMER # 132
DEPT ITEM AMOUNT DISCOUNT NET
----------------------------------------------------------------------------------------------
2 12 8.97 0.00 8.97
65 19.80 0.99 18.81
TOTAL DEPT 2 28.77 0.99 27.78*
3 198 67.9 5.43 62.47
292 7.77 0.00 7.77
418 18.90 0.00 18.90
TOTAL DEPT 3 94.57 5.43 89.14*
4 190 25.91 2.07 23.84
TOTAL DEPT 4 25.91 2.07 23.84
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
