operation AddComment inputs: Comment, AnsweredQuestion, AnsweredTest; outputs: GradedQuestion; precondition: (* * comment cannot equal null *) ( comment != null ) and (* * old and new comment are not same *) ( oldComment != newComment ) and (* * question cannot equal null *) ( question != null ) and (* * test cannot equal null *) ( test != null); postcondition:(* * a question with a new comment is outputed if and * only if the comment is not equal to the old comment * otherwise the comment is empty and the comment is * on the question of a test *) ( exist (newComment in gradedQuestion) (gradedQuestion in gradedTest)) iff (oldcomment ! = newCOmment); description: (* Add a given comment to an answer of a student's question. The comment will appear in a text box below the question. *); end; operation DeleteComment inputs: Comment, GradedQuestion, GradedTest; outputs: GradedTest; precondition: (* * comment cannot equal null *) ( comment != null) and (* * comment must be in gradedQuestion *) ( Comment in GradedQuestion ) and (* * gradedTest cannont equal null *) ( gradedTest != null); postcondition:(* * an new gradedQuestion with the comment deleteted if and only * if the comment is on the gradedQuestion *) ( question in test ); description: (* Delete the selected a question on a test by the user. After user comfirms that the question is removed from that student's test or the entire class, the test properties are then adjusted. *); end; operation DeleteQuestion inputs: AnsweredQuestion, AnsweredTest; outputs: GradedTest; precondition: (* * question cannot equal null *) ( question != null) and (* * question must be in test *) ( question in test ) and (* * test cannont equal null *) ( test != null); postcondition:(* * an new test with the question deleteted if and only * if the question is on the test *) ( question in test ); description: (* Delete the selected a question on a test by the user. After user comfirms that the question is removed from that student's test or the entire class, the test properties are then adjusted. *); end; operation ChangeAnswer inputs: CorrectAnswer, AnsweredQuestion; outputs: GradedQuestion; precondition: (* * correctAnswer cannont equal null *) ( correct != null) and (* * newCorrectAnswer cannont equal oldCorrectAnswer *) ( newCorrectAnswer != oldCorrectAnswer ) and (* * question cannont equal null *) ( question !=null ); postcondition:(* * question is output with the new answer if and only if * the old correct answer to be replaced is not equal to the * new answer added in the question. *) ( exist (correctAnswer in question) iff (newAnswer != oldAnswer)); description: (* Change the old correct answer to a new answer so the total grade earned by a student or throughout the whole class. The user will declare whether the change is affected to specific student or to the whole class. The new correct answer cannot be the same as the old correct answer. *); end; operation ChangeDifficulty inputs: Difficulty, AnsweredQuestion; outputs: GradedQuestion; precondition: (* * difficulty cannot equal null *) ( difficulty != null ) and (* * old difficulty cannot equal new difficulty *) ( oldDifficulty != newDifficulty ) and (* * question cannot equal null *) ( question !=null ); postcondition:(* * question is outputed with new difficulty if and only if * the old difficulty to replaced is not equal to the new * difficulty added in the question. *) ( exist (difficulty in question) iff (newDifficulty != oldDifficulty)); description: (* Change the old difficulty to a new difficulty range 1-10. The user selects a question depending on the success rate. The question is then changed for the entire class that took the test. *); end; operation ChangePointValue inputs: Points, AnsweredQuestion; outputs: GradedQuestion; precondition: (* * points cannot equal null *) ( points != null ) and (* * old points cannont equal new points *) ( oldPoints != newPoints ) and (* * question cannot equal null *) ( question != null ); postcondition:(* * a question is outputed with the new point value if and * only if the old point value to be replaced is not equal * to the new point value added in the question. *) ( exist (points in question) iff (newPoint != oldPoint)); description: (* Change the old point value to a new point value. The user selects a question and depending on the success rate or difficulty changes the point value. *); end;