Wyo Java Ch18Proj1

Finish the Ch18Proj1 starter project found in the Handout folder. Complete it by implementing the selectionSort, insertionSort, & bubbleSort methods. You'll find helpful code samples in the Ch 18 Handout folder. Also add linear search and a binary search to the project.

Your program must follow the class Coding Standards. Save the file in your Ch18 network folder.

Preconditions:

    • The user will input a valid integer between 10 and 99 when inputing an integer to search for.

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

    1. The source code for the Ch18Proj1 class.

Wyo Data Structures Ch18Proj1

Create a client class that contains static methods for the sorting & 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 selection sort
2 insertion sort
3 bubble sort
4 merge sort
5 quick sort
6 radix sort
7 heap sort
8 sequential search
9 binary search
10 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. For the searches, the user will also be asked to input the value he/she is searching for. 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. For menu options 1-7, the original unsorted array and the sorted array must both be displayed with each value on a separate line of output. For menu options 8 & 9, the original array should be displayed with each value on a separate line and after allowing the user to input a number, display the message "found" or "not found".

Your program must follow the class Coding Standards. Save the file in your Ch18 network folder.

Preconditions:

    • The user will input a valid integer from 1 to 300 as the array size.
    • The user will input a valid integer from 1 to 10 as the menu option.

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

    1. The source code for the Ch18Proj1 class.