src/edu/kit/informatik/campusmanagement/Professor.java
/**
     * Adds the lecture to the professor.
     * 
     * @param  lecture the lecture to add
     * @throws IllegalStateException if the lecture does not belong to this professor or if the lecture was already
     *         added
     */
Adds the lecture to the professor.

@param  lecture the lecture to add
@throws IllegalStateException if the lecture does not belong to this professor or if the lecture was already
added
Adds the lecture to the professor . @param lecture the lecture to add @throws IllegalStateException if the lecture does not belong to this professor or if the lecture was already added
void add(
            final Lecture lecture) {
        if (lecture.professor() != this) {
            throw new IllegalStateException("Lecture assigned to another professor");
        }
        if (!lectures.add(lecture)) {
            throw new IllegalStateException("Lecture already added");
        }
    }
void add ( final Lecture lecture ) { if ( lecture . professor ( ) != this ) { throw new IllegalStateException ( "Lecture assigned to another professor" ) ; } if ( ! lectures . add ( lecture ) ) { throw new IllegalStateException ( "Lecture already added" ) ; } }
Adds the lecture to the professor.
Adds the lecture to the professor .
////