/** * Generate an array of 10000 random numbers from 0 to 4. * Report the percentage of each number (0,1,2,3 and 4) * Use methods to do each task. */ import java.text.*; import javax.swing.*; public class RandomArray { /** * Creates an array of integers(of size 10000). Fills the array * with integers randomly chosen between 0 and 4. Computes and prints the number * of occurences of each integer as a percentage. */ public void processRandomArray() { // Define an array of integers of size 10000 // Fill the array with random numbers between 0 and 4 // Use the method fillRandomly // Report the percentage of each number // Use the method computeAndPrintReport } /** * Fills an array with random integers between 0 and 4 * @param a the array to fill */ private void fillRandomly(/* What would you write? */) { // Fill the array with random numbers between 0 and 4 } /** * Computes and prints the percentage of occurences of 0,1,2,3 and 4 in an array * @param a the array to scan. */ private void computeAndPrintReport(int[] a) { } }