Computer Science Canada Mode Method Help |
Author: | Carey [ Mon Jan 22, 2007 10:39 am ] | ||
Post subject: | Mode Method Help | ||
please help me improve my mode method. its only got one problem. the first number in the array does funny things. put in 1,1,1,2,2,2,2,2. the answer should be 5 instances of 2, but the ones get included in there for some reason. ![]()
|
Author: | wtd [ Mon Jan 22, 2007 11:00 am ] |
Post subject: | RE:Mode Method Help |
The code provided is insufficient. It's missing context. Where does this "numbers" array come from? |
Author: | Carey [ Mon Feb 05, 2007 12:00 pm ] |
Post subject: | Re: Mode Method Help |
i don't need help on the rest of the program, but since you asked so nicely here is the whole thing. its a BlueJ project, so if you don't use BlueJ, just delete everything except the Statistics.java file. also ignore the standard deviation image. |
Author: | Carey [ Tue Mar 20, 2007 11:16 am ] |
Post subject: | Re: Mode Method Help |
cmon people!!!! i need some help here!!!! sorry about the necro-post, im desperate |
Author: | McKenzie [ Tue Mar 20, 2007 7:57 pm ] |
Post subject: | Re: Mode Method Help |
I don't see a problem. After adding a main, I try your numbers 1,1,1,2,2,2,2,2 I get mode: 5 of 2. Exactly what I should get. Am I missing something here? |