Exemplo n.º 1
0
 public Class(string name, Teacher[] teach, Student[] stud)
 {
     if (String.IsNullOrWhiteSpace(name)) throw new ArgumentNullException("The give argument is null or have only white spaces");
     else
     {
         ClassName = name;
         TeachersList = new List<Teacher>(teach);
         StudentsList = new List<Student>(stud);
     }
 }
Exemplo n.º 2
0
        static void Main()
        {
            Student[] inFirstClass = new Student[]
            {
                new Student("Alex","Borisov","1"),
                new Student("Borislav","Vaptsarov","2"),
                new Student("Kiril","Voinov","3")
            };

            Student[] inSecondClass = new Student[]
            {
                new Student("Fili[","Borisov","1"),
                new Student("Megan","Vasilova","2"),
                new Student("Aspartan","E525","3")
            };

            Discipline[] firstDiscipline = new Discipline[]
            {
                new Discipline("Mathematics",2,5),
                new Discipline("Algorithms",3,8),
                new Discipline("Sleeping",10,24)
            };

            Discipline[] secondDiscipline = new Discipline[]
            {
                new Discipline("Physics",2,5),
                new Discipline("Hitting",3,8),
                new Discipline("Peeing on ppl",2,4)
            };

            Teacher[] teachers = new Teacher[]
            {
                new Teacher("Ivan","Kostolov",firstDiscipline),
                new Teacher("Troll","Mogilov",secondDiscipline)
            };

            Teacher[] teachersS = new Teacher[]
            {
                new Teacher("Troll","Mogilov",secondDiscipline)
            };

            Class[] classes = new Class[]
            {
                new Class("12A",teachers,inFirstClass),
                new Class("12B",teachers,inSecondClass)
            };

            School thisSChool = new School("PMG - Akad. Ivan Guzelev", classes);
            Console.WriteLine(thisSChool);
        }