예제 #1
0
        static void Main(string[] args)
        {
            ClassRoom room = new ClassRoom(new GoodPupil(), new GoodPupil(), new BadPupil(), new ExcelentPupil());

            room.GetReadInfo();
            Console.ReadKey();
        }
예제 #2
0
        static void Main(string[] args)
        {
            ClassRoom classRm = new ClassRoom(new BadPupil(), new GoodPupil(), new ExcelentPupil());

            classRm.ShowPupilsPerfomance();

            Console.ReadKey();
        }
예제 #3
0
 static void Main(string[] args)
 {
     ExcelentPupil excelent = new ExcelentPupil("Masha", "Ivanovna", 12);
     GoodPupil good = new GoodPupil("Petya", "Petrov", 11);
     ClassRoom classRoom = new ClassRoom(excelent, good);
     classRoom.OutputInformation();
     Console.ReadLine();
 }
예제 #4
0
파일: Program.cs 프로젝트: Stargik/C-Base
        static void Main(string[] args)
        {
            ExcelentPupil excelentPupil = new ExcelentPupil();
            GoodPupil     goodPupil     = new GoodPupil();
            BadPupil      badPupil      = new BadPupil();
            ClassRoom     classRoom     = new ClassRoom(excelentPupil, goodPupil, badPupil);

            classRoom.GetInformation();
        }
예제 #5
0
        static void Main(string[] args)
        {
            Pupil     p1      = new ExcelentPupil("Ivan Ivanov");
            Pupil     p2      = new GoodPupil("Petr Zubov");
            ClassRoom class1A = new ClassRoom(p1, p2);

            class1A.Print();
            Console.ReadKey();
        }
        static void Main(string[] args)
        {
            ClassRoom classRoom = new ClassRoom(new ExcelentPupil(), new GoodPupil(), new BadPupil());

            classRoom.PrintInfoStudy();
            classRoom.PrintInfoRead();
            classRoom.PrintInfoWrite();
            classRoom.PrintInfoRelax();

            Console.ReadKey();
        }
예제 #7
0
        static void Main(string[] args)
        {
            ClassRoom classRoom = new ClassRoom(new ExcelentPupil(), new GoodPupil(), new BadPupil());

            classRoom.Study();
            Console.WriteLine(new string('-', 50));
            classRoom.Read();
            Console.WriteLine(new string('-', 50));
            classRoom.Write();
            Console.WriteLine(new string('-', 50));
            classRoom.Relax();
        }
예제 #8
0
        static void Main(string[] args)
        {
            Pupil         p1            = new Pupil();
            Pupil         p2            = new Pupil();
            Pupil         p3            = new Pupil();
            ClassRoom     classRoom     = new ClassRoom(p1, p2, p3);
            ExcelentPupil excelentPupil = new ExcelentPupil();
            GoodPupil     goodPupil     = new GoodPupil();
            BadPupil      badPupil      = new BadPupil();

            p1.Read();
        }
예제 #9
0
        static void Main(string[] args)
        {
            ClassRoom classRoom = new ClassRoom(
                new GoodPupil(),
                new Pupil()
                );

            classRoom.Study();
            classRoom.Write();
            classRoom.Read();
            classRoom.Relax();
        }
        static void Main(string[] args)
        {
            List <Pupil> pupils = new List <Pupil>()
            {
                new ExcelentPupil("Excelent Erick"),
                new GoodPupil("Good John"),
                new BadPupil("Bad Vasya"),
                new GoodPupil("Good Kolya")
            };

            ClassRoom classRoom = new ClassRoom(pupils);

            classRoom.ShowInfo();

            Console.ReadKey();
        }
예제 #11
0
        static void Main(string[] args)
        {
            Pupil[] pupil =
            {
                new Pupil("Елена Громова"),
                new Pupil("Матвей Шимаев"),
                new Pupil("Тамара Ермолова"),
                new Pupil("Николай Терещенко")
            };
            //Экземпляр classRoom типа ClassRoom, на 25 строке, позволяет передавать от 2 до 4 аргументов в пользовательский конструктор
            ClassRoom classRoom = new ClassRoom(pupil[0], pupil[1]);

            classRoom.GetPupilInformation();

            Console.ReadKey();
        }
예제 #12
0
        static void Main()
        {
            Student s1 = new GoodStudent();
            Student s2 = new BadStudent();
            Student s3 = new ExcelentStudent();
            Student s4 = new Student();

            ClassRoom group = new ClassRoom(s1, s2, s3, s4);

            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();
        }
예제 #13
0
        static void Main(string[] args)
        {
            Pupil firstPupil  = new ExcelentPupil();
            Pupil secondPupil = new GoodPupil();
            Pupil thirdPupil  = new ExcelentPupil();
            Pupil fourthPupil = new BadPupil();

            ClassRoom classRoom = new ClassRoom(firstPupil, secondPupil, thirdPupil, fourthPupil);

            foreach (Pupil p in classRoom.Pupils)
            {
                p.Descr();
                p.Study();
                p.Read();
                p.Write();
                p.Relax();
                Console.WriteLine();
            }

            Console.ReadLine();
        }