public interface BinarySearchTreeDriverInterface
| Modifier and Type | Interface and Description |
|---|---|
static class |
BinarySearchTreeDriverInterface.TestType
This
enum is used to specify which test scenario will be executed. |
| Modifier and Type | Method and Description |
|---|---|
BinarySearchTree<Person<java.lang.Integer>,java.lang.Integer> |
createBinarySearchTree(BinarySearchTreeDriverInterface.TestType testType,
java.util.Vector<Person<java.lang.Integer>> persons)
This method will create a new BinarySearchTree<Person<Integer>, Integer> for the specified
TestType.
|
java.util.Vector<Person<java.lang.Integer>> |
createPersons(int numberOfPersons)
This method is used to obtain a Vector<Person<Integer>> with
Person<Integer> objects. |
java.lang.Object[] |
runTestCase(BinarySearchTreeDriverInterface.TestType testType,
int numberOfPersons,
int numberOfTimes)
This method is called to run a particular testType on a BinarySearchTree for the specified
numberOfTimes.
|
java.util.Vector<Person<java.lang.Integer>> createPersons(int numberOfPersons)
This method is used to obtain a Vector<Person<Integer>> with
Person<Integer> objects. Please make sure
that the <Integer< keys are not assigned sequentially (i.e. 1, 2, 3, 4, etc...).
for each person created. You should, instead, assign the keys randomly as you are creating
the Person instances.
numberOfPersons - The number of persons to createPerson<Integer> objects.BinarySearchTree<Person<java.lang.Integer>,java.lang.Integer> createBinarySearchTree(BinarySearchTreeDriverInterface.TestType testType, java.util.Vector<Person<java.lang.Integer>> persons)
testType - The type of test for the created BinarySearchTree.
Person<Integer>
objects contained in the persons Vector
Person<Integer>
objects contained in the persons Vector
Person<Integer>
objects contained in the persons Vector
Person<Integer>
objects contained in the persons Vector
Person<Integer>
objects contained in the persons Vector
persons - A Vector containing the Person objects to be insterted into the BinarySearchTreejava.lang.Object[] runTestCase(BinarySearchTreeDriverInterface.TestType testType, int numberOfPersons, int numberOfTimes)
This method is called to run a particular testType on a BinarySearchTree for the specified numberOfTimes.
This method repeats the following numberOfTimes:
testType - The test type to be run.numberOfPersons - The number of persons to createnumberOfTimes - The type of test case being run. See the enum BinarySearchTreeDriverInterface.TestType.