예제 #1
0
        public void AddSubjectToTeacher(string id, string nameSubject)
        {
            if (id == null)
            {
                throw new ArgumentNullException(nameof(id));
            }
            if (nameSubject == null)
            {
                throw new ArgumentNullException(nameof(nameSubject));
            }
            ITeacher t = GetTeacher(id);
            ISubject s = GetSubject(nameSubject);

            if (s != null)
            {
                s.AddTeacher(t);
                t.AddSubject(s);
            }
        }