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

Write a C++ class template (named GenLookup) to implement a generic look-up list

ID: 3623408 • Letter: W

Question

Write a C++ class template (named GenLookup) to implement a generic look-up list class. The elements of the lists may be instantiated to any simple data type or to string type. The lists must be implemented by a linked-list for which you keep a pointer to the start (Head) of the list. New items will always be added at the start of the list. {For efficiency and ease of maintenance, minimize the code by using a singly-linked list and only a Head pointer in the GenLookup class (or alternatively, in a List class it is based on).} The operations you must provide will be used as:
MyListl.Add(ElementVal); // add item to this list

MyList2.Remove( ElementVal); // get an item off this list

Element* Ptr = MyList2.Find( ElementVal); // get a pointer to an item on this list (or null if not found)

Write a driver program that will create multiple lists (including numeric and string types) and allow the user to add, remove, and find data on each, with output to show the operations performed and values added, removed, or found. Raise an exception when Remove is attempted on an item not on the list. Handle this exception in the driver program.

Hand in source listings for all classes and for the driver program, the executable file (.exe), and sample output that shows you have instantiated multiple lists with different kinds of elements (including string) and that you have verified the behaviors for each list.

Explanation / Answer

I go to www.hotmail.com/class template

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