Esempio n. 1
0
        public void AddStudent(Student st)
        {
            if (_students.Count == MaxCountOfStudents)
                throw new ClassFullException("Can't add student, cuz class is full");

            if (st.IsValid())
                _students.Add(st);
        }
        public void AddStudent(UserInfo userInfo, GroupID id)
        {
            var group = _groups.Find(it => it.Id == id);
            if (group == null)
                throw new GroupNotFoundException(String.Format("Can't find group : {0}", id.Id));

            Student st = new Student(userInfo.FirstName, userInfo.LastName, userInfo.SecondName, userInfo.Uri, userInfo.Age);
            group.AddStudent(st);
            AddUser(st, "Student");
        }
Esempio n. 3
0
 public void RemoveStudent(Student st)
 {
     _students.Remove(st);
 }
Esempio n. 4
0
 public void AddStudent(Student s)
 {
     students.Add(s);
 }