Exemplo n.º 1
0
        static void Main(string[] args)
        {
            Teacher classTeacher = new Teacher("Pesho");
            Discipline discipline = new Discipline();
            discipline.Name = "English";
            discipline.NumberOfExercises = 15;
            discipline.NumberOfLectures = 30;
            classTeacher.AddDiscipline(discipline);

            List<Discipline> list = classTeacher.Disciplines;
            // add to this list does not change the internal list of disciplines
            list.Add(new Discipline { Name = "Biology", NumberOfLectures = 60, NumberOfExercises = 30 });

            Student student1 = new Student(1,"Ani");
            Student student2 = new Student(2, "Gosho");

            Class mySchoolClass = new Class("a");
            mySchoolClass.AddStudent(student1);
            mySchoolClass.AddStudent(student2);
            mySchoolClass.AddTeacher(classTeacher);

            School mySchool = new School();
            mySchool.AddClass(mySchoolClass);

            mySchool.AddComment("My school");
            Console.WriteLine(mySchool.Comment);
        }
Exemplo n.º 2
0
 //Method that add disciplines
 public void AddDiscipline(Discipline newDiscipline)
 {
     this.disciplines.Add(newDiscipline);
 }
Exemplo n.º 3
0
 public void RemoveDiscipline(Discipline disciplineToDelete)
 {
     disciplines.Remove(disciplineToDelete);
 }
Exemplo n.º 4
0
 public void AddDiscipline(Discipline disciplineToAdd)
 {
     disciplines.Add(disciplineToAdd);
 }