public override ExamResult Check() { int grade = 0; string comments = null; if (this.ProblemsSolved == 0) { grade = 2; comments = "Bad result: nothing done."; } else if (this.ProblemsSolved == 1) { grade = 4; comments = "Bad result: nothing done."; } else if (this.ProblemsSolved == 2) { grade = 6; comments = "Bad result: nothing done."; } ExamResult examResult = new ExamResult(grade, 2, 6, comments); return examResult; }
public override ExamResult Check() { int grade = 0; string comments = null; if (this.ProblemsSolved == 0) { grade = 2; comments = "Bad result: nothing done."; } else if (this.ProblemsSolved == 1) { grade = 4; comments = "Bad result: nothing done."; } else if (this.ProblemsSolved == 2) { grade = 6; comments = "Bad result: nothing done."; } ExamResult examResult = new ExamResult(grade, 2, 6, comments); return(examResult); }
public override ExamResult Check() { if (this.Score < 0 || this.Score > 100) { throw new ArgumentException("Score is less than zero or bigger than 100"); } ExamResult examResult = new ExamResult(this.Score, 0, 100, "Exam results calculated by score."); return(examResult); }
public override ExamResult Check() { if (this.Score < 0 || this.Score > 100) { throw new ArgumentException("Score is less than zero or bigger than 100"); } ExamResult examResult = new ExamResult(this.Score, 0, 100, "Exam results calculated by score."); return examResult; }
public override ExamResult Check() { var result = new ExamResult(this.Score, this.minGrade, this.maxGrade, "Exam results calculated by score."); return result; }
/// <summary> /// Calculates the exam result. /// </summary> /// <returns>The result.</returns> public override ExamResult CalculateReesult() { ExamResult result = new ExamResult(this.Score, this.MinGrade, this.MaxGrade, "Exam results calculated by score."); return result; }
/// <summary> /// Calculates the exam result. /// </summary> /// <returns>The result.</returns> public override ExamResult CalculateReesult() { ExamResult result = new ExamResult(this.Score, this.MinGrade, this.MaxGrade, "Exam results calculated by score."); return(result); }