Beispiel #1
0
        internal bool HonorRoll(Period p)
        {
            var grades = _studentRow.GetGradeRows().Where(g => g.CourseRow.MarkingPeriod == p);

            if (grades.Any(g => Maintenance.GradePoint(g.LetterGrade) < 1.0))
            {
                return(false);
            }
            if (grades.Count() == 0)
            {
                return(false);
            }
            var avg   = grades.Average(g => Maintenance.GradePoint(g.LetterGrade));
            var lines = grades.Select(g => g.LetterGrade).ToList();

            if (avg >= 2.999)
            {
                return(true);
            }
            return(false);
        }
Beispiel #2
0
        internal double Gpa(Period p)
        {
            var grades = _studentRow.GetGradeRows().Where(g => p.ContainsQuarter(g.CourseRow.MarkingPeriod));

            return(grades.Average(g => Maintenance.GradePoint(g.LetterGrade)));
        }