The main function should be part of this class


A company has four salespeople (numbered from 1 to 4), who sell five different products (numbered from 1 to 5). Once a day, each salesperson passes in a slip for each type of product sold. Each slip contains the following:
? The salesperson number,
? The product number,
? The total Qatar Riyals value of that product sold that day.
1. Propose a class Slip to store the data of sales slips.
2. Each salesperson passes in between 0 and 5 sales slips per days. Propose an array, slips, to store the data of sales slips for a whole month (31 days). Assume that the total QR value of each product never exceeds 99QR. Write a method, collectSlips, to collect the sales information for a month by randomly filling the slips array.
3. Write a method, summarizeSalesSlips, that will read all this information for one month's sales and summarize the total sales by salesperson and by product. All the totals should be stored in sales, a two dimensional array.
4. Write a method, printTotalSales, to display the sales results in tabular format, with each column representing a particular salesperson and each row representing a particular product.
5. Write a method, totalSalesProduct, to Cross-total each row to get the total sales of each product for the month. Print these totals.
6. Write a method, totalSalesPerson, to Cross-total each column to get the total sales by each salesperson for last month. Print these totals.
7. Modify your tabular output to include these cross-totals to the right of totals rows and to the bottom of the totals columns.
All the code related to questions 2-7 should be written inside a second class TotalSales. The main function should be part of this class.

Request for Solution File

Ask an Expert for Answer!!
Basic Computer Science: The main function should be part of this class
Reference No:- TGS0131704

Expected delivery within 24 Hours