コード例 #1
0
ファイル: Program.cs プロジェクト: Vedyakov11/C-charp-2
        static void Main(string[] args)
        {
            Pupil p1 = new BadPupil();
            Pupil p2 = new ExcelentPupil();

            ClassRoom group = new ClassRoom(p1, p2);

            group.Study();
            Console.WriteLine(new string('-', 30));
            group.Read();
            Console.WriteLine(new string('-', 30));
            group.Write();
            Console.WriteLine(new string('-', 30));
            group.Relax();

            Console.ReadKey();
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: M1raTuS/-sharp_essential
        static void Main(string[] args)
        {
            Pupil p1 = new BadPupil();
            Pupil p2 = new GoodPupil();
            Pupil p3 = new ExcelentPupil();
            Pupil p4 = new Pupil();

            ClassRoom room1 = new ClassRoom(p1, p2, p3);

            room1.Study();
            Console.WriteLine(new string('*', 20));
            room1.Read();
            Console.WriteLine(new string('*', 20));
            room1.Write();
            Console.WriteLine(new string('*', 20));
            room1.Relax();
            Console.ReadKey();
        }