Consider the following declarations:  const int CAR_TYPES = 5; const int COLOR_TYPES = 6; double sales[CAR_TYPES][COLOR_TYPES]; a. How many components 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, what kind of processing is required? e. To sum the sales by COLOR_TYPES, what kind of processing is required?

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter8: Arrays
Section: Chapter Questions
Problem 13RQ
icon
Related questions
Question
100%

Consider the following declarations: 
const int CAR_TYPES = 5;
const int COLOR_TYPES = 6;
double sales[CAR_TYPES][COLOR_TYPES];
a. How many components 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, what kind of processing is required?
e. To sum the sales by COLOR_TYPES, what kind of processing is required?

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 5 steps

Blurred answer
Knowledge Booster
Array
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT