Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

00 T-Mobile 87%. 11:36 AM jsums.blackboard.com Upload Assignment: Lab: CH11 PWUs

ID: 3667455 • Letter: 0

Question

00 T-Mobile 87%. 11:36 AM jsums.blackboard.com Upload Assignment: Lab: CH11 PWUs 1-6 Home Pae Dscussione Write the following declarations. a. An array calleds containing ten values of type string. b. An enumeration type of the seven major colors of the spectrum, and a matching array declaration that can be indexed by the spectrum type. The array should be called colorMix, and should contain values of type float c. A two-dimensional array representing the days on a calendar page with up to 6 weeks. Call the array month, and declare an enumeration type consisting of the names of the days, which can be used to index the array columns. The weeks should be indexed by an int. For the component type of the array, declare a struct consisting of an int field called day, and a string field called activity Write a declaration of a named array type, and then declare three arrays of that type. The array type should be called DataSet, and the three arrays should be called input, output, and working Each array array should hold five float values a Using the DataSet type declared in Exercise 2, declare an array 4 Using the set array declared in Exercise 3, write a nested For s Write a function heading for a function called Equals that takes of three data sets, called set loop that initializes all of the values of the three data sets to 0.0. two arrays of the Data-Set type declared in Exercise 2 and returns a bool result. The array parameters should be const, as they are input-only parameters to to the function Write the body of the Equals function deseribed in Exercise 5. It should return true if cach element of the first array is equal to its corresponding element in the second array

Explanation / Answer

1.

a. char *soptopline[10]; //array of character type with pointer which hold 10 strings
b. enum spectrum { red, orange, yellow, green, blue, indigo, violet};
float colorMix[7];
for example colorMix[red]=82.9;
c. enum days {sun,mon,tue,wed,thu,fri,sat};
int cal[6][7];
struct test
{
int day;
char *activity;
};