Question: 4. Create a sub class MultiChoiceQuestion to the question hierarchy of Section 10.1 that allows multiple correct choices. The respondent should provide all correct choices,

 4. Create a sub class MultiChoiceQuestion to the question hierarchy of

4. Create a sub class MultiChoiceQuestion to the question hierarchy of Section 10.1 that allows multiple correct choices. The respondent should provide all correct choices, separated by spaces. Provide instructions in the question text. Below is the program that runs the class MultiChoiceQuestionpy. 4 pts # This program shows a simple quiz with one question. it Create the question and expected answer. q : MultiChoiceQuestionO q.setText{"Of Apple, Tomato, Carrot. Cucumber and Celery, list all that are fruit") q.setAnswerC'AppIe Tomato") # Display the question and obtain user's response. q.display0 response : inputC'Your answer: "} print(q-checkAnswer(response)) Note: Responses of \"Apple Tomato\" or \"Tomato Apple \" are both correct. W a) Your code with comments b) A screenshot of the execution

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!