Question: The IntBinarySearcher class represented in this chapter searches an int array for a specific value. Create an ObjectBinarySearcher class that can search an array of
The IntBinarySearcher class represented in this chapter searches an int array for a specific value. Create an ObjectBinarySearcher class that can search an array of comparable objects. Demonstrate the class in a program that searches for a String in an array of String objects.
You need to write an ObjectBinarySearcher class. (Note: This is an extension of above question. You need to modify IntBinarySearcher class from above so that it can search an array of Comparable objects.) You need to rewrite the search method so that it is a generic method. It should use generic notation to accept an array of any objects that implement the Comparable interface.
Create a separate Demonstration class to demonstrate the class in an application.
Please make sure you comment your code thoroughly.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
