Sorting

Create a client class named Sorting that contains static methods for the sorting 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 merge sort
7 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. 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.

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 Sorting class.