Templated List

Lab Assignment

Modify the list template example as follows. Create a new templated class Collection that contains this list as a dynamically allocated member, i.e, the list contains a pointer to the first element.

You are not allowed to use STL containers. You are not allowed to use double-linked list. That is, you should use single-liked list only as in the original code. The class has to implement the following methods:

Make sure that your templated list operates correctly with the following code. You may use this Makefile to assist in running and debugging your program. It is configured to use valgrind to help with debugging memory leaks.

Templated member functions should be implemented out-of-line (outside the class).

Milestone. Collection that successfully implements add().