CS120
Programming Assignment #9

Due Wednesday April 24th.

For this assignment you will be extending the node class. Using the node class and associated code from class and make sure that it has all of the following functionality. Some of this will already exist from class, some will require modification of existing funcitons, and some will require new functions.

Extra Credit: There is a special case for the append() function if the list is currently empty. The function append() is a function in the node class, it looks for the NULL and adds a node to the end of the list. However, if there are no nodes in the list the node has to be added right after the head pointer. In this case the code has to act like the prepend() function. To handle this special case you need a "wrapper" function that is not part of the node class. The wrapper function checks to see if head points directly to NULL, in which case it adds the new node and returns; otherwise it calls the node class's append() function.

Turn in: A copy of the code and sample output showing all of the new funciontality of the node class.