Question: THIS PROGRAM MUST BE WRITTEN IN JAVA! The main problem is the mode. If I were to enter: 1 1 2 2 3 3, the

THIS PROGRAM MUST BE WRITTEN IN JAVA!

THIS PROGRAM MUST BE WRITTEN IN JAVA! The main problem is the

The main problem is the mode.

If I were to enter: 1 1 2 2 3 3, the mode display should be "No Mode"

If I were to enter: 1 1 2 2 3 4. the mode display should be 1 and 2

If i were to enter 1 1 2 2 3 3 4, the mode display should be 1, 2, and 3

//Here is my mode method:

public static int findMode(int[] g) { int MaxNumber = -1; int MaxFreq = -1; for(int i = 0; i MaxFreq) { MaxNumber = g[i]; MaxFreq = count; } } return MaxNumber; }

It does not do any of which is intended, and frankly, I am not sure how.

I would extremely appreciate it if the mode method was submitted as an answer that does the following:

If I were to enter: 1 1 2 2 3 3, the mode display should be "No Mode"

If I were to enter: 1 1 2 2 3 4. the mode display should be 1 and 2

If i were to enter 1 1 2 2 3 3 4, the mode display should be 1, 2, and 3

StatPack Obiective To perform a statistical analysis on a set of data. Assignment Write a program that inputs integer data into an array and performs a variety of statistical computations. The array should be of user-defined size and have the option of random fill or user entry. For random fill, the range of values should be [1, array.length * 2]. Functionality should include the following: Display Displays the array to the screen in a neat, organized fashion (e.g. 10 or 20 integers per line) Sorts the data from least to greatest. Use Arrays.sort () Arithmetic average Middle value if the length of the array is odd; average of the two middle Sort Mean Median values if the length is even Most frequently occurring value(s), if any Difference between the highest and lowest values Mode Range Standard deviation S

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!