5.3 Student Interface (student.sl)

5.3 Student Interface (student.sl)

(****
 *
 * This file defines the objects and operations related to the student interface.
 * All academic information such as major, course, and year are based on 
 * the College of Engineering of Cal Poly, SLO, specifically for Computer Science,
 * Computer Engineering, and Electrical Engineering.
 *
 *)

object StudentInput
	components: 
		Major and StudentYear and CoursePrefix and 
		CourseNumber and TermQuarter and TermYear and 
		RequiredClass and ReasonMissed and OtherReason;
	description: (* 
		Holds the information for the class missed and additional
		information on the details
	*);
end StudentInput;

object Major = CPE or EE or CSC; 
object StudentYear = Freshman or Sophomore or Junior or Senior or SuperSenior;
object CoursePrefix = CPE or EE or CSC;
object CourseNumber = int;
object TermQuarter = Summer or Fall or Spring or Winter;
object TermYear = int;
object RequiredClass = boolean;
object ReasonMissed = Overfilled or Unavailable or TimeConflict or OtherReason;

object CPE;
object EE;
object CSC;

object Freshman;
object Sophomore;
object Junior;
object Senior;
object SuperSenior;

object Summer;
object Fall;
object Spring;
object Winter;

object Overfilled;
object Unavailable;
object TimeConflict;
object OtherReason;

object OtherReasonExtended = string;

object StudentInputDB
	components: StudentInput*;
	description: (*
		Holds all of the student inputs sent in
	*);
end StudentInputDB;

operation AddStudentInput
	inputs: si:StudentInput, sdb:StudentInputDB
	outputs: sdb':StudentInputDB
	
	precondition: (* None. *);
	
	postcondition:
		(*
		 * The student input is added into the database and all of the
		 * other student inputs of the database are still in the database
		 *)
		 
		 sdb' = si + sdb;
		 
	description: (*
		Adds the student input into the student input database
	*);
		 
end AddStudentInput;






Prev: instructor_view.sl Next: InstructorDB.sl Up: spec Top: index