1. DEVRY ECET 370 Week 6 ilab Binary Trees NEW
Check this A+ tutorial guideline at
http://www.uopassignments.com/ecet-370-
devry/ecet-370-week-6-ilab-binary-trees-
recent
For more classes visit
http://www.uopassignments.com/
iLAB OVERVIEW
Scenario and Summary
The purpose of the lab exercises is to help the
student acquire skills in developing programs that
involve the use of binary trees. We will be
concentrating primarily on binary search trees, or
BSTs.
Deliverables
There are five exercises in this lab, although not all
of them will be required for submission. Be sure to
read the following instructions carefully.
Exercise 1: No submission is required.
2. Create a folder and name it Week 6 Lab. Inside this
folder, create the subfolders Ex2, Ex3, Ex4, and
Ex5. Place the solution to each of the four exercises
required for submission in the corresponding
subfolder. Compress the folder Week 6 Lab, and
place the resulting zipped folder into the Dropbox.
Note that Exercises 2, 3, 4, and 5 require software
development. Place in the corresponding folders
only .java files. Do not submit the .class files or
other files or folders that are generated by the IDE.
Required Software
Eclipse
Access the software at https://lab.devry.edu .
iLAB STEPS
Exercise 1: Lecture Review—Binary Search Tree
Back to Top
Create a project using the classes
BinarySearchTree, Node, and Main in Binary
Search Tree. Compile the project, run it, and
review the code that is given carefully. These
programs test the code discussed in our lecture.
3. Exercise 2: An Improved BST Class
Back to Top
Add the toString method to the class
BinarySearchTree in Exercise 1.
Note: The toString method returns a string
representation of the object properties. By
implementing toString, a BinarySearchTree object
can be displayed in a simple way using
System.out.print or System.out.println. For
example, if bst is a BinarySearchTree object, it can
be printed using System.out.println(bst).
Exercise 3: Using a BST in an Application
Back to Top
Create a class SimpleBag that uses a binary search
tree to store the bag items.The class should have
the methods listed below. Create a Main class to
test your SimpleBag class.
1. SimpleBag(): default constructor; creates an
empty bag