Example #1
0
        static void Main()
        {
            Student goshkoStudent = new Student("Goshko", 5);
            goshkoStudent.AddComment("Goshko is a bad student.");

            Student peshoStudent = new Student("Pesho", 10);
            peshoStudent.AddComment("Pesho is a normal student.");

            Student ivanStudent = new Student("Ivan", 11);
            ivanStudent.AddComment("Ivan is a great student.");

            Discipline maths = new Discipline("Maths", 10, 10);
            Discipline physics = new Discipline("Physics", 5, 4);

            Teacher teacher = new Teacher("Borislav Petrov", new List<Discipline>() { maths, physics });
            teacher.AddComment("Borislav Petrov is a very good teacher.");
            teacher.AddComment("Wonderful teacher.");
            teacher.AddComment("Teaches only useful and interesting things.");

            //test comments methods
            teacher.ShowComments();
            Console.WriteLine();

            teacher.RemoveComment("Wonderful teacher.");
            //the comments after removed one comment
            teacher.ShowComments();

            //clear all comments and after that nothing happens
            teacher.ClearAllComments();
            teacher.ShowComments();

            Class newClass = new Class("123", new List<Teacher>() { teacher }, new List<Student>() { goshkoStudent, peshoStudent, ivanStudent });

            School school = new School(new List<Class>() { newClass });
        }
Example #2
0
        static void Main()
        {
            Student goshkoStudent = new Student("Goshko", 5);

            goshkoStudent.AddComment("Goshko is a bad student.");

            Student peshoStudent = new Student("Pesho", 10);

            peshoStudent.AddComment("Pesho is a normal student.");

            Student ivanStudent = new Student("Ivan", 11);

            ivanStudent.AddComment("Ivan is a great student.");

            Discipline maths   = new Discipline("Maths", 10, 10);
            Discipline physics = new Discipline("Physics", 5, 4);

            Teacher teacher = new Teacher("Borislav Petrov", new List <Discipline>()
            {
                maths, physics
            });

            teacher.AddComment("Borislav Petrov is a very good teacher.");
            teacher.AddComment("Wonderful teacher.");
            teacher.AddComment("Teaches only useful and interesting things.");

            //test comments methods
            teacher.ShowComments();
            Console.WriteLine();

            teacher.RemoveComment("Wonderful teacher.");
            //the comments after removed one comment
            teacher.ShowComments();

            //clear all comments and after that nothing happens
            teacher.ClearAllComments();
            teacher.ShowComments();

            Class newClass = new Class("123", new List <Teacher>()
            {
                teacher
            }, new List <Student>()
            {
                goshkoStudent, peshoStudent, ivanStudent
            });

            School school = new School(new List <Class>()
            {
                newClass
            });
        }