(**** * The Create Test module provides the basic objects for a test and * the functions to create the test and add, delete, and edit questions * in the test. *) --module CreateTest; --import ManageQuestion; --export CreateTest; object OriginalTest is components: OriginalTestQuestion* and ClassName and Title and TotalPoints and Time; description: (* Object Original is the test that the teacher creates either from a blank test of from the test generator. *); end OriginalTest; object OriginalTestQuestion inherits from Question is components: QuestionPoints; description: (* OriginalTestQuestion is the same as AddQuestion except it adds points for when the test is taken. *); end OriginalTest; object QuestionPoints is integer description: (* Question Points is the number of points the question is worth *); end QuestionPoints; object TotalPoints is integer description: (* Points is the total number of points in a test *); end TotalPoints; object Title is components: string; description: (* Title is the distinguishing name that the teacher chooses to identify the test as. The title will be what is displayed when the student tries to view it. *); end Title; object Time is integer description: (* Time is the total that comes from adding the Times for all of the questions in the test. *); end Time; op AddQuestionToTest is inputs: Question and OriginalTest; outputs: OriginalTest; description: (* Adds a Question from the TestBank to the Test *); end AddQuestionToTest; op EditTestQuestion is inputs: OriginalTestQuestion and OriginalTestQuestion and OriginalTest; outputs: OriginalTest; description: (* Edits a Test Question *); end EditTestQuestion; op DelTestQuestion is inputs: OriginalTestQuestion and OriginalTest; outputs: OriginalTest; description: (* Deletes a question from the test *); end DelTestQuestion; obj TestGeneratorOptions is components: NumOfQuestions and Time and RequestList; description: (* This is the specific options that the instructor gives to generate a test to his/her specifications *); end TestGeneratorOptions; obj NumOfQuestions is integer; obj RequestList is components: Requests*; end RequestList; obj Request is Type and Difficulty; op CreateTest is inputs: ClassName and Title; outputs: OriginalTest; description: (* This is the operation to create a blank test *); end CreateTest; op CreateTest is inputs: ClassName and Title and TestGeneratorOptions and Preferences; outputs: OriginalTest; description: (* This is the operation to create a test using the generator *); end CreateTest; --end CreateTest;