Final Programming Project
By Cody Dill
Test Case 1:
In test case one, we check the functionality of if item is not in the tree to return error. To do
this I have two arrays with one having additional element. Thus, giving a size difference
between them and prompting an if else statement in the public findLevel function. It kicks back
a negative 2 which catches an if else statement in my for loop looks for and presents the error
message.
Test Case 2:
In test case two, I check the first array which contains ten elements. They go through a for loop
to get passed into the findlevel functionality. Once the level has been found it gets displayed
the console.
Test Case 3:
In test case three, it follows the same algorithm as the pervious test case. The elements are
preassigned in the array and run through the for loop to get passed to the find level function.
Test Case 4:
In test case four, it follows the same algorithm as the pervious test case. Since there is only one
element in the array it show the height of zero.