Write a program to create an array of integers of size 10. Then, the program should generate and insert random numbers between 1 and 50, inclusive into the array. Next, the program should print the array as output. Then, the program should generate another random number between 0 and 9, inclusive and print this value too. This number represents the position in the array (e.g. 0 represents the 1st position in the array). Then, shift the entire numbers one place to the right and insert 99 into this random position. Assume that the number in the right-most position of the original array will be lost during the shift. There is no user input for this program.
Your program must include, at least, the following methods:
• insertNumbers, which will take as input one integer array and store the random numbers in it.
• generatePosition, which will generate and return the random position to be inserted into.
A sample run of the program is shown below:
Sample output #1:
Array: 43 14 8 12 1 23 15 4 2 14
Random position: 2
Final Array: 43 14 99 8 12 1 23 15 4 2
Please help me!