Beispiel #1
0
        static void Main(string[] args)
        {
            IWCCGraduation grad = new IWCCGraduation();

            grad.Name = GetStudentName();
            WriteLine();
            grad.EnterGrades();
            grad.CalcGpa();
            grad.PrintGrades();
            WriteLine();
            CanGraduate(grad);
        }
Beispiel #2
0
        public static void CanGraduate(IWCCGraduation graduate)
        {
            bool grad = false;

            grad = graduate.MissingClasses();

            if (grad == true)
            {
                WriteLine("{0} may not graduate due to above missing or failed classes.", graduate.Name);
            }
            else if (graduate.GPA < 2.00)
            {
                WriteLine("{0} may not graduate due to insuffucent GPA of {1:F2}.", graduate.Name, graduate.GPA);
            }
            else
            {
                WriteLine("{0} may graduate with a {1:F2} GPA.", graduate.Name, graduate.GPA);
            }
        }