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); }
public static IGradeTracker CreateGradebook() { IGradeTracker book = new ThrowAwayGradebook("Scott's book"); return(book); }