package studentDB; /** * * Represents a course. A course has a title, and a list * of students taking it. * */ public interface Course { /** * Sets the title of the course. * @param title The title of the course */ public void setTitle (String title); /** * Returns the title of the course. * @return The title of the course */ public String getTitle (); /** * Sets the list of enrolled students to the given list. * @param students The students enrolled in this course */ public void setEnrolledStudents (StudentList students); /** * Returns the list of students enrolled in this course. * @return The students enrolled in this course */ public StudentList getEnrolledStudents (); /** * Determines whether this course is equal to the given * course. Two courses are equal if their titles are * the same. * @param c The course we are testing for equality * @return Whether this course is equal to given course */ public boolean equals (Course c); /** * Returns a string representation of the course, * listing the course's title and enrolled students. * @return String representation of course */ public String toString(); }