Example #1
0
        public override void Run()
        {
            int marks = Utils.AskUserInteger("Exam Mark");

            Grade.GradeType grade = Grade.ToGrade(marks);

            Console.WriteLine("Your grade was {0} since your scored {1}.", Grade.ToChar(grade), marks);
        }
Example #2
0
        public override void Run()
        {
            string name = Utils.AskUserString("Name");

            Grade.GradeType examGrade       = Grade.ToGrade(Utils.AskUserInteger("Exam Marks"));
            Grade.GradeType courseworkGrade = Grade.ToGrade(Utils.AskUserInteger("Exam Marks"));
            Grade.GradeType targetGrade     = Grade.ToGrade(Utils.AskUserChar("Target Grade"));

            Console.WriteLine("{0}, you achieved a {1} for your Exam Grade in your recent test which is "
                              + (examGrade == targetGrade ? "equal" : (int)examGrade > (int)targetGrade ? "better" : "worse") +
                              " than your TMG of a {2}. You also achieved a {3} in coursework",
                              name, Grade.ToChar(examGrade), Grade.ToChar(targetGrade), Grade.ToChar(courseworkGrade));
        }