object name = string;
object uid = string;
object password = string;
object class = string and integer;
object Student
components:name and uid and password and class;
operations:;
description:(*represents a student that has the ability to take the test.*);
end Student;
object Instructor
components: name and uid and password and class* ;
operations:;
description:(*Represents a teacher that has the ability to log in to the test creating portion of the server*);
end Instructor;
object InstructorDB
components: Instructor*;
operations: AddInstructor, DeleteInstructor, FindInstructor;
description: (*A database containing a list of instructors*);
end InstructorDB;
object StudentDB
components: Student*;
operations: AddStudent, DeleteStudent, FindStudent;
description: (*A database containing Students that are able to take the test.*);
end StudentDB;
operation AddStudent
inputs: s:Student, sdb:StudentDB;
outputs: StudentDB;
precondition: (*Student can't exist in db*)not (s in sdb);
postcondition: (*Student has to exist in db*) (s in sdb);
description:(* will take a student and put them in the student database *);
end;
operation DeleteStudent
inputs: s:Student, sdb:StudentDB;
outputs: StudentDB;
precondition: (*Student has to exist in db*) (s in sdb);
postcondition: (*Student can't exist in db*)not (s in sdb);
description:(* This will delete a student in the database. They already have to exist. *);
end;
operation FindStudent
inputs: s:Student, sdb:StudentDB;
outputs: boolean;
description: (*this will take in a student and a database and check if the student exist in that database.*);
end;
operation AddInstructor
inputs: i:Instructor, idb:InstructorDB;
outputs: InstructorDB;
precondition: (*instructor has to not before getting add*) not (i in idb);
postcondition: (*instructor has to exist after getting added*)(i in idb);
description: (* will take a Instructor and put them in the Instructor database *);
end;
operation DeleteInstructor
inputs: i:Instructor, idb:InstructorDB;
outputs:InstructorDB;
precondition: (*instructor has to exist before deletion*)(i in idb);
postcondition: (*instructor cannot exist after deletion*) not (i in idb);
description:(* delete an instructor from the database. *);
end;
operation FindInstructor
inputs: i:Instructor, idb:InstructorDB;
outputs: boolean;
description: (*this will take in a Instructor and a database and check if the
Instructor exist in that database.*);
end;