Question
in java Create a new class called Question. This class should contain instance variables to store the question, its correct answer, and the complexity level
in java
Create a new class called Question. This class should contain instance variables to store the question, its correct answer, and the complexity level of the question.
Create a method for this class that receives an answer as its input and verifies if it matches the correct answer.
Use the Question class to define a Quiz class. A quiz can be composed of up to 20 questions.
Define a method of the Quiz class to add a question to a quiz.
Define the giveQuiz method of this class to present each question in turn to the user, accept an answer for each one, and keep track of the results (the results should be returned).
Write a driver program (QuizTime) that populates a quiz, presents it, and prints the final results.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started