unyime inok

Greenhorn
+ Follow
since Oct 13, 2004
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by unyime inok

the calStandardDev() works if you're assigning values to the array directly or reading from the keyboard, doesn't work if you're reading from a file. once i fix the readInteger() it should be fine.
19 years ago
the specification requires that the numbers be read and stored into an array, then use that to calculate the average and standard dev. Now the only problem is that the zero that gets returned if the end of file has been reached gets stored also, increasing the length of the array, thus giving an incorrect output for the standard dev.
19 years ago
Hi David,
I've not yet fixed, I just realized that the problem is from my readInteger() , so i'm trying to figure out how to fix that.
19 years ago
i don't know why i don't get the correct output over here, probably because i'm reading from a file. i've tried everything or could it be the editor i'm using? i tried running with NetBeans IDE and Drjava, but i still get wierd answers for the standard dev. Anyway, thanks for your time and concern Joyce.
19 years ago
Hi joyce,
thanks for your time. from 1,2,3 the average is suppose to = 2(i.e 1+2+3/3)
while the standard dev = 1.
I'm reading my input from a file and the values are
45
5
53
7
88
32
2
1
5
The results i get are:
The Average is: 26.444444444444443
The Standard is: 26.789359534381877

Average is correct, but standard dev is suppose to = 30.4389188


Below is the class i'm reading the file from:

19 years ago
Hi., i'm reading integers from a file. i've been to read input from the file and also calculate the average, but the standard deviation is yielding the wrong output, help please.what should i change or add.





19 years ago
Please help me figure out why my calStandardDev() is giving an incorrect answer
19 years ago
Please help me figure out why my calStandardDev() is giving an incorrect answer.



19 years ago
Thanks a lot. i'll try doing that.
19 years ago
how do i fix this please?
java.lang.ArrayIndexOutOfBoundsException: 50
at IntFile1.readInteger(IntFile1.java:54)




19 years ago
Thanks, i got it figured out
19 years ago
can someone please help me resolve this Error:java.io.FileNotFoundException? i'm trying to open a text file and it's saved in the same directory as the java program that i'm using to open it but i'm getting the above error.
19 years ago
can someone please help me resolve this Error:java.io.FileNotFoundException? i'm trying to open a text file and it's saved in the same directory as the java program that i'm using to open it but i'm getting the above error.
19 years ago
Thank you for your responses
19 years ago
i did that already, but i still get the same error. the file i'm trying to open is in the same directory and i used the same editor to create it.
19 years ago