Example #1
0
        public void AddStudent(int grade, Student student)
        {
            Classroom classroomFound = null;

            foreach (var classroom in _classes)
            {
                if (classroom.Grade == grade)
                {
                    classroomFound = classroom;
                    break;
                }
            }

            if (classroomFound == null)
            {
                classroomFound = new Classroom(grade);
                _classes.Add(classroomFound);
            }

            classroomFound.AddStudent(student);
        }
Example #2
0
 public void RegisterForAttendance(Classroom c)
 {
     AttendedClassroom = c;
 }
Example #3
0
 public void AddClass(Classroom c)
 {
     _classes.Add(c);
 }