Homework 2 - Linked Lists

Due: Monday April 14, 2008 at 5:00pm

This assignment focuses on creating and using a generic LinkedList template class. You will have to define the member functions of a LinkedList. The file hw2_list.cpp contains the "header" information for both the ListNode and LinkedList class.

ListNode class

You will define the member functions to do the following:

LinkedList class

You will define the member functions to do the following:

Menu Program

The menu program will test your implementation of the linked list. In main, you will define a linked list that stores characters. You will then operate on that list according to the following menu:
      Welcome to the Linked List Menu
  =======================================
  1.  Add a character to the list
  2.  Search for a character in the list
  3.  Delete a character from the list
  4.  Print the list
  5.  Copy the list and print the copy

  0.  Exit
  =======================================
The delete and print options (options 3 and 4) should first check if the list is empty. If the list is empty, it should print that the list is empty.

The copy option should create a copy of an empty list, but will also print that the copied list is empty if the source list is empty.

Submit your completed code as an attachment in an email.