-
Create a class
CreateArraythat contains the following methods:-
The
Randomclass can be instantiated to create an object that will generate (pseudo-)random values. Create a methodrandomArray:public static int[] randomArray(int n) { … }This method should return an array filled with
nrandomly generated integers. -
Create a method
sortedArray:public static int[] sortedArray(int n) { … }This method should return an array filled with
nrandomly generated integers that are in increasing order. Hint: call your function from (a) and then sort the result.
-
The
-
Create a text file
runningtime.txtthat contains answers to the following:-
What is the running time of the
randomArraymethod you created above? Briefly explain why. -
What is the running time of the
sortedArraymethod you created above? Briefly explain why.
-
What is the running time of the
-
Create a text file named
time.txt. In it, indicate how long it took you to complete this lab exercise.
When you're done, create a ZIP file containing all of the files you created for this lab and submit it with the submission server.