|
|
|
-
Create a class
CreateArray that contains the following methods:
-
The
Random class can be instantiated to create an object that will generate (pseudo-)random values. Create a method randomArray :
public static int[] randomArray(int n) { ... }
This method should return an array filled with n randomly generated integers.
-
Create a method
sortedArray :
public static int[] sortedArray(int n) { ... }
This method should return an array filled with n randomly generated integers that are in increasing order.
-
Create a text file
runningtime.txt that contains answers to the following:
-
What is the running time of the
randomArray method you created above? Briefly explain why.
-
What is the running time of the
sortedArray method you created above? Briefly explain why.
- Create a class
Alphabetize that takes
the command line argument args (an array
of strings) and prints the input in alphabetic order.
-
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.
|
|