コード例 #1
0
        public override void Print()
        {
            ExcellentPupil ep = new ExcellentPupil();

            ep.Study();
            ep.Read();
            ep.Relax();
            ep.Write();
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: Anil1111/CS_Elementary_2
        static void Main(string[] args)
        {
            Pupil     goodp      = new GoodPupil("Good marks", "Alex", "Papirnyk");
            Pupil     excellentp = new ExcellentPupil("Amazing marks", "Gabe", "Newell");
            Pupil     badpupil   = new BadPupil("Bad marks", "Ivan", "Ivanov");
            Pupil     badpupil1  = new BadPupil("Bad marks", "Ivanov", "Ivanko");
            ClassRoom classRoom  = new ClassRoom(goodp, excellentp, badpupil);

            classRoom.Addpups(badpupil1);
            classRoom.Show();
            Console.ReadLine();
        }