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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!