Question: 8.) Consider the following declarations: static final int CAR_TYPES = 5; static final int COLOR_TYPES = 6; double[ ][ ] sales = new double[CAR_TYPES][COLOR_TYPES]; a.

8.) Consider the following declarations:

static final int CAR_TYPES = 5;

static final int COLOR_TYPES = 6;

double[ ][ ] sales = new double[CAR_TYPES][COLOR_TYPES];

a. How many elements does the array sales have?

b. What is the number of rows in the array sales?

c. What is the number of columns in the array sales?

d. To sum the sales by CAR_TYPES, would you add together the values in each row or column?

e. To sum the sales by COLOR_TYPES, would you add together the values in each row or column?

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!