Ejemplo n.º 1
0
        public void TestAddDayWeek_SundayToDayOff()
        {
            ResetStandart();
            //arrange

            IDaysOfStudy[] var = new IDaysOfStudy[100];
            for (int i = 0; i < 100; i++)
            {
                var te = A.Fake <IDaysOfStudy>();
                te.Date  = DateTime.Now.AddDays(i);
                te.Study = HowDays.WorkingDay;
                var[i]   = te;
            }

            var semester = new Semester.Semester(standatrBeginSemestr, standatrEndSemestr);

            semester.DaysOfStudies = var;
            //act
            semester.AddDayWeek(DayOfWeek.Sunday, HowDays.DayOff);
            //assert
            foreach (var item in semester.DaysOfStudies)
            {
                if (item.Date.DayOfWeek == DayOfWeek.Sunday)
                {
                    Assert.AreEqual(HowDays.DayOff, item.Study);
                }
                else
                {
                    Assert.AreEqual(HowDays.WorkingDay, item.Study);
                }
            }
        }
        public void TestAddDayMany_RangeToWorkingDay(int allDays, int beginDay, int endDay)
        {
            ResetStandart();
            //arrange

            IDaysOfStudy[] var = new IDaysOfStudy[allDays];
            for (int i = 0; i < allDays; i++)
            {
                var te = A.Fake <IDaysOfStudy>();
                te.Date  = DateTime.Now.AddDays(i);
                te.Study = HowDays.DayOff;
                var[i]   = te;
            }

            var semester = new Semester.Semester(standatrBeginSemestr, standatrEndSemestr);

            semester.DaysOfStudies = var;
            for (int i = 0; i < allDays; i++)
            {
                Assert.AreEqual(HowDays.DayOff, semester.DaysOfStudies[i].Study);
            }
            //act
            semester.AddDayMany(HowDays.WorkingDay, var[0].Date.AddDays(beginDay), var[0].Date.AddDays(endDay));
            //assert
            for (int i = beginDay; i <= endDay; i++)
            {
                Assert.AreEqual(HowDays.WorkingDay, semester.DaysOfStudies[i].Study);
            }
        }
Ejemplo n.º 3
0
        public Semester.Semester LoadFile(string path)
        {
            StreamReader reader = new StreamReader(path);

            Semester.Semester semester = null;
            using (reader)
            {
                string semesterName = reader.ReadLine();
                reader.ReadLine(); // read CSV column header garbage

                semester = new Semester.Semester(semesterName);

                while (!reader.EndOfStream)
                {
                    string   line    = reader.ReadLine();
                    string[] columns = line.Split(',');
                    bool[]   days    = new bool[7];
                    days[0] = columns[13].Equals("Y");
                    days[1] = columns[14].Equals("Y");
                    days[2] = columns[15].Equals("Y");
                    days[3] = columns[16].Equals("Y");
                    days[4] = columns[17].Equals("Y");
                    days[5] = columns[18].Equals("Y");
                    days[6] = columns[19].Equals("Y");
                    Section section = new Section(columns[0], columns[1], columns[2], columns[3], columns[5], columns[6], columns[7], columns[10], columns[8], columns[9], columns[11], columns[12], days, columns[20], columns[21], columns[22], columns[4]);
                    semester.AddSection(section);
                }

                return(semester);
            }
            return(null);
        }
Ejemplo n.º 4
0
        public void TestStandartValue()
        {
            ResetStandart();
            //arrange
            //act
            var semester = new Semester.Semester(standatrBeginSemestr, standatrEndSemestr);

            //assert
            Assert.AreEqual(standatrBeginSemestr.Date, semester.BeginSemestr);
            Assert.AreEqual(standatrEndSemestr.Date, semester.EndSemestr);
            Assert.AreEqual(standatrCountDaysOfStudies, semester.DaysOfStudies.Length);
        }
Ejemplo n.º 5
0
        public void TestToString_SemestIsReady()
        {
            ResetStandart();
            //arrange
            string ret = $"Начало семестра 01.09.2019, " +
                         $"окончание семестра 30.09.2019. Всего дней " +
                         $"30.";


            //act
            var semester = new Semester.Semester(new DateTime(2019, 09, 01), new DateTime(2019, 09, 30));

            //assert

            Assert.AreEqual(ret, semester.ToString());
        }
Ejemplo n.º 6
0
        public void TestStandartValue()
        {
            ResetStandart();
            //arrange
            //act
            var semester = new Semester.Semester(standatrBeginSemestr, standatrEndSemestr);

            //assert
            Assert.AreEqual(standatrBeginSemestr, semester.BeginSemestr);
            Assert.AreEqual(standatrEndSemestr, semester.EndSemestr);
            for (int i = 0; i < standatrDaysOfStudies.Count; i++)
            {
                Assert.AreEqual(standatrDaysOfStudies[i].Date, semester.DaysOfStudies[i].Date, $"i={i}");
                Assert.AreEqual(standatrDaysOfStudies[i].Study, semester.DaysOfStudies[i].Study, $"i={i}");
            }
        }
Ejemplo n.º 7
0
        private string CompareSemester(Semester.Semester local, Semester.Semester ksis)
        {
            StringBuilder  results           = new StringBuilder();
            List <Section> localOnlySections = new List <Section>();
            List <Section> ksisOnlySections  = new List <Section>();
            List <Section> changedSections   = new List <Section>();

            foreach (Section localSection in local.Sections)
            {
                if (!ksis.Sections.Contains(localSection))
                {
                    bool flag = false;
                    foreach (Section ksisSection in ksis.Sections)
                    {
                        if (HasSectionChanged(localSection, ksisSection))
                        {
                            results.Append("Section " + localSection.Subject + " " + localSection.CatalogNumber + " section " + localSection.SectionName + " has changed in the current semester.");
                            results.AppendLine();
                            changedSections.Add(localSection);
                            changedSections.Add(ksisSection);
                            flag = true;
                            break;
                        }
                    }
                    if (!flag)
                    {
                        results.Append(">> Section " + localSection.Subject + " " + localSection.CatalogNumber + " section " + localSection.SectionName + " is new in local semester.");
                        results.AppendLine();
                        localOnlySections.Add(localSection);
                    }
                }
            }

            foreach (Section ksisSection in ksis.Sections)
            {
                if (!local.Sections.Contains(ksisSection))
                {
                    if (!changedSections.Contains(ksisSection) && !localOnlySections.Contains(ksisSection))
                    {
                        results.Append("<< Section " + ksisSection.Subject + " " + ksisSection.CatalogNumber + " section " + ksisSection.SectionName + " not found in current semester.");
                        results.AppendLine();
                        ksisOnlySections.Add(ksisSection);
                    }
                }
            }
            return(results.ToString());
        }
Ejemplo n.º 8
0
        public void TestAddDayOne_OneToDayOff(int allDays, int day)
        {
            ResetStandart();
            //arrange

            IDaysOfStudy[] var = new IDaysOfStudy[allDays];
            for (int i = 0; i < allDays; i++)
            {
                var te = A.Fake <IDaysOfStudy>();
                te.Date  = DateTime.Now.AddDays(i);
                te.Study = HowDays.WorkingDay;
                var[i]   = te;
            }

            var semester = new Semester.Semester(standatrBeginSemestr, standatrEndSemestr);

            semester.DaysOfStudies = var;
            for (int i = 0; i < allDays; i++)
            {
                Assert.AreEqual(HowDays.WorkingDay, semester.DaysOfStudies[i].Study);
            }
            //act
            semester.AddDayOne(HowDays.DayOff, var[0].Date.AddDays(day));

            //assert
            for (int i = 0; i < allDays; i++)
            {
                if (day == i)
                {
                    Assert.AreEqual(HowDays.DayOff, semester.DaysOfStudies[i].Study);
                }
                else
                {
                    Assert.AreEqual(HowDays.WorkingDay, semester.DaysOfStudies[i].Study);
                }
            }
        }
Ejemplo n.º 9
0
        static void Main()
        {
            Console.WriteLine("Begin");

            //Gender.Gender gender = new Gender.Gender("мужской");
            //var genders = new List<Gender.Gender>
            //{
            //    new Gender.Gender("мужской"),
            //    new Gender.Gender("женский"),
            //};
            ClassRoom.ClassRoom classRoom = new ClassRoom.ClassRoom("Аудит1", 101);
            var classRooms = new List <ClassRoom.ClassRoom>
            {
                new ClassRoom.ClassRoom("Аудит1", 50),
                new ClassRoom.ClassRoom("Аудит2", 34),
                new ClassRoom.ClassRoom("Аудит3", 45),
                new ClassRoom.ClassRoom("Аудит4", 107),
                new ClassRoom.ClassRoom("Аудит5", 31),
            };

            Group.Group group  = new Group.Group("TBO", 2, "TBO-2", Interface.Interface.TypeStudy.FullTimeEducation, 35);
            var         groups = new List <Group.Group>
            {
                new Group.Group("TBO", 1, "TBO-1", Interface.Interface.TypeStudy.FullTimeEducation, 35),
                new Group.Group("TBO", 2, "TBO-2", Interface.Interface.TypeStudy.FullTimeEducation, 25),
                new Group.Group("TMO", 3, "TMO-3", Interface.Interface.TypeStudy.FullTimeEducation, 11),
                new Group.Group("TCO", 2, "TCO-2", Interface.Interface.TypeStudy.FullTimeEducation, 54),
            };

            Subject.Subject subject  = new Subject.Subject("Математика");
            var             subjects = new List <Subject.Subject>
            {
                new Subject.Subject("программирование 2 курс"),
                new Subject.Subject("математический анализ 3 курс"),
                new Subject.Subject("введение в специальность 1 курс"),
                new Subject.Subject("история России 1-4 курс"),
            };

            NumberOfLesson.NumberOfLesson numberOfLesson = new NumberOfLesson.NumberOfLesson(subject, 5);
            var numberOfLessons = new List <NumberOfLesson.NumberOfLesson> [groups.Count];

            for (int i = 0; i < groups.Count; i++)
            {
                int r1 = i * 5 % subjects.Count;
                int r2 = i * 3 % subjects.Count;
                if (r1 == r2)
                {
                    r1 = (r1 + 1) % subjects.Count;
                }
                var tempNumberOfLessons = new List <NumberOfLesson.NumberOfLesson>
                {
                    new NumberOfLesson.NumberOfLesson(subjects[r1], 7),
                    new NumberOfLesson.NumberOfLesson(subjects[r2], 9),
                };
                numberOfLessons[i] = tempNumberOfLessons;
            }
            ;


            Semester.Semester semester = new Semester.Semester(new DateTime(2019, 02, 02), new DateTime(2019, 05, 31));


            DaysOfStudy.DaysOfStudy daysOfStudy = new DaysOfStudy.DaysOfStudy(DateTime.Now, Interface.Interface.HowDays.DayOff);
            Person.Person           person      = new Person.Person("Dima", Interface.Interface.Gender.men, new DateTime(1996, 05, 19), "Юго западная");

            SubjectOfTeacher.SubjectOfTeacher subjectOfTeacher = new SubjectOfTeacher.SubjectOfTeacher(subject, 10);
            Teacher.Teacher teacher = new Teacher.Teacher(new List <SubjectOfTeacher.Interfaces.ISubjectOfTeacherWithConsole> {
                subjectOfTeacher
            }, "none", 1, person);
            var teachers = new List <Teacher.Teacher>();

            string[] names = { "Александр", "Максим", "Виктор", "Дмитрий", "Олег" };
            for (int i = 0; i < 5; i++)
            {
                int r1 = i * 5 % subjects.Count;
                int r2 = i * 3 % subjects.Count;
                if (r1 == r2)
                {
                    r1 = (r1 + 1) % subjects.Count;
                }
                var subjectOfTeacher1 = new List <SubjectOfTeacher.Interfaces.ISubjectOfTeacherWithConsole>
                {
                    new SubjectOfTeacher.SubjectOfTeacher(subjects[r1], 100),
                    new SubjectOfTeacher.SubjectOfTeacher(subjects[r2], 100),
                };
                var person1  = new Person.Person(names[i], genders[0], new DateTime(1958 + i, (17 * i) % 12 + 1, (23 * i) % 28 + 1), "Not info");
                var teacher1 = new Teacher.Teacher(subjectOfTeacher1, "none", 1, person1);
                teachers.Add(teacher1);
            }

            TimeLessons.TimeLessons timeLessons = new TimeLessons.TimeLessons(new TimeSpan(09, 00, 00), new TimeSpan(10, 30, 00), 1);
            var timeLessonss = new List <TimeLessons.TimeLessons>
            {
                new TimeLessons.TimeLessons(new TimeSpan(09, 00, 00), new TimeSpan(10, 30, 00), 1),
                new TimeLessons.TimeLessons(new TimeSpan(10, 40, 00), new TimeSpan(12, 10, 00), 2),
                new TimeLessons.TimeLessons(new TimeSpan(13, 00, 00), new TimeSpan(14, 30, 00), 3),
                new TimeLessons.TimeLessons(new TimeSpan(14, 40, 00), new TimeSpan(16, 10, 00), 4),
                new TimeLessons.TimeLessons(new TimeSpan(16, 20, 00), new TimeSpan(17, 50, 00), 5),
                new TimeLessons.TimeLessons(new TimeSpan(18, 00, 00), new TimeSpan(19, 30, 00), 6),
            };

            TypeLessons.TypeLessons typeLessons = new TypeLessons.TypeLessons("Лекция");
            var typeLessonss = new List <TypeLessons.TypeLessons>
            {
                new TypeLessons.TypeLessons("Лекция"),
                new TypeLessons.TypeLessons("Практика"),
            };



            Console.WriteLine("Вы вышли в основную программу!");
            Console.ReadLine();
        }
Ejemplo n.º 10
0
        public static void Main1()
        {
            Console.WriteLine(" Начало!");

            //Семестр
            Console.WriteLine("\n Семестр нач!");
            ISemester semester = new Semester.Semester(new DateTime(2019, 09, 01), new DateTime(2019, 12, 31));

            ((IConsole)semester).ToConsole();
            Console.WriteLine(" Семестр окон!\n");

            //Предмет
            Console.WriteLine("\n Предмет нач!");
            List <ISubject> subjects = new List <ISubject>
            {
                new Subject.Subject("Русский язык"),
                new Subject.Subject("Литературное чтение"),
                new Subject.Subject("Русский родной язык"),
                new Subject.Subject("Литературное чтение на русском родном языке"),
                new Subject.Subject("Иностранный язык (англ.)"),
                new Subject.Subject("Второй язык"),
                new Subject.Subject("Математика"),
                new Subject.Subject("Окружающий мир"),
                new Subject.Subject("Основы религиозных культур и светской этики"),
                new Subject.Subject("Музыка"),
                new Subject.Subject("Изобразительное искусство"),
                new Subject.Subject("Технология "),
                new Subject.Subject("Физическая культура"),
            };

            foreach (var subject in subjects)
            {
                ((IConsole)subject).ToConsole();
            }

            Console.WriteLine(" Предмет окон!\n");

            //Аудитории
            Console.WriteLine("\n Аудитория нач!");
            List <IClassRoom> classRooms = new List <IClassRoom>
            {
                new ClassRoom.ClassRoom("Аудитория №1", 101),
                new ClassRoom.ClassRoom("Аудитория №2", 101),
                new ClassRoom.ClassRoom("Аудитория №3", 59),
                new ClassRoom.ClassRoom("Аудитория №4", 23),
                new ClassRoom.ClassRoom("Аудитория №5", 45)
            };

            foreach (var classRoom in classRooms)
            {
                ((IConsole)classRoom).ToConsole();
            }
            Console.WriteLine(" Аудитория окон!\n");

            //Группа
            Console.WriteLine("\n Группа нач!");
            List <IGroup> groups = new List <IGroup>
            {
                new Group.Group("Класс-1", 1, "Класс", TypeStudy.FullTimeEducation, 8),
                new Group.Group("Класс-2", 2, "Класс", TypeStudy.FullTimeEducation, 59),
                new Group.Group("Класс-3", 3, "Класс", TypeStudy.FullTimeEducation, 10),
                new Group.Group("Класс-4", 4, "Класс", TypeStudy.FullTimeEducation, 11),
            };

            foreach (var group in groups)
            {
                ((IConsole)group).ToConsole();
            }

            Console.WriteLine("Группа окон!\n");

            //План занятий
            Console.WriteLine("\n План занятий нач!");
            List <IPlanOfLessons> planOfLessons = new List <IPlanOfLessons>();

            int[][] ClassYear = new int[][] {
                new int[] { 165, 132, 0, 0, 0, 0, 132, 66, 0, 33, 33, 33, 99 },
                new int[] { 136, 102, 34, 34, 68, 0, 136, 68, 0, 34, 34, 34, 102 },
                new int[] { 170, 136, 0, 0, 68, 0, 136, 68, 0, 34, 34, 34, 102 },
                new int[] { 170, 102, 0, 0, 68, 0, 136, 68, 34, 34, 34, 34, 102 },
            };
            foreach (var group in groups)
            {
                List <INumberOfLesson> numberOfLessons = new List <INumberOfLesson>();
                for (int i = 0; i < subjects.Count; i++)
                {
                    if (ClassYear[group.Cours - 1][i] / 2 > 0)
                    {
                        numberOfLessons.Add(new NumberOfLesson.NumberOfLesson(subjects[i], ClassYear[group.Cours - 1][i] / 2));
                    }
                }

                planOfLessons.Add(new PlanOfLessons.PlanOfLessons(group, numberOfLessons));
            }
            foreach (var planOfLesson in planOfLessons)
            {
                ((IConsole)planOfLesson).ToConsole();
            }
            Console.WriteLine(" План занятий окон!\n");

            //Преподаватель
            Console.WriteLine("\n Преподаватель нач!");
            List <ITeacher> teachers = new List <ITeacher>();

            List <IPerson> persons = new List <IPerson>
            {
                new Person.Person("Преподаватель1", Gender.men, new DateTime(1982, 01, 01), "None"),
                new Person.Person("Преподаватель2", Gender.men, new DateTime(1982, 01, 01), "None"),
                new Person.Person("Преподаватель3", Gender.men, new DateTime(1982, 01, 01), "None"),
                new Person.Person("Преподаватель4", Gender.men, new DateTime(1982, 01, 01), "None"),
                new Person.Person("Преподаватель5", Gender.men, new DateTime(1982, 01, 01), "None"),
                new Person.Person("Преподаватель6", Gender.men, new DateTime(1982, 01, 01), "None"),
                new Person.Person("Преподаватель7", Gender.men, new DateTime(1982, 01, 01), "None"),
                new Person.Person("Преподаватель8", Gender.men, new DateTime(1982, 01, 01), "None"),
                new Person.Person("Преподаватель9", Gender.men, new DateTime(1982, 01, 01), "None"),
                new Person.Person("Преподаватель10", Gender.men, new DateTime(1982, 01, 01), "None"),
                new Person.Person("Преподаватель11", Gender.men, new DateTime(1982, 01, 01), "None"),
                new Person.Person("Преподаватель12", Gender.men, new DateTime(1982, 01, 01), "None"),
                new Person.Person("Преподаватель13", Gender.men, new DateTime(1982, 01, 01), "None"),
            };

            ISubjectOfTeacher[][] subjectOfTeachers1 = new ISubjectOfTeacher[][]
            {
                new ISubjectOfTeacher[] { new SubjectOfTeacher.SubjectOfTeacher(subjects[0], 100), new SubjectOfTeacher.SubjectOfTeacher(subjects[1], 100), new SubjectOfTeacher.SubjectOfTeacher(subjects[2], 100), new SubjectOfTeacher.SubjectOfTeacher(subjects[3], 100), },
                new ISubjectOfTeacher[] { new SubjectOfTeacher.SubjectOfTeacher(subjects[0], 100), new SubjectOfTeacher.SubjectOfTeacher(subjects[1], 100), new SubjectOfTeacher.SubjectOfTeacher(subjects[2], 100), new SubjectOfTeacher.SubjectOfTeacher(subjects[3], 100), },
                new ISubjectOfTeacher[] { new SubjectOfTeacher.SubjectOfTeacher(subjects[0], 100), new SubjectOfTeacher.SubjectOfTeacher(subjects[1], 100), new SubjectOfTeacher.SubjectOfTeacher(subjects[2], 100), new SubjectOfTeacher.SubjectOfTeacher(subjects[3], 100), },
                new ISubjectOfTeacher[] { new SubjectOfTeacher.SubjectOfTeacher(subjects[0], 100), new SubjectOfTeacher.SubjectOfTeacher(subjects[1], 100), new SubjectOfTeacher.SubjectOfTeacher(subjects[2], 100), new SubjectOfTeacher.SubjectOfTeacher(subjects[3], 100), },
                new ISubjectOfTeacher[] { new SubjectOfTeacher.SubjectOfTeacher(subjects[4], 100), new SubjectOfTeacher.SubjectOfTeacher(subjects[5], 100) },
                new ISubjectOfTeacher[] { new SubjectOfTeacher.SubjectOfTeacher(subjects[4], 100), new SubjectOfTeacher.SubjectOfTeacher(subjects[5], 100) },
                new ISubjectOfTeacher[] { new SubjectOfTeacher.SubjectOfTeacher(subjects[6], 100), },
                new ISubjectOfTeacher[] { new SubjectOfTeacher.SubjectOfTeacher(subjects[7], 100), },
                new ISubjectOfTeacher[] { new SubjectOfTeacher.SubjectOfTeacher(subjects[8], 100), },
                new ISubjectOfTeacher[] { new SubjectOfTeacher.SubjectOfTeacher(subjects[9], 100), },
                new ISubjectOfTeacher[] { new SubjectOfTeacher.SubjectOfTeacher(subjects[10], 100), },
                new ISubjectOfTeacher[] { new SubjectOfTeacher.SubjectOfTeacher(subjects[11], 100), },
                new ISubjectOfTeacher[] { new SubjectOfTeacher.SubjectOfTeacher(subjects[12], 100), },
            };
            for (int i = 0; i < subjects.Count; i++)
            {
                teachers.Add(new Teacher.Teacher(subjectOfTeachers1[i].ToList(), "none", 1, persons[i]));
            }
            foreach (var teacher in teachers)
            {
                ((IConsole)teacher).ToConsole();
            }

            Console.WriteLine("Преподаватель окон!\n");

            //Время занятий
            Console.WriteLine("\n Время занятий нач!");
            List <ITimeLessons> timeLessons = new List <ITimeLessons>
            {
                new TimeLessons.TimeLessons(new TimeSpan(09, 00, 00), new TimeSpan(10, 30, 00), 1),
                new TimeLessons.TimeLessons(new TimeSpan(10, 40, 00), new TimeSpan(12, 10, 00), 2),
                new TimeLessons.TimeLessons(new TimeSpan(13, 00, 00), new TimeSpan(14, 30, 00), 3),
                new TimeLessons.TimeLessons(new TimeSpan(14, 40, 00), new TimeSpan(16, 10, 00), 4),
                new TimeLessons.TimeLessons(new TimeSpan(16, 20, 00), new TimeSpan(17, 50, 00), 5),
                new TimeLessons.TimeLessons(new TimeSpan(18, 00, 00), new TimeSpan(19, 30, 00), 6)
            };

            foreach (var timeLesson in timeLessons)
            {
                ((IConsole)timeLesson).ToConsole();
            }
            Console.WriteLine("Время занятий окон!\n");



            Version1 version1 = new Version1(semester, groups, classRooms, planOfLessons, teachers, timeLessons);

            version1.SetFree();
            var kk1 = version1.CheckLesson();
            var kk2 = version1.NumberWorkDayofWeekFoeGroup();
            var kk3 = version1.LessonOfWeekToGroups();

            Console.WriteLine(" Конец!");
            Console.ReadLine();
        }
Ejemplo n.º 11
0
        public static void Main1()
        {
            Console.WriteLine(" Начало!");

            //Семестр
            Console.WriteLine("\n Семестр нач!");
            ISemester semester = new Semester.Semester(new DateTime(2019, 09, 01), new DateTime(2019, 12, 31));

            ((IConsole)semester).ToConsole();
            Console.WriteLine(" Семестр окон!\n");

            //Предмет
            Console.WriteLine("\n Предмет нач!");
            List <ISubject> subjects = new List <ISubject>
            {
                new Subject.Subject("Математический анализ"),
                new Subject.Subject("Программирование"),
            };

            foreach (var subject in subjects)
            {
                ((IConsole)subject).ToConsole();
            }

            Console.WriteLine(" Предмет окон!\n");

            //Аудитории
            Console.WriteLine("\n Аудитория нач!");
            List <IClassRoom> classRooms = new List <IClassRoom>
            {
                new ClassRoom.ClassRoom("Аудитория №1", 101),
                new ClassRoom.ClassRoom("Аудитория №2", 101),
                new ClassRoom.ClassRoom("Аудитория №3", 59),
                new ClassRoom.ClassRoom("Аудитория №4", 23),
                new ClassRoom.ClassRoom("Аудитория №5", 45)
            };

            foreach (var classRoom in classRooms)
            {
                ((IConsole)classRoom).ToConsole();
            }
            Console.WriteLine(" Аудитория окон!\n");

            //Группа
            Console.WriteLine("\n Группа нач!");
            List <IGroup> groups = new List <IGroup>
            {
                new Group.Group("TBO-1", 1, "TBO", TypeStudy.FullTimeEducation, 8),
                new Group.Group("TBO-2", 2, "TBO", TypeStudy.FullTimeEducation, 59),
                new Group.Group("TBO-3", 3, "TBO", TypeStudy.FullTimeEducation, 10),
                new Group.Group("TMO-1", 1, "TMO", TypeStudy.FullTimeEducation, 11),
                new Group.Group("TMO-2", 2, "TMO", TypeStudy.FullTimeEducation, 8),
                new Group.Group("TMO-3", 3, "TMO", TypeStudy.FullTimeEducation, 13),
                new Group.Group("KB-1", 1, "KB", TypeStudy.FullTimeEducation, 14),
                new Group.Group("KB-2", 2, "KB", TypeStudy.FullTimeEducation, 15),
                new Group.Group("KB-3", 3, "KB", TypeStudy.FullTimeEducation, 16),
                new Group.Group("KB-4", 4, "KB", TypeStudy.FullTimeEducation, 17),
            };

            foreach (var group in groups)
            {
                ((IConsole)group).ToConsole();
            }

            Console.WriteLine("Группа окон!\n");

            //План занятий
            Console.WriteLine("\n План занятий нач!");
            List <IPlanOfLessons> planOfLessons = new List <IPlanOfLessons>();

            foreach (var group in groups)
            {
                List <INumberOfLesson> numberOfLessons = new List <INumberOfLesson>();
                foreach (var subject in subjects)
                {
                    numberOfLessons.Add(new NumberOfLesson.NumberOfLesson(subject, 95));
                }
                ;

                planOfLessons.Add(new PlanOfLessons.PlanOfLessons(group, numberOfLessons));
            }
            planOfLessons[0].NumberOfLesson[0].NumberSubject = 300;
            planOfLessons[1].NumberOfLesson[0].NumberSubject = 15;
            planOfLessons[2].NumberOfLesson[0].NumberSubject = 150;
            foreach (var planOfLesson in planOfLessons)
            {
                ((IConsole)planOfLesson).ToConsole();
            }
            Console.WriteLine(" План занятий окон!\n");

            //Преподаватель
            Console.WriteLine("\n Преподаватель нач!");
            List <ITeacher> teachers = new List <ITeacher>();

            List <IPerson> persons = new List <IPerson>
            {
                new Person.Person("Добронравов Андрей Геориевич", Gender.men, new DateTime(1982, 01, 01), "None"),
                new Person.Person("Казимов Олег Дмитриевич", Gender.men, new DateTime(1972, 12, 19), "None")
            };

            foreach (var person in persons)
            {
                List <ISubjectOfTeacher> subjectOfTeachers = new List <ISubjectOfTeacher>();
                foreach (var subject in subjects)
                {
                    subjectOfTeachers.Add(new SubjectOfTeacher.SubjectOfTeacher(subject, 100));
                }
                ;
                teachers.Add(new Teacher.Teacher(subjectOfTeachers, "none", 1, person));
            }

            foreach (var teacher in teachers)
            {
                ((IConsole)teacher).ToConsole();
            }

            Console.WriteLine("Преподаватель окон!\n");

            //Время занятий
            Console.WriteLine("\n Время занятий нач!");
            List <ITimeLessons> timeLessons = new List <ITimeLessons>
            {
                new TimeLessons.TimeLessons(new TimeSpan(09, 00, 00), new TimeSpan(10, 30, 00), 1),
                new TimeLessons.TimeLessons(new TimeSpan(10, 40, 00), new TimeSpan(12, 10, 00), 2),
                new TimeLessons.TimeLessons(new TimeSpan(13, 00, 00), new TimeSpan(14, 30, 00), 3),
                new TimeLessons.TimeLessons(new TimeSpan(14, 40, 00), new TimeSpan(16, 10, 00), 4),
                new TimeLessons.TimeLessons(new TimeSpan(16, 20, 00), new TimeSpan(17, 50, 00), 5),
                new TimeLessons.TimeLessons(new TimeSpan(18, 00, 00), new TimeSpan(19, 30, 00), 6)
            };

            foreach (var timeLesson in timeLessons)
            {
                ((IConsole)timeLesson).ToConsole();
            }
            Console.WriteLine("Время занятий окон!\n");



            Version1 version1 = new Version1(semester, groups, classRooms, planOfLessons, teachers, timeLessons);

            version1.SetFree();
            var kk1 = version1.CheckLesson();
            var kk2 = version1.NumberWorkDayofWeekFoeGroup();
            var kk3 = version1.LessonOfWeekToGroups();

            Console.WriteLine(" Конец!");
            Console.ReadLine();
        }