Beispiel #1
0
 public void TestHighestGrade()
 {
     Grades.GradeBook g = new Grades.GradeBook();
     g.AddGrade(91);
     g.AddGrade(84.5f);
     Assert.AreEqual(g.ComputeStatistics().Highest, 91f);
 }
Beispiel #2
0
        public void TestLowesttGrade()
        {
            Grades.GradeBook g = new Grades.GradeBook();
            g.AddGrade(91);
            g.AddGrade(84.5f);
            GradeBookStatistics s = g.ComputeStatistics();

            Assert.AreEqual(s.Lowest, 84.5f, 0.00001);
        }
Beispiel #3
0
 public void computesHighestGrade()
 {
     Grades.GradeBook book = new Grades.GradeBook();
     book.AddGrade(78);
     book.AddGrade(99);
     book.AddGrade(1);
     Grades.Statistics result = book.ComputeStatistics();
     Assert.AreEqual(99, result.GetHighestGrade());
 }
Beispiel #4
0
 public void computeLetterGrade()
 {
     Grades.GradeBook book = new Grades.GradeBook();
     book.AddGrade(78);
     book.AddGrade(99);
     book.AddGrade(1);
     Grades.Statistics result = book.ComputeStatistics();
     Assert.AreEqual("F", result.LetterGrade);
 }
Beispiel #5
0
 public void computeAverageGrade()
 {
     Grades.GradeBook book = new Grades.GradeBook();
     book.AddGrade(78);
     book.AddGrade(99);
     book.AddGrade(1);
     Grades.Statistics result = book.ComputeStatistics();
     Assert.AreEqual(59.33, result.GetAverGrade(), 0.01);
 }
Beispiel #6
0
        public void TestAveragetGrade()
        {
            Grades.GradeBook g = new Grades.GradeBook();
            g.AddGrade(91);
            g.AddGrade(89.5f);
            g.AddGrade(75);

            GradeBookStatistics s = g.ComputeStatistics();

            Assert.AreEqual(s.Average, 85.166666666667f, 0.01);
        }