|
Linked List Assignment
In order to understand singly linked lists well, it is important to
implement singly linked lists in many different ways. For this assignment,
you are going to use the web to generate input for your program.
A form will be used to submit input fields to your program. Your
program will run as a cgi script. The nodes on the linked list should have
two information fields: one for the name of the input field and one
for the value. You must design a class based on a linked list to
handle the data from the form. The class must contain at least the
following member functions:
-
A constructor to create an empty list.
-
A destructor that will delete all nodes on the list.
-
A function to read the input fields from the form into nodes which are
inserted onto the list.
-
An insert function to make a node, store the name and value passed as parameters
to the function and insert the node into the list.
-
A remove function to remove the first node from the list and discard it.
-
A print function to print the name and value of all the input fields on
the list.
-
A get function which given the name of a field will return the value of
that field.
|