Exemplo n.º 1
0
        static void Main(string[] args)
        {
            Students student1 = new Students("Hulio", 14 );
            Students student2 = new Students("Fabio", 14);
            Students student3 = new Students("Gangnam", 14 );
            Students student4 = new Students("Oktavio", 14);
            Students student5 = new Students("Marko", 14);

            Students[] students = new Students[] { student1, student2, student3 , student4, student5 };

            Disciplines displine1 = new Disciplines("History",30,30);
            Disciplines displine2 = new Disciplines("Biology", 30, 30);
            Disciplines displine3= new Disciplines("Algebra", 30, 30);
            Disciplines displine4 = new Disciplines("CivilEngeneering", 30, 30);
            Disciplines displine5 = new Disciplines("Programming", 30, 30);

            Teachers teacher1 = new Teachers("Vili Vucov", new Disciplines[] { displine1, displine2,displine3,displine4,displine5 });
            Teachers teacher2 = new Teachers("Samuel Jackson", new Disciplines[] { displine1, displine2, displine3, displine4, displine5 });
            Teachers teacher3 = new Teachers("Bill Gates", new Disciplines[] { displine1, displine2, displine3, displine4, displine5 });

            Teachers[] teachers = new Teachers[] { teacher1, teacher2, teacher3 };

            ClassRoom class1 = new ClassRoom(students, teachers, "8B");

            Console.WriteLine("The discipline is: " + class1.Teachers[2].Disciplines[2].Name);
            Console.WriteLine("The teacher is: " + class1.Teachers[2].Name);
            //Adding a comment
            student1.AddComment("Banana");
            Console.WriteLine("Comment of a student: " + student1.Comments[0]);
        }
Exemplo n.º 2
0
 //Methods:
 public void AddDiscipline(Disciplines discipline)
 {
     this.disciplines.Add(discipline);
 }
Exemplo n.º 3
0
 public void RemoveDiscipline(Disciplines discipline)
 {
     this.disciplines.Remove(discipline);
 }
Exemplo n.º 4
0
 //Constructors:
 public Teachers(string name, Disciplines[] disciplines)
     : base(name)
 {
     this.disciplines = new List<Disciplines>(disciplines);
     this.comments = new List<string>();
 }