Final answer:
This lab involves implementing a linked list template in C++ that can store any comparable type. The main program includes creating the list, populating it with numbers from a text file, and offering menu-driven options to manipulate the list.
Step-by-step explanation:
In this lab, you will be implementing a template version of a linked list in C++. The linked list will be capable of storing any comparable types. You will need to define a Node struct, a recursive function to display the contents of the list, a recursive function to calculate the length of the list, a function to add an element to a sorted list, a function to delete an element from the sorted list, and a function to search for an element in the list.
In the main program, you will create a new linked list that can store doubles. You will populate this list with the contents of a text file called numbersUnsorted.txt. The text file contains a list of numbers. After creating the list, you will provide a menu-driven program that offers various options to the user, such as displaying the contents of the list, calculating the length of the list, adding a new element to the sorted list, deleting an element from the sorted list, searching for an element in the list, and exiting the program.