static void Main(string[] args) { string student = ""; IWCCGraduation grad = new IWCCGraduation(); student = GetStudentName(); grad.Name = student; WriteLine(); grad.EnterGrades(); grad.CalcGPA(); grad.PrintGrades(); WriteLine(); CanGraduate(grad); }
public static void CanGraduate(IWCCGraduation graduate) { bool canGrad = false; canGrad = graduate.MissingClasses(); if (canGrad == 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); } }