CIS-3012 Homework #5: SingleList

Due: Friday, April 28, 2017

In this assignment you'll write a template class that provides a singly linked list container modeled after the standard library containers. Chapters 9 and 16 in the text are relevant to this assignment. You may also find the ArrayStatic, ArrayDynamic, and BoundedList samples valuable. There are also some slides on BoundedList that might be helpful. Finally, I have prepared some notes that help explain the way SingleList iterators work.

  1. The attached file SingleList.hpp contains the definition of a template class SingleList. Instances of that class are singly linked lists that can grow dynamically to any size. Each list consists of a collection of nodes; each node contains a data item and a pointer to the next node in the list. The list object itself holds a pointer to the first node and to the last node (as well as a count of the nodes). The methods are as documented in the attached file. Notice that SingleList provides an iterator class in the ForwardIterator category.

    The attached file SingleListTest.cpp contains a test program that exercises the methods of SingleList. Your assignment is simply: implement the methods of SingleList so the test program compiles and works.

Submit your SingleList.hpp to Moodle.

Last Revised: 2017-04-19
© Copyright 2017 by Peter C. Chapin <>