コード例 #1
0
ファイル: Program.cs プロジェクト: yasamansh/Grades
        static void Main(string[] args)
        {
            //SpeechSynthesizer synth = new SpeechSynthesizer();
            //synth.Speak("Hello Yasaman This is the grade book program");

            GradeBook book = new GradeBook();

            book.NameChanged += new NameChangedDelegate(OnNameChanged);

            book.Name = "Yasaman's Grade Book";
            book.Name = "Yasi's book";

            book.AddGrade(91);
            book.AddGrade(89.5f);
            book.AddGrade(75);

            GradeStatistics stat = book.ComputeSatistics();

            Console.WriteLine(book.Name);

            WriteResult("Average", stat.AverageGrade);
            WriteResult("Highest Grade", (int)stat.HighetGrade);
            WriteResult("Lowest Grade", stat.LowestGrade);

            Console.ReadLine();
        }