Ejemplo n.º 1
0
        /// <summary>
        /// Add FIRST List For Example
        /// </summary>
        static void AddNEWListForExample()
        {
            LogicLayer.AddTeacher(new Teacher("Anders Hejlsberg", TypeTeacher.Docent));
            LogicLayer.AddStudent(new Student("Jone White", new Group("Group C#"), 25));
            LogicLayer.AddGroup(new Group("Group C#", new Teacher("Anders Hejlsberg", TypeTeacher.Docent)));

            LogicLayer.AddTeacher(new Teacher("James Arthur Gosling", TypeTeacher.Accictent));
            LogicLayer.AddStudent(new Student("Smith Red", new Group("Group Java"), 30));
            LogicLayer.AddGroup(new Group("Group Java", new Teacher("James Arthur Gosling", TypeTeacher.Accictent)));

            LogicLayer.AddTeacher(new Teacher("Tim Berners-Lee", TypeTeacher.Lector));
            LogicLayer.AddStudent(new Student("Dan Black", new Group("Group HTML"), 41));
            LogicLayer.AddGroup(new Group("Group HTML", new Teacher("Tim Berners-Lee", TypeTeacher.Lector)));
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Add FIRST List For Example
        /// </summary>
        static void AddNEWListForExample()
        {
            // магические числа в коде , сейчас мы знаем что означает 25 30 41 итд а через пол года вспомнишь ? выност в переменые\сетинги\константы с самодокументируемым названием
            LogicLayer.AddTeacher(new Teacher("Anders Hejlsberg", TypeTeacher.Docent));
            LogicLayer.AddStudent(new Student("Jone White", new Group("Group C#", new Teacher("Anders Hejlsberg", TypeTeacher.Docent)), 25));
            LogicLayer.AddGroup(new Group("Group C#", new Teacher("Anders Hejlsberg", TypeTeacher.Docent)));

            LogicLayer.AddTeacher(new Teacher("James Arthur Gosling", TypeTeacher.Accictent));
            LogicLayer.AddStudent(new Student("Smith Red", new Group("Group Java", new Teacher("James Arthur Gosling", TypeTeacher.Accictent)), 30));
            LogicLayer.AddGroup(new Group("Group Java", new Teacher("James Arthur Gosling", TypeTeacher.Accictent)));

            LogicLayer.AddTeacher(new Teacher("Tim Berners-Lee", TypeTeacher.Lector));
            LogicLayer.AddStudent(new Student("Dan Black", new Group("Group HTML", new Teacher("Tim Berners-Lee", TypeTeacher.Lector)), 41));
            LogicLayer.AddGroup(new Group("Group HTML", new Teacher("Tim Berners-Lee", TypeTeacher.Lector)));
        }