Browse Source

Added hasPassed() in Student Class

remotes/origin/fdai7600
fdai7600 11 months ago
parent
commit
ed268db148
  1. 5
      src/main/java/org/example/Student.java

5
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;
}
}
Loading…
Cancel
Save