CpSc 210, Section 1
               Assignment Extra Credit (Assignment #6)
                            June 25, 2000 


Due: Monday, June 25 by 7:00 a.m. 

Assignment: Writing an iterator for your ExtBinaryTree class that does
            not use a container class or array.  


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

This assignment is to be done INDIVIDUALLY.


Assignment:  Design and implement a class, PostOrderIterator, which
	implements Iterator, but does not store the tree.

	Traversals are covered in Section 10.5 of Bailey, pages 201
	- 210.  Bailey's Iterators store tree information in a stack
	(or queue or vector) to make the nextElement() method easier
	to write.  You will not use a data structure.  Instead, you
	will keep such information as a reference to the current
	BinaryTreeNode (current) and which way you are going in the
	tree (if needed). 

	Your constructor will be similar to Bailey's in that you 
	will pass the root of the BinaryTree (a reference to a BinaryTreeNode)
	to the constructor.  But, you don't load the tree information into
	any other data structure.  

	Note:  This is a very difficult assignment -- a real test of your
	problem solving and ability to design algorithms.  It is unlikely
	that everyone will complete this assignment correctly.

	You will need to submit ExtBinaryTree.java and PostOrderIterator.java
	simultaneously using handin.  To avoid possible problems with
	Assignment #5, submit this as Assignment #6.

Grading Rubric:

    The following 40 points are available only for code that compiles 
    and runs without error. 

    20 pts. works for your testDriver
    20 pts. works for our testDriver 
		


Your main method should contain a test program. In addition, at some point in the test program, all code should have been tested. ExtBinaryTree.java and PostOrderIterator.java may contain any additional methods that would be helpful. For example, you might write a method to print out "CPSC 210", your name, the assignment number, and a brief description of the assignment.

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).