package admin; import java.util.Collection; /** ** A roomDB object is generated by the ** roomDB generator and contains records ** relating to all the courses. ** @author isellar **/ public abstract class RoomDB{ public Collection roomDB; /** * add function will let you add an entry to the room database */ /*@ requires // // The room building/number combination // is unique and non-null // (room.name != null && !(\exists Room r; roomDB.contains(r); (r.roomNumber == room.roomNumber && r.buildingNumber == room.buildingNumber))); ensures // // If all preconditions are met then // a room is added to the database // (\forall Room r; (roomDB.contains(r) <==> ((\old(roomDB.contains(r))) || room == r) )); @*/ public abstract void add(Room room); /** * The remove function will let you remove an entry the room database */ /*@ requires // // The given room is in the database // (\exists Room r; roomDB.contains(r); (r.equals(room))); ensures // // If all preconditions are met then // the given room will be removed from the DB // (\forall Room r; roomDB.contains(r) <==> r.equals(room) && \old(roomDB).contains(r)); @*/ public abstract void remove(Room room); }