Create a Java program with the following requirements:

REQUIREMENTS:

create a one dimensional array, the size will be based on the answer in the "Enter the number of values to be inserted". Example: if the user inputted 8, that means you must create a one dimensional array with the size of 8.

prompt the user to input number (the number of input based on the answer in the "Enter the number of values to be inserted"). save the numbers inputted in your one dimensional arrray.

ask the user for the required N-sort. please note of the two rules in N-sorting under shellsort: (1) zero (0) is not valid N and (2) it can only be ranging from one (1) up to the half of the inputted number of elements. so if the number of elements is 8, that means the valid N is ranging from 1 to 4 only.

after the user inputted the valid value for N, display the numbers inputted earlier and stored in your one dimensional array.

implement the shellsorting afterwards.

OUTPUT:

Enter the number of values to be inserted: 8

Type a number: 8

Type a number: 7

Type a number: 6

Type a number: 5

Type a number: 4

Type a number: 3

Type a number: 2

Type a number: 1

Enter the required N-sort: 7

The N is either less than or more than the required N sort value.

Enter the required N-sort: 0

The N is either less than or more than the required N sort value.

Enter the required N-sort: 4

Current content of the 4-sorted:

8 7 6 5

4 3 2 1

Sorted content of the 4-sorted:

4 3 2 1

8 7 6 5

thanks in advance guys :D