Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            GradeBook book = new ThrowAwayGradebook();

            book.AddGrade(91);
            book.AddGrade(89.5f);
            book.AddGrade(75);
            GradeStatistics stats = book.ComputeStatistics();

            WriteResult("Average", stats.AverageGrade);
            WriteResult("Highest", stats.HighestGrade);
            WriteResult("Lowest", stats.LowestGrade);
            WriteResult("Grade", stats.LetterGrade);
        }
Ejemplo n.º 2
0
        public static IGradeTracker CreateGradebook()
        {
            IGradeTracker book = new ThrowAwayGradebook("Scott's book");

            return(book);
        }