Posted: Sunday, November 17
Due: Monday, December 9 (hard deadline)
80 points
Because it's the end of the semester and there's a deadline for turning in semester grades, absolutely no late submissions can be accepted for credit (even with late penalty). This assignment will be good practice for the exam, so it's highly recommended that you complete it.
Design a class hierarchy used to represent test papers that would be given in school. It should include at least the following:
Each question has:
For each question, we should be able to create a String representation of the question as it should be presented to the student (for example, during a test or quiz).
An ObjectiveQuestion is a type of question which has a definitive answer. For example, the question 2+3 has the answer 5. (A non-objective question would be one where there's no single correct answer, e.g., something like, "The Civil War was neither civil nor a war. Discuss.".)
Each ObjectiveQuestion has:
For each ObjectiveQuestion, we should be able to create a String representation of the question as it should be presented to the student during a Test. We should also be able to create a String representation of the question which includes the correct answer, such as one that a grader might use when grading a paper.
A fill in the blank question is a kind of question where the correct answer fills in a missing word in the provided text. For example. " _____ was the 16th US President."
Each FillInTheBlankQuestion has:
For each FillInTheBlankQuestion, we should be able to create a String representation of the question as it should be presented to the student during a Test. This should include the blank space. We should also be able to create a String representation of the question which includes the correct answer, such as one that a grader might use when grading a paper.
In a test representation, this might look something like:
______ was the 16th US President.
and in an answer key representation, it might look something like:
___Abraham Lincoln___ was the 16th US President.
A MultipleChoiceQuestion is a kind of question in which there are multiple possible solutions but only one correct solution.
Each MultipleChoiceQuestion has:
For each MultipleChoiceQuestion, we should be able to create a String representation of the question as it should be presented to the student during a Test. We should also be able to create a String representation of the question which includes the correct answer, such as one that a grader might use when grading a paper.
In a test representation, this might look something like:
Who lives in a pineapple under the sea?
- Peter Griffin
- Scooby Doo
- Spongebob Squarepants
- Eric Cartman
and in an answer key, could look something like:
Who lives in a pineapple under the sea?
- Peter Griffin
- Scooby Doo
- **** Spongebob Squarepants ****
- Eric Cartman
Each test has:
We should be able to generate a String representation of a Test as well as its answer key.
Write a program that uses your classes in order to generate both a test and an answer key, writing each to the screen. You're not expected to create an interactive, online testing program. You just need to print the test and its answer key.
Add the ability to send a test and its answer key to files whose names are determined at run time.
Implement a TestBank class, which has:
Submit all of your .java files through Canvas, and if you've completed the extra credit part of the assignment, please also provide your example input files.
It's a good idea to confirm through the Canvas submission page that what you've intended to submit was uploaded. We will grade what you submit. If you submit a corrupted, empty, or otherwise incorrect file, this is what we'll grade. It is your responsibility to verify through the Canvas submission page that you've submitted the correct files and that they were uploaded properly.
Here's a Canvas tutorial on how to submit files.