예제 #1
0
파일: Program.cs 프로젝트: huba95/Grades
 private static void AddingGrades(Trowawaygb book)
 {
     book.AddGrade(91);
     book.AddGrade(89.5f);
     book.AddGrade(75);
     book.AddGrade(99);
 }
예제 #2
0
파일: Program.cs 프로젝트: huba95/Grades
        private static void GradeStatistics(Trowawaygb book)
        {
            GradeStatistics stats = book.ComputeStatistics();

            Console.WriteLine(book.Name);
            WriteResult("Average", stats.AverageGrade);
            WriteResult("Highest", stats.HighestGrade);
            WriteResult("Lowest", stats.LowestGrade);
        }
예제 #3
0
파일: Program.cs 프로젝트: huba95/Grades
 private static void ShowingGrades(Trowawaygb book)
 {
     using (StreamWriter outputfile = File.CreateText("grades.txt"))
     {
         book.WriteGrades(outputfile);
         //outputfile.Close();
     }
     book.WriteGrades(Console.Out);
 }
예제 #4
0
파일: Program.cs 프로젝트: huba95/Grades
        static void Main(string[] args)
        {
            SpeechSynthesizer synth = new SpeechSynthesizer();

            synth.Speak("Hello! This is the Grade book program by HuBa 95 ");
            Trowawaygb book = new Trowawaygb();

            book.NameChanged = new NameChangedDelegate(OnNameChanged);
            NameBook(book);
            AddingGrades(book);
            ShowingGrades(book);
            GradeStatistics(book);
            Console.ReadKey();
        }