This website is preserved for historical and scholarly reference and is no longer actively maintained.
CpSc 210, Section 1
Assignment 7
20 June 2000
Due: Tuesday, June 20 at midnight
Late penalties: 20 points per partial day late. That is, programs
turned in after midnight Tuesday and before midnight Wednesday
will have 20 points deducted for late, programs turned in after
midnight Wednesday and before midnight Thursday will have a total
of 40 points deducted for late, etc.
Total point value of assignment: 100 points
Late submissions not accepted after: Friday, June 23 at midnight
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
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)
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.