Пример #1
0
        static void Main()
        {
            Discipline dis = new Discipline("Math", 8, 10);
            Discipline[] disciplines = new Discipline[1];
            disciplines[0] = dis;

            Person men = new Person("Pesho");

            Student ivan = new Student("Ivan", 13);
            Student[] students = new Student[1];
            students[0] = ivan;

            Teacher first = new Teacher("Ivanov", disciplines);
            Teacher[] teachers = new Teacher[1];
            teachers[0] = first;

            ivan.FreeText = "pesho";

            SchoolClass classA = new SchoolClass(students, teachers, "12a");
            SchoolClass[] classes = new SchoolClass[1];

            School school = new School(classes);

            Console.WriteLine(ivan.Name);
            Console.WriteLine(men.Name);
        }
Пример #2
0
 public Teacher(string name, Discipline[] disciplines, string freeText)
     : base(name)
 {
     this.Disciplines = disciplines;
     this.freeText = freeText;
 }
Пример #3
0
 // CONSTRUCTORS ----------------------------------------------------------------
 public Teacher(string name, Discipline[] disciplines)
     : this(name, disciplines, null)
 {
 }