Question: In this assignment, you are provided the code for a List class that has the functions to setup/initialize the list, insert to the list, delete



In this assignment, you are provided the code for a List class that has the functions to setup/initialize the list, insert to the list, delete from the list and etc. Your task is to extend the main function of the code to create an array of List objects and insert elements (randomly generated integers) to each of these List objects and print the contents of the List objects. The base address of the array of List objects is stored in a pointer named "listArray' of type List. The number of List objects (identified using the variable 'numLists') to be stored in the array is 5. The number of integer elements per List object (identified using the variable "listSize") is 10. Each List object is to be filled up with randomly generated integers in the range of 1... maxValue, where max Value = 50. Each insertion has to be made at index 0 of the List object. For example, if the random integers 23 45 12 34 49 are to be inserted to a List object, the contents of the List object after each insertion (at index 0) looks like this: 23 45 23 12 45 23 34 12 45 23 49 34 12 45 23 After filling up all the List objects, print the contents of each of them. After printing the contents of all the List objects, delete each List object and eventually clear up the space for the array of List objects. Submission: 1 - 75 pts) The entire.cpp file with the main function implemented as indicated. 2) A PDF document containing the following: (a - 20 pts) With the insertions occurring at index 0 of a List, determine the time complexity of inserting 'n' elements to every List object in an array of 'm' List objects. Show the pseudo code for the insertion step and analyze the time complexity. (6 - 5 pts) A screenshot of the execution of your code. #include
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
