AP Java 2 Assignment 4:
Trees

Background

Note: This assignment is only required for students taking the AB exam. In this assignment you will complete an Applet that inserts a node in a Binary Search Tree (BST), counts the nodes in a BST, searches for a given value in a BST and deletes nodes in a BST.

Steps to starting this assignment

You will then need to create a new empty project with the files BSTreeApplet.html and BSTreeApplet.java . Right click on the files and store them in your folder. (Important note: Make sure when saving BSTreeApplet.html to choose save as "BSTreeApplet.html" with the double quotes.)

Then:

  1. Choose Project | New Project | Empty Project. Name your project BSTreeApplet
  2. Choose Project | Add Files and add the files you just downloaded.
  3. Choose Window and choose the first BSTreeApplet listed.
  4. You should now be able to run the applet

Steps to completing this assignment

You may find it helpful to first read through lessons 34, 35, 36, and 37 in the ICT Java curriculum. Then, you will need to complete the following methods in the BSTree class:

When you are finished, post your completed applet to your website, and submit the code for the three completed methods to mrsimon@lycos.com: