java & c++ help
hi...i am just new to java &c++..can anyone give me some help with my program..
here is the question:
plz hlep me a little bit..give me some hint
Write a program to keep records and perform statistical analysis for a class of students. The class may have up to 40 students. There are five quizzes during the term. Each student is identified by a four-digit student ID number.
The program is to print the student scores and calculate and print the statistics for each quiz. The output is in the same order as the input; no sorting is needed. The input is to be read from a text file. The output from the program should be similar to the following -
Stud Q1 Q2 Q3 Q4 Q5
1234 78 83 87 91 86
2134 67 77 84 82 79
1852 77 89 93 87 71
High Score 78 89 93 91 86
Low Score 67 77 84 82 71
Average 73.4 83.0 88.2 86.6 78.6
here is the question:
plz hlep me a little bit..give me some hint
Write a program to keep records and perform statistical analysis for a class of students. The class may have up to 40 students. There are five quizzes during the term. Each student is identified by a four-digit student ID number.
The program is to print the student scores and calculate and print the statistics for each quiz. The output is in the same order as the input; no sorting is needed. The input is to be read from a text file. The output from the program should be similar to the following -
Stud Q1 Q2 Q3 Q4 Q5
1234 78 83 87 91 86
2134 67 77 84 82 79
1852 77 89 93 87 71
High Score 78 89 93 91 86
Low Score 67 77 84 82 71
Average 73.4 83.0 88.2 86.6 78.6
0
Comments
Can you be more specific about what part you're having trouble with? Is there a reason your instructor cannot help you?
it should be java...the part i am confusing is that how to read from the file by using the method and then fill it in the array
That sounds like the entire assignment. We're not going to do your homework for you.
you can get file io help from the java doc here:
http://java.sun.com/docs/books/tutorial/essential/io/index.html
check the javadoc for the String class - it will teach you how to use split()
sCount = 0
qCount = 0
read file
while not end of file
{
arrayX[sCount][qCount]= get_int //read numbers till you see a space
for qCount = 0 to 3
{
arrayX[sCount][qCount]= get_int //read numbers till you see a space
qCount+1
}
sCount+1
qCount = 0
}
//rest of code