コード例 #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
ファイル: Program.cs プロジェクト: archermarc085/Inheritance
 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();
        }
コード例 #6
0
        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
ファイル: Program.cs プロジェクト: 5avel/InheritanceTasks
        static void Main(string[] args)
        {
            ClassRoom classRoom = new ClassRoom(
                new GoodPupil(),
                new Pupil()
                );

            classRoom.Study();
            classRoom.Write();
            classRoom.Read();
            classRoom.Relax();
        }
コード例 #10
0
        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
ファイル: Program.cs プロジェクト: Loarlam/Lesson3_task2
        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();
        }