001package edu.pdx.cs410J.grader.poa;
002
003import edu.pdx.cs410J.grader.gradebook.Assignment;
004import edu.pdx.cs410J.grader.gradebook.Student;
005
006public class RecordGradeEvent {
007  private final double score;
008  private final Student student;
009  private final Assignment assignment;
010  private final boolean late;
011
012  public RecordGradeEvent(double score, Student student, Assignment assignment, boolean late) {
013    this.score = score;
014    this.student = student;
015    this.assignment = assignment;
016    this.late = late;
017  }
018
019  public double getScore() {
020    return score;
021  }
022
023  public Student getStudent() {
024    return student;
025  }
026
027  public Assignment getAssignment() {
028    return assignment;
029  }
030
031  public boolean isLate() {
032    return late;
033  }
034
035  @Override
036  public String toString() {
037    return "Record " + (isLate() ? "late" : "on-time") + " grade of " + getScore() + " for " +
038      getStudent().getFullName() + " on " + getAssignment().getName();
039  }
040}