FIRST, understand that I'm not merely seeking the answer to this assignment question. I'd like to learn!
First, I'll overview the question:
I am to write a program that takes a list of data integers in the range [1,3]. The list is supposed to be white-space separated. With this data set, I am to calculate the mode, the frequency of the mode and the variance (I am given a formula). The program should work with any size data set ending in 0. I.e., 0 indicates the end of user input.
Here is a sample session I was given in the question:
Please provide a list of integer data points in range [1-3].
Indicate the end of your list with 0.
1 3 2 1 1 1 1 1 2 3 2 1 2 3 2 2 0
The mode is: 1
The frequency of the mode is: 7
The mean is: 1.75
The variance is: 0.5625
Can anyone get me started on this? I'm really confused. I know that I'm going to have to use while statements, and to use nextLine.
Any help would be appreciated!