Write the class CompletedCourse, which represents a course a student has taken and completed. You should appropriately decide which methods to provide.
public final class CompletedCourse {
public final String courseName;
private final int term;
private final int year;
private final int units;
private final int letterGrade
...
What to do?
...
}
Furthermore, write getGPA, a function that takes in an array of CompletedCourses and returns the GPA. each letter grade is assigned a numeric score between 0 and 4 as normal.
The GPA is a weighted average of these scores, and the weighing is proportional to the course units.
public class Test {
public static double getGPA(CompletedCourse[] course_arr) {
...
What to do?
...
} }