For this studio, you will design and build a console program that allows the user to take a quiz. This means you will have to create some questions, and get some input from the user.
First, the questions. We want to be able to handle multiple types of questions:
In order to design your program, consider:
First, design a base class (called Question
) that contains the common features, and
design subclasses for each of the question types. For each question type
be sure to include:
Should any of the question classes be abstract? If so, should any of its methods be abstract?
Make sure that there is functionality included to display the questions, to display the possible answers, and to check to see if the answer(s) is correct.
Then design the Quiz
class. A quiz has a list of questions, and we
should be able to:
Create a new IntelliJ project and implement the design that you created. If you are unsure about your design, get some feedback by talking through it with a classmate before you start coding.
Create a class named QuizRunner
with only a main
method. The program should
create several questions, present them to the user, accept the user’s
responses, and then tell them whether their answers were correct or
incorrect.
Push up your work to a new Github repository. Submit the link to your repository in the Lesson 6 Studio assignment in Canvas.