John is a novice biological statistician. His first assignment given to him by his mentor, Mrs Jane, is to conduct a survey on 30 exotic plants and to note the number of flowers they produce during a period of one month.
The results collected as as follows:!
0 1 1 3 3 3
2 4 2 1 5 0
1 2 4 5 4 3
1 1 3 1 0 1
1 2 4 1 2 1
Since John knows that he will have to conduct such surveys frequently, he is intending to have a program which will accept data (as shown above) as inputs and then output the data in the form of a frequency table as shown below.
x 0 1 2 3 4 5
f 3 11 5 5 4 2
The program should also output the mean, median and range.
samuelmathews
0
Newbie Poster
Recommended Answers
Jump to PostYou just copy/pasted your assignment without even a moment taken to explain what help you need. That's highly disrepestectful to the many people who give their time to help others here.
There are lots of people here who will freely give their time to help you become the best Java …
Jump to PostOK
You can use a Scanner to read the data from the user, then store it into an array or arrays.
You can use loops to go through all the data in the array(s) to perform the calculations, the print the results to System.out
All 8 Replies
rproffitt
2,565
"Nothing to see here."
Moderator
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
samuelmathews
0
Newbie Poster
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
samuelmathews
commented:
thankyou sooo much,
+0
rproffitt
2,565
"Nothing to see here."
Moderator
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
rproffitt
2,565
"Nothing to see here."
Moderator
jwenting
1,889
duckman
Team Colleague
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.