Question: Please follow the instructions carefully. Please use enhanced forloops when told to do so for JAVA. Also please only use if else and for statements
Actvity 1 Write a program called AnalyzeNumbers. This program will have array that holds 10 random integers from 1 to 5. Output the 10 random numbers to the screen using an enhanced for loop. This program will also have a method called frequency that takes an integer array as the parameter and It will return an array that holds the frequency of numbers. Index 0 will hold the frequency of 1, Index 1 will hold the frequency of 2, and so on. Use this method in your program to create an array that holds the frequency of the random numbers in your array. Use an enhanced for loop to output the frequency of each number. Then display the number that appears the most in your array-you will need to account for numbers appearing the same amount for the mode
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
