import java.util.Scanner; public class Histogram { public static void main(String[] args) { Scanner s = new Scanner(System.in); System.out.println("How many elements will be in the array?"); int numElements = s.nextInt(); int[] nums = makeArray(numElements); //nums will only contain the numbers 1 to 10 int [] f = createFrequencyArray(nums); int biggest = mostAppearances(f);//this method should return the largest value within the array createHistogram(f, biggest);//This should show how many times each value from 1 to 10 appears in the array. } public static int mostAppearances(int[] freq) { //write a method that will return the largest number in the array return 0; } public static int[] makeArray(int num) { int[] nums = new int[num]; for(int x=0; x < num; x++) { //Fill each index with a random value 1 to 10 } return nums; } public static int[] createFrequencyArray(int[] n) { int [] freq = new int[11]; for(int x = 0; x < n.length; x++) { //One line of code needed } return freq; } public static void createHistogram(int[] f, int big) { //This method will output a histogram based on the contents of the freq integer array } }