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

You have been tasked to write a program that meets these requirements: Create a

ID: 3592782 • Letter: Y

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 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.

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.

Explanation / Answer

Dear STudent,

Option A is correct.

Explanation: Random access is not possible using linkedlist. In vector it is possible, hence Option A is correct.

----------------------------------------------------------------------------------------------------------------------------------------

Kindly Check and Verify THanks...!!!

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote