The
McDonald Appliance Company needs a program written to make a sales report. Use
a class to store the data in this program.
Read
the data for this program from the file p48.dat.
For
each sale, the region number, salesperson number, customer number, and amount
of sale will be read, in that order.
Totals
must be calculated and printed for each salesperson and region. Print a report
for total sales for each person and for each region. This program must be able
to use any number of regions, salespeople per region, and sales per
salesperson. Be careful while creating your output.
Output should look like that on the second page.

“Isn't sanity just a one-trick pony anyway? I mean,
all you get is that one trick, rational thinking, but when you're good and
crazy, well, the sky's the limit!”
-“The Tick” (comic book)
McDonald Appliance Company
Sales Activity Report – Region
1
Salesperson number 23
Customer number Sales amount
234
254.93
190
161.75
34
592.82
Total for salesperson
1009.50
Salesperson number 72
Customer number Sales amount
62
89.63
100
1990.00
34
487.40
123
890.71
Total for salesperson
3457.74
Total for region 1 4467.24
McDonald Appliance Company
Sales Activity Report – Region
2
Salesperson number 15
Customer number Sales amount
110
80.00
48
57.92
Total for salesperson 137.92
Salesperson number 21
Customer number Sales amount
100
890.00
181
200.00
78
392.81
Total for salesperson 1482.81
Salesperson number 39
Customer number Sales amount
18
212.90
197
47.91
Total for salesperson
260.81
Total for region 2 1881.54
(New page)
McDonald Appliance Company
Regional Sales Total Report
Region Total Sales
1
4667.24
2
1881.54
Total 5548.78