Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design And Implementation

Authors: Edward Sciore

2nd Edition

3030338355, 978-3030338350

More Books

Students also viewed these Databases questions