Exemple #1
0
        static void Main(string[] args)
        {
            Pupil     p1     = new ExcellentPupil();
            Pupil     p2     = new GoodPupil();
            ClassRoom _class = new ClassRoom(p1, p2);

            _class.Read();
            _class.Write();
            _class.Relax();
            _class.Study();
            Console.ReadKey();
        }
Exemple #2
0
        static void Main(string[] args)
        {
            Pupil pupil_1 = new ExcelentPupil();
            Pupil pupil_2 = new GoodPupil();

            ClassRoom classRoom = new ClassRoom(new Pupil[] { pupil_1, pupil_2 });

            Console.WriteLine("Study");
            classRoom.Study();

            Console.WriteLine("Read");
            classRoom.Read();

            Console.ReadKey();
        }
Exemple #3
0
        static void Main(string[] args)
        {
            Pupil p1 = new ExcelentPupil();
            Pupil p2 = new GoodPupil();
            Pupil p3 = new BadPupil();

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

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


            Console.ReadKey();
        }
 private void AddIdentifyedPupil(GoodPupil g)
 {
     gPupilsList.Add(g);
 }