Question: Design and implement an application file that does the following: uses a 2 dimensional array to store the sales data(see sample data and output below)

Design and implement an application file that does the following:
uses a 2 dimensional array to store the sales data(see sample data and output below)
uses 1 dimensional arrays for the following:
o hold the names of the stores
o hold the names of the months
o hold the total sales for each store (city)
o hold the monthly totals
creates and calls 4 methods that perform the following tasks:
o initializes these arrays using initialization lists: 2D array with all the sales data (but not the totals), store (city) names, month names
o calculates the total sales for each city (and declares the size of this array)
o calculates the monthly totals (and declares the size of this array)
o prints out the results (see the sample output below). If you want help getting the output to line up, use printf (or ask you instructor about printf)
Sample Data:
This is a sample data set. The code you write must work for ANY data set.
Chilliwack
Kamloops
Kelowna
Nanaimo
Surrey
Vancouver
Victoria
400 500 500 600 500 600
600 800 800 800 900 900
700 700 700 900 900 1000
500 600 700 800 700 700
800 700 800 700 900 800
1000 1100 1200 1300 1400 1400
900 900 900 1000 1100 1100
Output:
Store Monthly Sales Store
Location (thousands of $)Totals
Jan Feb Mar Apr May Jun
Chilliwack 400 500 500 600 500 600 3100
Kamloops 600 800 800 800 900 900 4800
Kelowna 700 700 700 900 900 1000 4900
Nanaimo 500 600 700 800 700 700 4000
Surrey 800 700 800 700 900 800 4700
Vancouver 1000 1100 1200 1300 1400 1400 7400
Victoria 900 900 900 1000 1100 1100 5900
Month Totals 4900 5300 5600 6100 6400 6500 34800

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!