Esempio n. 1
0
 public Student(string name, Address address, University university, Faculty faculty)
 {
     Id = Guid.NewGuid();
     FullName = name;
     Address = address;
     University = university;
 }
 public static Lection CreateLection(LectionType typeOfLection, DayOfWeek day, int numberOfLection, University univer, Teacher lector)
 {
     if (day == DayOfWeek.Sunday)
     {
         Console.WriteLine("ERROR!!! ======>>>>>>>There isn't lections on Sunday!\n");
         return(null);
     }
     if (numberOfLection > 3)
     {
         Console.WriteLine("ERROR!!! ======>>>>>>>There is 3 lections or less each day!\n");
         return(null);
     }
     if (numberOfLection < 0)
     {
         Console.WriteLine("ERROR!!! ======>>>>>>>There isn't any 'minus' lections!\n");
         return(null);
     }
     if (lector.CanTeach != typeOfLection)
     {
         Console.WriteLine("ERROR!!! ======>>>>>>>This teacher can't teach this lection!\n");
         return(null);
     }
     if (!univer.HasTeacher(lector))
     {
         Console.WriteLine("ERROR!!! ======>>>>>>>This teacher is out of the University staff!\n");
         return(null);
     }
     return(new Lection(typeOfLection, day, numberOfLection));
 }