[Instructions] [Search] [Current] [Syllabus] [Links] [Handouts] [Outlines] [Labs] [More Labs] [Assignments] [Quizzes] [Examples] [Book] [Tutorial] [API]
This laboratory is under development.
In this laboratory session, you will investigate a node-based implementation of trees. You will begin by considering the basics of the implementation (there are many code files to look at). You will then attempt to correct a few errors. Finally, you will consider how you might print out the elements of the tree in a variety of orders.
Required files:
Interfaces
Node-Based Binary Trees
For Testing
Miscellaneous
% jc *Tree* should do the trick.)
A
/ \
B C
/
D
NodeBasedBinaryTreeCursor.java). What happens when you add a child? What
happens when you delete a node?BinaryTreePrinter.java to familiarize yourself with the output format.delete method in
NodeBasedBinaryTreeCursor to correct this problem.
X
/ \
Q C
/ \ \
D A E
/ \
N F
BinaryTree and BinaryTreeCursor
classes.BinaryTree and BinaryTreeCursor
classes.History
[Instructions] [Search] [Current] [Syllabus] [Links] [Handouts] [Outlines] [Labs] [More Labs] [Assignments] [Quizzes] [Examples] [Book] [Tutorial] [API]
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.
This page may be found at http://www.math.grin.edu/~rebelsky/Courses/CS152/99S/Labs/binarytrees.html
Source text last modified Wed Apr 28 11:15:40 1999.
This page generated on Wed Apr 28 11:22:00 1999 by SiteWeaver. Validate this page's HTML.
Contact our webmaster at rebelsky@math.grin.edu