Homework #13 - Due May 23, 2003

Taking the code as it stands after the completion of Lab 16, you are to implement the following new methods to your ever growing linked list class..  You need to implement the following methods to the code found here and here.

First you need to implement a public method called remove that takes in a single integer argument that removes a single item from the linked list from a given index.  Next you need to implement an public overloaded assignment operator method.  This overloaded assignment method needs to first remove all existing nodes from your linked list (excepting the first one), copy the data from the first node of the rhs linked list, and then add new nodes in the current linked list that have the same data as in the rhs's linked list.  Lastly you need to implement a resize method that will take the existing linked list, and resize it to a given size.  If the new size is larger than the existing size, then add the correct number of new nodes to the end of the linked list.  If the new size is smaller than the existing linked list, you should remove the correct number of new nodes from the end of the linked list.

The prototypes as they will appear in llist2.h are as folllows:

void remove(int index);
llist& operator = (llist& rhs);
void resize(int newsize);

ONLY HAND IN THE CODE FOR THOSE 3 METHODS