Exemple #1
0
 // contructors
 public Lecture()
 {
     date = default(DateTime);
     subject = default(Subject);
     subjectTopics = default(List<string>);
     teacher = default(Teacher);
     studyGroup = default(StudyGroup);
     marks = default(List<Mark>);
 }
Exemple #2
0
        public Lecture(DateTime date_, Subject subject_, List<string> subjectTopics_, Teacher teacher_, StudyGroup studyGroup_)
        {
            if (subject_.topics.Intersect(subjectTopics_).Count() != subjectTopics_.Count)
            {
                throw new InvalidOperationException("In Lecture.Lecture(Subject, List<string>, Teacher, StudyGroup): the subject contains not all of the given topics.");
            }

            date = date_;
            subject = subject_;
            subjectTopics = subjectTopics_;
            teacher = teacher_;
            teacherID = teacher_.TeacherID;
            studyGroup = studyGroup_;
            groupID = studyGroup_.GroupID;
            marks = new List<Mark>();
        }