public Section(int sectionId, String name, Subject subject, Schedule schedule, Teacher teacher)
			throws ScheduleConflictException {

		if (sectionId < 0) {
			throw new IllegalArgumentException("Section id must not be negative.");
		}
		if (name == null) {
			throw new IllegalArgumentException("Section name must not be null.");
		}
		if (subject == null) {
			throw new IllegalArgumentException("Subject must not be null.");
		}
		if (schedule == null) {
			throw new IllegalArgumentException("Schedule must not be null.");
		}
		if (teacher == null) {
			throw new IllegalArgumentException("Teacher must not be null.");
		}

		this.teacher = teacher;
		this.sectionId = sectionId;
		this.name = name;
		this.subject = subject;
		this.schedule = schedule;
		this.classCards = new HashSet<ClassCard>();

		if (teacher.hasScheduledClass(schedule)) {
			boolean scheduledClassIsSameSection = teacher.hasSection(this);

			if (!scheduledClassIsSameSection) {
				throw new ScheduleConflictException("Schedule conflict for a teacher when adding the section.");
			}
		}
		
		teacher.addSection(this);
	}