This website is preserved for historical and scholarly reference and is no longer actively maintained.
                         CpSc 210, Section 1
                             Assignment 7 
                           November 14, 2001


Due:  Monday, November 19 at 11:59 p.m.  

Assignment:  Add an external iterator for the ArrayList class.

Total point value of assignment:  100 points
Not accepted late.

This assignment is to be done INDIVIDUALLY.

Assignment:  Change your ArrayList.java file to become:

	import structure.QueueArray     // Bailey's QueueArray implementation
	import structure.List;          // Bailey's List interface
	import structure.Iterator;      // Bailey's Iterator interface

	public class ArrayList extends QueueArray implements List
	{


You will need to add the elements() method to your ArrayList class.
In a separate file (ArrayListIterator.java) implement an external
iterator for the ArrayList.  You will need:

	import structure.Iterator

	public class ArrayListIterator implements Iterator
	{


The Iterator interface is given on page 157 of Java Structures.  Your
program should include each method of the interface.



Grading Rubric:

	10 pts. reasonable attempt to solve problem as assigned
	10 pts. also compiles (both classes)
	10 pts. style standards (includes clarity)

    The following 70 points are available only for code that compiles 
    and runs without error.   Some considerations are:

	elements() method does NOT copy array in ArrayList.  Only simple
	     variables and references are passed to Iterator. 
    code works correctly       
    quality of your test driver



Other requirements: The first operation of your main program must be to print "CPSC 210", your name, the assignment number, and a brief description of the assignment.

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 the CPSC 210 lab page (www.cs.clemson.edu/~lab210).