package database; /** * This class is derived from section 2.3.3 * It contains important information describing a course. * A course will typically belong to a department, although it might not have * a coListDepartment, in which case this field would be null. Right now the * enum courseType only contains two options, lecture and lab, but more could * possibly be added. * @author jroll * */ public abstract class Course extends DataItem { public enum CourseType { LECTURE, LAB, SEMINAR, DISCUSSION }; public CourseType courseType; public Department department; public Department coListDepartment; public int courseNumber; public int weeklyDuration; public int expectedSize; public double wtus; public double credits; public String description; /** This method sets the coListDepartment. The coListDepartment must be * different from the main dept. */ /*@ requires newCoListDepartment != null && !(newCoListDepartment.equals(this.department)); ensures this.coListDepartment.equals(newCoListDepartment); @*/ public abstract void addCoListDepartment(Department newCoListDepartment); }