C# (2D – Arrays help!)

Hello everyone,

I am currently working on this problem and will need a bit of assistance.

I have created the text file to hold all the peer evaluation values: 5 lines composed of 5 values each separated by commas. What I specifically need help with is how to correctly open, read text from file and load the values into variables in order to perform calculations.


Write an application to calculate student grades for a group project. Create a text file to store names of 5 students, line by line. In a separate file enter peer evaluations from 0 to 1.0. Enter these numbers for evals:






This means that student 1 gave 1.0 eval for him- herself, 0.8 for student 2, 0.9 for student 3 etc. Student 2 gave 0.2 for student 1, 0.9 for him- herself, 0.5 for student 3 etc. Read these into a 2-dimensional array. If any of the values is greater than 1.0, set them to 1.0. The program should calculate the average eval for a student. While doing so, the program should ignore evals that student gave to him-herself. Populate a list box with student names when the form loads. The user should enter a project grade (same for everyone) in a textbox. Then the user can select a student from a list and click “Calculate” button. The program should display the project grade for that student by multiplying average eval by the grade for the whole group (project grade).

by willyfong via /r/csharp

Leave a Reply