Practical Five

Singly Linked List

due : 4pm 14 April 1997


Part One

Create an object-oriented implementation of a standard singly linked list.

Each node of the linked list must store the following information about 5 of your classmates, as specified during the lecture:

Insert each new element at the end of the linked list.

Write a function to list the contents of the linked list.

Your destructor must delete all nodes from the linked list.

Part Two

Modify the above Insert method so that it inserts the element into the proper position to maintain the list in an ascending order, according to the Surname. In effect, the list is sorted using the insertion sort algorithm.