Question: This week I want you to implement a binary search method for our OrderedArray subclass. The source code for the OrderedArray subclass and the Array

This week I want you to implement a binary search method for our OrderedArray subclass. The source code for the OrderedArray subclass and the Array class it inherits from will be made available to you. To refresh your memory, binary search takes the midpoint between an upper and lower bound and checks to see if the value there is less than, greater than, or equal to the search value. After each search approximately half of the values in the array should be eliminated by shifting one of the bounds. There are several correct ways to implement binary search, you just have to choose one of them.
What to Submit
You can just submit the implementation file for your OrderedArray class with the BinarySearch() implementation, but if you upload all of your source files, that's fine too. Just at least include that one.
 This week I want you to implement a binary search method

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!