This website is preserved for historical and scholarly reference and is no longer actively maintained.
                         CpSc 210, Section 1
                             Assignment 4 
                             6 March 2001


Due: Thursday, March 15 at 11:59 p.m.

Late penalties: 20 points per partial day late.  That is, programs
	turned in after 11:59 p.m. Thursday and before 11:59 p.m. Friday
	will have 20 points deducted for late.  Programs will not be
	accepted after 11:59 p.m. Friday, March 16.

Total point value of assignment:  100 points

Late submissions not accepted after: Friday, March 16, at 11:59 p.m.

This assignment is to be done INDIVIDUALLY.



Create a directory, A7, which will contain all parts of this assignment.
The directory will contain a class named asg7.java, which extends
Bailey's SinglyLinkedList class.  (You will want to have Bailey's
SinglyLinkedListElement class in the same directory, but do not 
send the Element class with handin.

The objectives of this program are to give you some experience writing
working with a singly linked list.  You are to extend Bailey's 
Singly Linked List and add the following methods to the extended
List

	public void reverse ( )
	// post:  the List is reversed (destroying previous list in process)

 	public String toString()
	// post:  prints the linked list, using toString methods of objects

The reverse method is to work by moving the references to the nodes,
not by creating new SinglyLinkedListElement Objects or changing the
data fields of existing SinglyLinkedListElement Objects.

 
Input:

 	None required, but your main method may input values if
	you wish.

Output:

	Print your name, the assignment number, and a short description
	of the assignment to the screen.

	Your main method should test reverse of (1) an empty list,
	(2) a list with one element, (3) a list with two elements,
	and (4) a list with at least 10 elements.

	Your main method should invoke the List's toString method to
	print the List before and after reversal.


Other requirements:

	Follow the style standards to be found on your instructor's
	web page for CPSC 210.

	Submit your program using the handin command.  There is a link to
	the handin description on your lab page (www.cs.clemson.edu/~lab210).


Grading rubric:

	Required documentation and style standards:  20 pts.

	The program compiles without error   10 pts.

	Program must compile for further points to be awarded.
	   (Max points for programs that don't compile: 20)
       If the signatures of the methods are not as given above,
       the code will not compile with our test programs.

	Method reverse works with zero or one elements.  5 pts.
	Method reverse works with two elements.  5 pts.
	Method reverse works with all longer lists.  40 pts.

	Quality of test program:  10 pts.
	Printing list.  10 pts.