diff --git a/src/main/java/org/example/Student.java b/src/main/java/org/example/Student.java index 02b0053..1164be2 100644 --- a/src/main/java/org/example/Student.java +++ b/src/main/java/org/example/Student.java @@ -142,4 +142,9 @@ public class Student { return totalCredits > 0 ? totalWeightedGrades / totalCredits : 0.0; } + + public boolean hasPassed() { + double averageGrade = calculateAverageGrade(); + return averageGrade >= 10; + } }