Need help on Two Dim. Array

A company has three salespeople who sell five different products. Once a month, each salesperson
passes in a slip for each type of product sold. Each slip contains the following:
a) The salesperson number
b) The product number
c) The total amount of that product sold that month
------------------------------------------------------------------------
Assume that the information from all of the slips for last month is available. Write an application that
will read all the information for last month’s sale and store them in array “Sales”, with each column
representing a particular product and each row representing a particular salesperson.
Processing all the information for last month, with Cross-total each row to get the total sales of each
salesperson for last month, and Cross-total each column to get the total sales of each product for last
month. Display the results in tabular format.
----------------------------------------------------------------------------
A sample output is the following:
P1 P2 P3 P4 P5 TOTAL
Salesperson 1 100 200 300 260 145 1005
Salesperson 2 125 180 250 230 180 965
Salesperson 3 130 150 320 400 234 1234
TOTAL 355 530 870 890 559

(For simplicity, you do not have to print the strings such as Product 1, …, and Salesperson1, … etc.)


**the reason I have no code is because I have tried to start it but I have just confused my self so I want a fresh start and assistance... please help thank you
Just write an app that reads files with rows that look like "Salesperson Product Total". Perhaps read them all as strings and give them some words instead of numbers so that you don't go insane. Your file basically looks like this, with rows in possibly random order. Figure out how to read and store this data.
Tom01 Fan 15
Tom01 Television 3
Tom01 Broom 7
Tom01 Paper 12
Tom01 Water 5
Kate02 Fan 1
Kate02 Television 4
Kate02 Broom 4
Kate02 Paper 23
Kate02 Water 8
Lauren03 Fan 20
Lauren03 Television 7
Lauren03 Broom 2
Lauren03 Paper 16
Lauren03 Water 19
Topic archived. No new replies allowed.