A Visual Study Aid for Tree_Like Data Structures

MCVL Homepage Department of Computer Engineering and Computer Science

Contact Information:

Mark Baechle
Department of Computer Engineering and Computer Science
University of Missouri-Columbia
Columbia, MO. 65211
c635433@showme.missouri.edu

Yousseff Saab
Department of Computer Engineering and Computer Science
University of Missouri-Columbia
Columbia, MO 65211
saab@ece.missouri.edu

K. Palaniappan
Department of Computer Engineering and Computer Science
University of Missouri-Columbia
Columbia, MO 65211
palani@cecs.missouri.edu


The Tree Machine

Our program is called the "Tree Machine". It is an interactve program that draws trees dynamically. The purpose of this is to aid in the study of trees . The program draws six kinds of tree like data structures, binary heaps, binary search trees, Red-Black trees, AVL trees, splay trees, and binomial heaps. The user is allowed to add or delete keys from these trees. Any ASCII character can be used as a key. The Tree Machine draws the trees in three modes: One Type, Two Types, and Before/After. One Type which shows one kind of tree in the applet window. This mode allows for the construction of larger trees. The Two Type display shows two trees of different kinds next to each other and allows for comparative study of two different kinds. The Before and After mode shows a tree of any kind before and after a deletion or an addition to it. A description of the GUI and how to use the program follows.

The GUI consists of two rows of objects. First on the top left is the status window. It dispalys a variety of help and instructional messages. The user will find it helpful to read these messages. Next to this window on the top right is a choice list initially labeled about. There a seven choices and they are meant to be help files. The second row of the GUI components are the controls to the Tree Machine. They will be described below.

The first component is a choice list that controls the type of display. These display types were described earlier. The type of display can be changed at any time.

A button labeled "<" is the next control. All trees created by the Tree Machine are put on a stack. This button allows the user to go backward through the stack. This button will not work if there are outstanding requests to add or delete keys.

The "Add" button requests an addition to the trees. After it is pressed click on the text field next to it. Then enter the ASCII keys to be added to the tree. One or more keys can be entered at once. Then press enter and the first key will be automatically added. After that each mouse-up will cause the addition of one of the the keys entered until they have all been added. The Tree Machine does not accept duplicate keys.

The "Del" button works in the same way as the "Add" button except that the entered keys are deleted from the tree. If a key is not in the tree an error message will be displayed.

The next button labeled ">" moves you forward in the stack of trees. The same restrictions apply as for the "<" button. Transactions may be performed on past trees.

It is hoped that the reader will try the program and learn about trees the visual way.

Start the program