164,465 views
38 votes
38 votes
A school’s administration stores the following data for each student in an online system: name, class, and five electives. Select the data type that the school should use to store information on the electives.

User Davidatthepark
by
2.9k points

2 Answers

16 votes
16 votes

Answer:

Arrays

Step-by-step explanation:

plato haha

User Matt Shepherd
by
2.9k points
14 votes
14 votes

Answer:

Array of Strings

Step-by-step explanation:

I believe the best data type for this information would be an Array of Strings. This array would have a fixed size of 5 elements. One for each one of the five electives that the student will have. Then the individual electives will be String elements that are saved in the 5 indexes of the Array. This would allow all of the electives to be bundled into a single variable and accessed together or individually by the user. This would be the best and most efficient data type to store this information.

User Gzost
by
3.2k points