Searching

Create a client class named Searching that contains static methods for the searching algorithms below. You may use two or more methods that work together to perform each algorithm. Present the following menu to the user in a loop:

1 sequential search
2 binary search
3 exit

that allows the user to choose an algorithm to test. For each algorithm, fill an array of size 300 with 300 pseudorandom integers between 1 and 1000 inclusive. Ask the user to input a value that she is searching for. Then, display the array with each value on a separate line. Finally, display the message "found" or "not found". On each loop iteration when the user is presented with the menu, a new array of pseudorandom integers should be created. Don't allow the user to input invalid menu choices. You may use any sorting algorithm to sort the values for the binary search.

Your program must follow the class Coding Standards.

Preconditions:

    • None

You must hand in the following on separate pages stapled in this specified order:

    1. The source code for the Searching class.