Hi everyone, I have to make a program that reads a txt file after reading it, show it in a richtext box and in another tab make the average of the grades the input received sort it by the student id and then in the same rtb sort it by the average of their grades, and finally save it on a new text file.
The text file input is something like this
12 3 10.0 6.9 7.3
19 2 6.7 9.3
10 3 4.5 9.3 4.5
and the output should look like this
sorted by student ID
10 6.1 4.5 9.3 4.5
12 8.1 10.0 6.9 7.3
19 5.3 6.7 9.3
sorted by grade average
12 8.1 10.0 6.9 7.3
10 6.1 4.5 9.3 4.5
19 5.3 6.7 9.3
As you noticed in the input the first number is the student ID, the second number is the number of tests made by the student, and the other 3 numbers are grades, in the output the first number is the student ID, the second number is the average of the tests, and the other 3 numbers are grades, I don't have a problem opening and saving a text file and neither creating a tab with 2 RTB , my problem is how do I tokenize or read the input line by line, i guess that i need to use the split function but I don't know how to implement it into the program.
Hope you can help me guys btw im using vb net 2008.
Thanks in advance