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;
        }
示例#2
0
        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);
        }
示例#3
0
        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);
        }
示例#4
0
        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;
        }
示例#5
0
 public override ExamResult Check()
 {
     var result = new ExamResult(this.Score, this.minGrade, this.maxGrade, "Exam results calculated by score.");
     return result;
 }
示例#6
0
 /// <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;
 }
示例#7
0
        /// <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);
        }