Example #1
0
        public static void UniverHW()
        {
            University univer = new University();

            var techHeadmaster = new HeadOfDepartment("Albus", "Dumbledore", UniversityDepartment.Tech, AllExistingGenders.Male);
            var mathHeadmaster = new HeadOfDepartment("Victoria", "Vector", UniversityDepartment.Math, AllExistingGenders.Female);
            var histHeadmaster = new HeadOfDepartment("Bobby", "Pins", UniversityDepartment.History, AllExistingGenders.Male);

            var techTeacher = new Teacher("Severus", "Snape", UniversityDepartment.Tech, AllExistingGenders.Male);
            var mathTeacher = new Teacher("Minerva", "MacGonagall", UniversityDepartment.Math, AllExistingGenders.Female);
            var histTeacher = new Teacher("Anna", "Zauceva", UniversityDepartment.History, AllExistingGenders.Female);

            var techStudent = new Student("Sergei", "Tishkov", UniversityDepartment.Tech, AllExistingGenders.Male);
            var mathStudent = new Student("Aleksandr", "Maisak", UniversityDepartment.Math, AllExistingGenders.Male);
            var histStudent = new Student("Anton", "Akulenok", UniversityDepartment.History, AllExistingGenders.Male);

            univer.AddPeoples(techHeadmaster, techTeacher, techStudent, mathHeadmaster, mathTeacher, mathStudent, histHeadmaster, histTeacher, histStudent);

            Console.WriteLine("\n\nПробуем добавить такого же человека снова:");

            var techTeacher1 = new Teacher("Severus", "Snape", UniversityDepartment.Tech, AllExistingGenders.Male);

            univer.AddPeople(techTeacher1);

            Console.WriteLine("\n\nА теперь заставим универ работать:");

            univer.MakeUniversityWork();

            Console.ReadKey(true);
        }