(**** * * Module ManageQuestion has all the operations and objects that have to do with * the question such as AddQuestion, EditQuestion, and DeleteQuestion. * *) --module ManageQuestion; -- from Bank import QuestionBank; -- export Question, QuestionText, Type, Answer, Difficulty, Time, ClassName; operation AddQuestion is inputs: Question and QuestionBank; outputs: QuestionBank; description: (* Object AddQuestion is the window where you enter all the information about the new question for the question bank. *); end AddQuestion; object Question is components: QuestionText and Type and Answer and Difficulty and Time and ClassName; operations: SeeText, SeeHTML; description: (* Object Question is the text of the actual question. You can switch between raw text and HTML. *); end Question; object QuestionText is string; object Type is components: MultipleChoice or MultipleAnswer or TrueFalse or Matching or Code or Essay; description: (* Object Type hold the type of the question. It can be any of the above types of questions. *); end Type; obj MultipleChoice; obj MultipleAnswer; obj TrueFalse; obj Matching; obj Code; obj Essay; object Difficulty is number; object Time is number description:(* Object Time is the time it takes to complete the question. Time is specified in minutes. The time can be incremented and decremented by buttons on the side. *); end Time; object ClassList is components: ClassName*; description: (* Object Class is a pull down menu with all the classes that are in the question bank already. There is an option of "Others". You can add another class by clicking on "Others" (OtherClass). *); end ClassList; object ClassName is string; object Answer is components: MatchingAnswer or MultipleChoiceAnswer or MultipleAnswerAnswer or EssayAnswer or CodeAnswer or TrueFalseAnswer; description: (* Object Answer holds the answer of the actual question. It could have text, matching fields, multiple choice fields, or partial credit percentages. *); end Answer; object MatchingAnswer is MatchingPair*; object MatchingPair is LeftColumn and RightColumn; obj LeftColumn is string; obj RightColumn is string; object MultipleChoiceAnswer is MultipleChoiceOptions*; object MultipleChoiceOptions is MultipleChoiceText and IsCorrect; obj IsCorrect is boolean; obj MultipleChoiceText is string; obj EssayAnswer is string; obj CodeAnswer is string; obj MultipleAnswerAnswer is ...; obj TrueFalseAnswer is True or False; obj True; obj False; operation EditQuestion is inputs: Question and Question and QuestionBank; outputs: QuestionBank; description: (* Object EditQuestion is the window where you edit all the information about the question from the question bank. *); end EditQuestion; operation DeleteQuestion is inputs: Question and QuestionBank; outputs: QuestionBank; description:; end DeleteQuestion; --end ManageQuestion;