Esempio n. 1
0
        static void Main(string[] args)
        {
            Student student1 = new Student("Kiril", 13);

            student1.AddComment("Test comment1 for student 1");
            student1.AddComment("Test comment2 for student 1");

            Student student2 = new Student("Vasil", 25);

            student2.AddComment("Test comment1 for student 2");
            student2.AddComment("Test comment2 for student 2");


            student1.RemoveComment("Test comment1 for student 1");
            student1.DisplayComments();

            student2.ClearComments();
            student2.DisplayComments();

            student1.AddComment("Blah blah");
            Console.WriteLine(student1.CommentsCount);
            student1.RemoveCommentAt(0);
            student1.DisplayComments();

            Discipline discipline1 = new Discipline("Discrete Mathematics", 1, 1);
            Discipline discipline2 = new Discipline("Mathematical Analysis", 1, 1);
            Discipline discipline3 = new Discipline("OOP", 2, 3);

            discipline1.AddComment("Introduction do discrete data structures.");
            discipline3.AddComment("Object Oriented Programming in C#");

            Teacher teacher1 = new Teacher("Trifon",
                                           new List <Discipline>()
            {
                discipline1
            });

            Teacher teacher2 = new Teacher("Grigor",
                                           new List <Discipline>()
            {
                discipline2, discipline3
            });

            Class class1 = new Class("312",
                                     new List <Teacher>()
            {
                teacher1, teacher2
            },
                                     new List <Student>()
            {
                student1, student2
            });

            School school = new School(new List <Class>()
            {
                class1
            });
        }
Esempio n. 2
0
        static void Main(string[] args)
        {
            Student student1 = new Student("Kiril", 13);
            student1.AddComment("Test comment1 for student 1");
            student1.AddComment("Test comment2 for student 1");

            Student student2 = new Student("Vasil", 25);
            student2.AddComment("Test comment1 for student 2");
            student2.AddComment("Test comment2 for student 2");

            student1.RemoveComment("Test comment1 for student 1");
            student1.DisplayComments();

            student2.ClearComments();
            student2.DisplayComments();

            student1.AddComment("Blah blah");
            Console.WriteLine(student1.CommentsCount);
            student1.RemoveCommentAt(0);
            student1.DisplayComments();

            Discipline discipline1 = new Discipline("Discrete Mathematics", 1, 1);
            Discipline discipline2 = new Discipline("Mathematical Analysis", 1, 1);
            Discipline discipline3 = new Discipline("OOP", 2, 3);

            discipline1.AddComment("Introduction do discrete data structures.");
            discipline3.AddComment("Object Oriented Programming in C#");

            Teacher teacher1 = new Teacher("Trifon",
                new List<Discipline>() { discipline1 });

            Teacher teacher2 = new Teacher("Grigor",
                new List<Discipline>() { discipline2, discipline3 });

            Class class1 = new Class("312",
                new List<Teacher>() { teacher1, teacher2} ,
                new List<Student>() { student1, student2} );

            School school = new School(new List<Class>() { class1 });
        }
Esempio n. 3
0
        public static void Main()
        {
            School.Student student       = new School.Student("Milko", "Milchev", 2);
            School.Student studentTwo    = new School.Student("Ivancho", "Ivanov", 1);
            SchoolClass    seventhGradeA = new SchoolClass('a', new Teacher("Ms", "Ivanova"));

            seventhGradeA.AddStudent(student);
            seventhGradeA.AddStudent(studentTwo);
            seventhGradeA.RemoveStudent(studentTwo);
            School.Student studentThr = new School.Student("Grigor", "Grigorov", 1);
            student.AddComment("something");
            Console.WriteLine(student.Comments);
            TestStudentsAndWorkers.Test();
            AnimalHierarchyTest.Test();
        }
        static void Main()
        {
            // Testing

            var listOfStudents = new List <Student>
            {
                new Student("Pesho", "Stamatov", 123),
                new Student("Kolio", "Mitkov", 124),
                new Student("Gencho", "Berov", 125),
                new Student("Peshka", "Stamatova", 126),
                new Student("Zvezdelin", "Sokachev", 127)
            };

            var listOfDisciplines = new List <Discipline>
            {
                // new Discipline(DisciplinesList.Arts, 23,23),
                // new Discipline(DisciplinesList.French, 23,43),
                new Discipline(DisciplinesList.ComputerScience, 123, 23),
                new Discipline(DisciplinesList.Mathematics, 23, 231),
                new Discipline(DisciplinesList.Sports, 23312, 2233)
            };

            // All teachers have the same disciplines to save space - you may try to change them if you want : )
            var listOfTeachers = new List <Teacher>
            {
                new Teacher("Aleksandrina", "Todorova", listOfDisciplines),
                new Teacher("Cvetelina", "Licheva", listOfDisciplines),
                new Teacher("Jana", "Dimova", listOfDisciplines),
                new Teacher("Maia", "Mitkova", listOfDisciplines),
                new Teacher("Konstantin", "Koinov", listOfDisciplines),
            };

            var schoolClass = new Classes(listOfTeachers, listOfStudents, "12A");

            var pesho = new Student("Pesho", "Stamtliev", 2);

            pesho.AddComment("Ne moje bez Pesho");
            Console.WriteLine(pesho.ShowComments());
        }
Esempio n. 5
0
        static void Main()
        {
            //define students
            Student firstStudent = new Student("Ivan Ivanov", 26);

            firstStudent.AddComment("I love school.");
            Student secondStudent = new Student("Kiril Stoianov", 21);

            secondStudent.AddComment("I hate school.");
            Student thirdStudent = new Student("Martin Hristov", 25);

            Student[] allStudents =
            {
                firstStudent,
                secondStudent,
                thirdStudent
            };

            //define disciplines
            Discipline math = new Discipline("Math", 4, 4);

            math.AddComment("This is the hardest discipline, but it's very useful.");
            Discipline biology   = new Discipline("Biology", 2, 2);
            Discipline chemistry = new Discipline("Chemistry", 1, 2);

            chemistry.AddComment("This is the most useless discipline.");
            Discipline[] allDisciplines =
            {
                math,
                biology,
                chemistry
            };

            //define teachers and add disciplines
            Teacher firstTeacher = new Teacher("Nikolai Nikolov");

            firstTeacher.AddDicipline(math);
            firstTeacher.AddDicipline(chemistry);

            Teacher secondTeacher = new Teacher("Silviq Stefanova");

            secondTeacher.AddComment("She's a great teacher.");
            secondTeacher.AddDicipline(biology);

            Teacher[] allTeachers =
            {
                firstTeacher,
                secondTeacher
            };

            //create class
            Class firstClassInSchool = new Class("12A");

            //add students in class
            firstClassInSchool.AddStudents(allStudents);
            //add teachers for class
            firstClassInSchool.AddTeachers(allTeachers);
            Class[] allClasses =
            {
                firstClassInSchool
            };

            //Define school and display information
            School mySchool = new School("1st Math Highschool");

            //display info
            Console.WriteLine("-------{0}-------", mySchool.Name);
            Console.WriteLine();

            Console.WriteLine("---Teachers---");
            foreach (var teacher in allTeachers)
            {
                foreach (var discipline in teacher.AllDiciplines)
                {
                    Console.WriteLine("{0} -> {1}", teacher, discipline);
                }
            }

            Console.WriteLine();

            Console.WriteLine("---Classes---");
            foreach (var schoolClass in allClasses)
            {
                Console.WriteLine(schoolClass);
            }

            Console.WriteLine();

            //Display Comments
            Console.WriteLine("---Comments---");
            foreach (var schoolClass in allClasses)
            {
                schoolClass.ViewComments();
            }

            Console.WriteLine();

            foreach (var student in allStudents)
            {
                student.ViewComments();
            }

            Console.WriteLine();

            foreach (var teacher in allTeachers)
            {
                teacher.ViewComments();
            }

            Console.WriteLine();

            foreach (var discipline in allDisciplines)
            {
                discipline.ViewComments();
            }
        }
Esempio n. 6
0
        static void Main()
        {
            //define students
            Student firstStudent = new Student("Ivan Ivanov", 26);
            firstStudent.AddComment("I love school.");
            Student secondStudent = new Student("Kiril Stoianov", 21);
            secondStudent.AddComment("I hate school.");
            Student thirdStudent = new Student("Martin Hristov", 25);
            Student[] allStudents = {
                                       firstStudent,
                                       secondStudent,
                                       thirdStudent
                                   };

            //define disciplines
            Discipline math = new Discipline("Math", 4, 4);
            math.AddComment("This is the hardest discipline, but it's very useful.");
            Discipline biology = new Discipline("Biology", 2, 2);
            Discipline chemistry = new Discipline("Chemistry", 1, 2);
            chemistry.AddComment("This is the most useless discipline.");
            Discipline[] allDisciplines = {
                                              math,
                                              biology,
                                              chemistry
                                          };

            //define teachers and add disciplines
            Teacher firstTeacher = new Teacher("Nikolai Nikolov");
            firstTeacher.AddDicipline(math);
            firstTeacher.AddDicipline(chemistry);

            Teacher secondTeacher = new Teacher("Silviq Stefanova");
            secondTeacher.AddComment("She's a great teacher.");
            secondTeacher.AddDicipline(biology);

            Teacher[] allTeachers = {
                                        firstTeacher,
                                        secondTeacher
                                    };

            //create class
            Class firstClassInSchool = new Class("12A");
            //add students in class
            firstClassInSchool.AddStudents(allStudents);
            //add teachers for class
            firstClassInSchool.AddTeachers(allTeachers);
            Class[] allClasses = {
                                        firstClassInSchool
                                    };

            //Define school and display information
            School mySchool = new School("1st Math Highschool");

            //display info
            Console.WriteLine("-------{0}-------", mySchool.Name);
            Console.WriteLine();

            Console.WriteLine("---Teachers---");
            foreach (var teacher in allTeachers)
            {
                foreach (var discipline in teacher.AllDiciplines)
                {
                    Console.WriteLine("{0} -> {1}", teacher, discipline);
                }
            }

            Console.WriteLine();

            Console.WriteLine("---Classes---");
            foreach (var schoolClass in allClasses)
            {
                Console.WriteLine(schoolClass);
            }

            Console.WriteLine();

            //Display Comments
            Console.WriteLine("---Comments---");
            foreach (var schoolClass in allClasses)
            {
                schoolClass.ViewComments();
            }

            Console.WriteLine();

            foreach (var student in allStudents)
            {
                student.ViewComments();
            }

            Console.WriteLine();

            foreach (var teacher in allTeachers)
            {
                teacher.ViewComments();
            }

            Console.WriteLine();

            foreach (var discipline in allDisciplines)
            {
                discipline.ViewComments();
            }
        }