You will create a set of records for students. Among the data these contain will be a set of grades reported for their various classes. You will read these grade reports from records contained in a file supplied to you.
You sould proceed as follows: first create a class called StudentRecord to contain the student's information. This class should contain the student's name as a single, unchangeable, String and an ArrayList of instances of a class called Grade to be detailed in the next paragraph. This ArrayList will contain one instance of Grade for each grade awarded to the student. The Student Record class should be provided with all the usual functions including accessors. In particular, the class should include a function to add an instance of Grade and another function to compute the student's average grade score.
You should create a class called Grade including the name of the course as a String, the percentage score awarded as a double, the number of credit hours assigned to the course as an int and the date the grade was issued. The date should be an instance of yet another class detailed in the next paragraph.
You should create another class called Date with three fields, all of type int. These should contain the year, the month in the usual manner with January being represented by 1, and the day of the month, again in the usual manner.
A typical student grade record from the supplied file is shown below.
Amaryllis Murgatroyd "Underwater Basket Weaving" 86.4 4 12 14 2016
The various fields are all separated by spaces. The first field in the student's first name. The second field is the student's last name. Each record will have a first and a last name, and each name will be a single word; these two should be combined in the instance of StudentRecord. The third record is the name of the course; since course names frequently include spaces, the name will be enclosed by double quotation marks, as shown. The fourth field is the grade earned as a percentage, that is as a number between 0 and 100. The fifth field is the number of credit hours. The sixth through eighth fields are the month, day and year the grade was awarded.
Your program should read these reports, create a Grade object for each and add it the corresponding StudentReport object, creating it if necessary. There may be several records for a single student, of course. You should collect the StudentReport objects in an appropriate container.
When computing the average grade score, you should weigh each grade by the number of credit hours. That is, the average grade score should be computed according to this formula
averageGradeScore = ( grade1 * hours1 + grade2 * hours2 + ... ) / totalNumberOfHours
Finally, after all the grades are read in, you should print out all the records in the format:
4. Aloysius Vandersnerd 94.7%
5. Amaryllis Murgatroyd 92.1%