153k views
0 votes
In which of the following situations would setting up parallel arrays be most useful?

a. You need to calculate interest earned on a savings account balance.
b. You need to look up an employee's ID number to find the employee's last name.
c. You need to determine the shortest distance between two points on a map.
d. You need to store a list of 20 commonly misspelled words.

1 Answer

1 vote

Final answer:

Parallel arrays are most useful for looking up associated information, such as matching employee ID numbers with last names.

Step-by-step explanation:

Setting up parallel arrays would be most useful in a situation where you need to look up an employee's ID number to find the employee's last name. This is because parallel arrays allow you to store related data in separate, yet parallel, data structures, enabling you to use one array to lookup information in another. This approach is useful when you have two related pieces of data, like ID numbers and last names, which correspond to each other.

User Aalku
by
7.9k points