I am taking an online class and the projects went from easy to difficult real fast. Now i think I just don't understand the material enough to program this project.
The program takes a .txt file and changes it into a .csv in excel. Takes the names and grades in the file to match up with a name, midterm, project, final
test, and average of the grades section above.
There are three classes , a Finalproject, Student and Grade.
Here is what my teacher said to do for the part I am stuck on:
The grades[] array in the Student class is made up of Grade objects, not int primitives.
The format of the input file is exactly the same as the ClassGrader project, i.e., there are 3 lines of grade information after the student name, so setGradesFromFile (method of the Student object just created from the line of text with the name) should be reading those 3 lines, only, and putting the result of each line into grades[].
Then you need to read 3 lines in the file, i.e., in a loop (for (int i = 0; i < 3; i++)). If you do not use a loop, you would need to repeat that code you have 3 times (plus another step).
Use the int grade value you have to create (i.e., new) a Grade object, and use the loop index to put that object into the grades array.
My attempt on the Student Class:
I have no clue what I am doing for the setGradesFromFile method.