Question: You have been tasked to write a program that meets these requirements: Create a program that generates fake names for testing. Read in two different
You have been tasked to write a program that meets these requirements:
Create a program that generates fake names for testing.
Read in two different files: One of 1000 common first names, one of 1000 common last names.
Build a list of 100 fake names using random numbers to pick a first name and last name.
Which of the following answers provides the most efficient design?
| A) Use a vector for each list of names because they require random access. Use a vector for the list of fake names because it is a known, fixed size and does not require sorting. | ||
| B) Use a linked list for each list of names because they require random access. Use a linked list for the list of fake names because it is an unknown size. | ||
| C) Either container will work because both linked list and vector perform equally well when creating a list of names and accessing them randomly. Use a vector for the list of fake names because it is a known, fixed size and does not require sorting. | ||
| D) Use a linked list for each list of names because they require random acess. Use a vector for the list of fake names because it is a known, fixed size and does not require sorting. |
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
