Final Answer:
To work through this project incrementally, you should follow the suggested sequence of steps provided:
Write the GradeBook constructor that reads student information from the data file into the ArrayList roster.
Create the Grade class.
Modify the Student class to include an ArrayList of Grade.
Finish writing the GradeBook constructor to process the grades as they are read in from the data file.
Step-by-step explanation:
The provided question is asking you to work through a project in incremental steps, focusing on one sub-problem at a time. The first step is to write the GradeBook constructor that reads student information from the data file into the ArrayList roster. This involves reading the data file and populating the ArrayList with the student information. You should test this step before moving on to the next step.
Next, you need to create the Grade class. This involves defining the properties and methods of the Grade class, such as the grade value and the student’s name. You should test this step before modifying the Student class to include an ArrayList of Grade.
Once you have created the Grade class, you can modify the Student class to include an ArrayList of Grade. This involves adding a new field to the Student class to store the ArrayList of Grade and modifying the constructor to initialize this field. You should test this step before moving on to the final step.
Finally, you need to finish writing the GradeBook constructor to process the grades as they are read in from the data file. This involves reading the data file, populating the roster with the student information, and then populating the GradeBook with the grades for each student. You should test this step to ensure that the GradeBook is correctly populated with the grades.