(**** * * Module LoadDefault defines the objects and operations related to Loading the default instructors * into the temporary Databases for the given schedule * *) module LoadDefault; from ScheduleDB import PermDatabase; from ScheduleDB import TemporaryDatabases; from CourseDB import all; from InstructorDB import InstructorDB, InstructorEntry, FirstName; operation LoadCourseDefaults inputs: list:string* and pcdb:PermDatabase; outputs: tcdb:TemporaryDatabases; precondition: not (list = nil) and forall(coursenam in list) exists (courseent in pcdb.cdb.ce) coursenam=courseent.coursename; postcondition: forall (coursenam in list) exists (courseentry in tcdb.cdb.ce) courseentry.coursename = coursenam; description: (* This operation will load the default list of courses into the temporary database for the quarter. It takes a list which is a bunch of strings that contain the list of the default values that need to be added into the temporary database for that section. *); end; operation LoadInstrDefaults inputs: list:string* and pidb:PermDatabase; outputs: tidb:TemporaryDatabases; precondition: not (list = nil) and forall(instrname in list) exists (instrentry in pidb.idb) instrname=instrentry.firstname; postcondition: forall(instrname in list) exists (instrenrt in tidb.idb) instrenrt.firstname = instrname; description: (* This operation will load the default list of instructors into the temporary database for the quarter. It takes a list which is a bunch of strings that contain the list of the default values that need to be added in. *); end; end LoadDefault;