public virtual double GetGPA(char letterGrade, StudentType studentType) { int result; switch (letterGrade) { case 'A': result = 4; break; case 'B': result = 3; break; case 'C': result = 2; break; case 'D': result = 1; break; default: result = 0; break; } if ((IsWeighted == true) && (studentType.In(StudentType.Honors, StudentType.DualEnrolled))) { result++; } return(result); }