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 }); }
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 }); }
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); }