Пример #1
0
        static void Main()
        {
            //instantiate class
            SchoolClass schoolClass = new SchoolClass("1234");
            //add students
            schoolClass.AddStudent(new Student("Mariana Dimitrova", "20"));
            schoolClass.AddStudent(new Student("Ivan Ivanov", "21"));
            schoolClass.AddStudent(new Student("Maria Ivanova", "22"));
            schoolClass.AddStudent(new Student("Dimitur Dimitrov", "23"));
            Console.WriteLine("--------------------------------");
            //add teachers
            Teacher one = new Teacher("Ms Ivanova");
            one.AddDiscipline(new Discipline("Biology", 30, 30));
            Teacher two = new Teacher("Ms Dimitrova");
            two.AddDiscipline(new Discipline("Geography", 30, 30));
            two.AddDiscipline(new Discipline("History", 30, 20));
            schoolClass.AddTeacher(one);
            schoolClass.AddTeacher(two);
            schoolClass.AddTeacher(one);
            Console.WriteLine("--------------------------");

            Console.WriteLine("------------------------");
            schoolClass.PrintStudents();
            Console.WriteLine("-----------------");
            schoolClass.PrintTeachers();
            Console.WriteLine("------------------");
            schoolClass.AddComment("comment");
            schoolClass.AddComment("second comment");
            Console.WriteLine("Comments of the class:");
            schoolClass.ViewComments();
        }
Пример #2
0
        static void Main()
        {
            //instantiate class
            SchoolClass schoolClass = new SchoolClass("1234");

            //add students
            schoolClass.AddStudent(new Student("Mariana Dimitrova", "20"));
            schoolClass.AddStudent(new Student("Ivan Ivanov", "21"));
            schoolClass.AddStudent(new Student("Maria Ivanova", "22"));
            schoolClass.AddStudent(new Student("Dimitur Dimitrov", "23"));
            Console.WriteLine("--------------------------------");
            //add teachers
            Teacher one = new Teacher("Ms Ivanova");

            one.AddDiscipline(new Discipline("Biology", 30, 30));
            Teacher two = new Teacher("Ms Dimitrova");

            two.AddDiscipline(new Discipline("Geography", 30, 30));
            two.AddDiscipline(new Discipline("History", 30, 20));
            schoolClass.AddTeacher(one);
            schoolClass.AddTeacher(two);
            schoolClass.AddTeacher(one);
            Console.WriteLine("--------------------------");

            Console.WriteLine("------------------------");
            schoolClass.PrintStudents();
            Console.WriteLine("-----------------");
            schoolClass.PrintTeachers();
            Console.WriteLine("------------------");
            schoolClass.AddComment("comment");
            schoolClass.AddComment("second comment");
            Console.WriteLine("Comments of the class:");
            schoolClass.ViewComments();
        }
Пример #3
0
        static void Main()
        {
            List<Student> students = new List<Student>()
            {
                new Student("Angel Angelov", 22, 9002120011,1),
                new Student("Vasil Ivanov", 22, 9012121212, 2),
                new Student("Nikolay Niklov", 22, 9012200014, 3),
                new Student("Nikolina Jekova", 22, 9011141113, 4),
                new Student("Julia Ribarska", 22, 9005132259, 5)
            };

            students[3].Comment = "Play games during the class hour";

            SchoolClass schoolClass = new SchoolClass("7 A");

            foreach (var student in students)
            {
                schoolClass.AddStudent(student);    
            }

            List<Discipline> disciplines = new List<Discipline>()
            {
                new Discipline("Computer architectures", 20, 10),
                new Discipline("Programin languages", 20, 10),
                new Discipline("Mangement of new technologies", 20, 10),
                new Discipline("Operating systems", 30, 15),
            };

            foreach (var discipline in disciplines)
            {
                schoolClass.AddDiscipline(discipline);
            }

            List<Teacher> teachers = new List<Teacher>()
            {
                new Teacher("Ivan Peshev", 60, 4301010012),
                new Teacher("Peter Petrov", 50, 5311121112)
            };

            teachers[0].AddDiscipline(disciplines[0]);
            teachers[0].AddDiscipline(disciplines[1]);

            teachers[1].AddDiscipline(disciplines[2]);
            teachers[1].AddDiscipline(disciplines[3]);

            foreach (var teacher in teachers)
            {
                schoolClass.AddTeacher(teacher);
            }

            School school = new School("The Alien Education");

            school.AddClass(schoolClass);

            Console.WriteLine(school);

            Console.WriteLine();
            Console.ResetColor();
        }
Пример #4
0
        static void Main()
        {
            School      school      = new School();
            SchoolClass schoolClass = new SchoolClass("A");

            school.AddClass(schoolClass);
            Console.WriteLine(schoolClass);

            Teacher teacher = new Teacher("Ivan Ivanov");

            teacher.AddDiscipline(new Discipline("Literature", 4, 4));
            schoolClass.AddTeacher(teacher);

            teacher = new Teacher("Petko Petkov");
            teacher.AddComment("Cool!");
            teacher.AddComment("Nice guy!");
            teacher.AddDiscipline(new Discipline("Music", 20, 10));
            schoolClass.AddTeacher(teacher);
            Console.WriteLine(schoolClass.GetTeachers());
            Student student = new Student("Jon", 7);
        }