Answer:
Explanation:
The solution code is written in Java.
Firstly, create a method buildArray that takes two parameters, an array and an array size (Line 10).
In the method, use the input size to build an array with size-length (Line 11). Next, create a Random object and use a for loop to repeatedly generate a random integer using the Random object nextInt method. The expression rand.nextInt(90) + 10 will return an integer between 10 - 99. Each generated random integer is assigned as the value for one array item (Line 16).
At last, print out the array to terminal (Line 19).
In the main program, we can test the method by passing an empty array and a value 12 as array size (Line 7). We will get a sample array as follow:
[81, 36, 15, 20, 32, 84, 10, 13, 98, 12, 45, 45]