@Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof Exam)) return false;

        Exam exam = (Exam) o;

        if (name != null ? !name.equals(exam.name) : exam.name != null) return false;
        if (questions != null ? !questions.equals(exam.questions) : exam.questions != null) return false;
        if (subject != null ? !subject.equals(exam.subject) : exam.subject != null) return false;

        return true;
    }