E N D
City College wants to implement an IS to assign classrooms for scheduled courses. A classroom is defined to be a room within a campus building. A building contains many rooms. A classroom is scheduled for a particular course period designated by time-of-day and days-of-week. Courses are offered by different departments, but one course can be offered by a single department only. All courses listed on the semester schedule of courses must have rooms assigned. A course may only be assigned to rooms with adequate capacity, i.e. capacity should at least equal the max course enrollment Draw the class diagram. Identify appropriate methods for the classes to (1 - assign rooms to courses in accordance with capacity (2 - ensure all course have rooms assigned (3 - ensure no schedule conflicts exist
SCHED_COURSE TimeOfDay DaysOfWeel maxEnroll AssignRoom DEPARTMENT EnsureRoomAssgt CLASS ROOM Capacity getCapacity CheckSchedConflict City College Example 0..1 1..* 1 * 1..* 1 BUILDING
(City College example – continued/alternative) A department’s administrative assistant sets up a new course by creating a ScheduledCourse instance and settings its timeOfDay, daysOfWeek and maxEnrollment. Then (s)he checks for available rooms (the department maintains a list of rooms available for its classes). The assistant is notified if no rooms are available. If a room is available, the scheduled course is set to the specified room. After setting up multiple course, the assistant ensures that all scheduled courses have rooms assigned. Note: “scheduled course is set to the specified room” – what exactly, in terms of the class instances, needs to be done here?
:Assistant :RoomList :Department :ClassRoom create :SchedCourse setTime&Day(TofD, DofW) setMaxEnrollment(maxEnroll) for 1 to N courses GetRoom(maxEnroll) roomsAvailable AssignRoom(room#) CheckScheduleConflict EnsureRoomAssgt