|
@ -111,6 +111,13 @@ public class Student { |
|
|
this.courseGrades.put(course, grade); |
|
|
this.courseGrades.put(course, grade); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void printGrades() { |
|
|
|
|
|
System.out.println("Grades for Student ID: " + this.studentId + ", Name: " + this.studentName); |
|
|
|
|
|
for (Map.Entry<Course, String> entry : courseGrades.entrySet()) { |
|
|
|
|
|
Course course = entry.getKey(); |
|
|
|
|
|
String grade = entry.getValue(); |
|
|
|
|
|
System.out.println("Course: " + course.getCourseName() + " (" + course.getCourseID() + "), Grade: " + (grade != null ? grade : "Not graded yet")); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |