Fundamentals of Computer Science II (CSC-152 97F)

[News] [Basics] [Syllabus] [Outlines] [Assignments] [Examples] [Readings] [Bailey Docs]

Assignment Nine: Tree Traversal

Summary: In this assignment, you will implement trees with accompanying iterators.

Note: This assignment is optional. Do it only if you feel it will significantly impact your learning or that you have previous poor grades that you need to ameliorate. If you do this assignment, please note that I've given you a long time for this assignment, so don't wait until the last moment to begin it.

Collaboration: You can work on this assignment in groups of up to size three. You may discuss your design with any size group. You may also work with each other on general debugging issues.

If you work as part of a group, you are responsible for ensuring that all members of the group understand all sections of the assignment.


Implement a cursor-based Tree class that supports the following methods

Demonstrate that your traversal methods work by building an appropriate tree and showing the results of each traversal method.

Note that you will most likely need to implement a TreeNode class to use as the basis of your Tree class.

Extra Credit

For extra credit, develop a print method that prints the tree in a nice, two-dimensional, fashion.

[News] [Basics] [Syllabus] [Outlines] [Assignments] [Examples] [Readings] [Bailey Docs]

Disclaimer Often, these pages were created "on the fly" with little, if any, proofreading. Any or all of the information on the pages may be incorrect. Please contact me if you notice errors.

Source text last modified Tue Nov 25 10:25:14 1997.

This page generated on Tue Nov 25 10:26:59 1997 by SiteWeaver.

Contact our webmaster at