Пример #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 });
        }
Пример #2
0
        static void Main(string[] args)
        {
            Teacher testTeacher =
                new Teacher("Mr. Burnes",
                            new List <Discipline>()
            {
                new Discipline("History", 5, 5),
                new Discipline("Math", 6, 4)
            });
            Student     testStudentOne  = new Student("Ivan Ivanov", 2156);
            Student     testStudentTwo  = new Student("Georgi Petrov", 2015);
            SchoolClass testSchoolClass = new SchoolClass("Computer Science",
                                                          new List <Teacher>()
            {
                testTeacher
            });
            School testSchool = new School(new List <SchoolClass>()
            {
                testSchoolClass
            });

            testStudentOne.AddComment("Scored A in Object Oriented Programming");
            testStudentOne.AddComment("Scored D in Calculus");
            // Uncomment next line to print Teacher
            // Console.WriteLine(testTeacher);

            // Uncomment next two lines to print two students
            // Console.WriteLine(testStudentOne);
            // Console.WriteLine(testStudentTwo);

            // Uncomment next line to print SchoolClass
            // Console.WriteLine(testSchoolClass);

            // Uncomment next line to print School
            // Console.WriteLine(testSchool);

            // Uncomment next line to print comments for first student
            // testStudentOne.PrintComments();
        }
Пример #3
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
            });
        }