Beispiel #1
0
 public static void RenderStatistics(IBook book)
 {
     try
     {
         var statistics = book.ComputeStatistics();
         Console.WriteLine($"Grade Book: {book.Name}");
         Console.WriteLine($"The average grade is {statistics.Average:N2}");
         Console.WriteLine($"The highest grade is {statistics.HighestGrade:N2}");
         Console.WriteLine($"The lowest grade is {statistics.LowestGrade:N2}");
         Console.WriteLine($"The letter grade is {statistics.Letter}");
     }
     catch (Exception exception)
     {
         Console.WriteLine(exception.Message);
     }
 }