Question: Exercise 3 Create a class called Quiz that uses your Question class to create Quiz objects A Quiz can be composed of up to 10

 Exercise 3 Create a class called Quiz that uses your Question

class to create Quiz objects A Quiz can be composed of up

Exercise 3 Create a class called Quiz that uses your Question class to create Quiz objects A Quiz can be composed of up to 10 questions and a score. The Quiz constructor should initialize an ArrayList and the score accordingly. Create a way to keep track of the total number of quizzes ever created Create a method called void add(Question q) that adds a new question to the quiz What should happen if we try to add an 11 question to a quiz? Create only the necessary getters and setters Create a method called void giveQuizi that presents each question, and its difficulty, in turn to the user, accepts an answer for each one, and keep track of the results. Exercise 4 Create a tester class (read: not a JUnit test class) called Quiz Time that creates and populates a Quiz, presents it, and prints the final results. Pick an interesting topic to make your quiz about To the right is a sample Output for one execution of QuizTime what color is Hare? (Difficulty: 5) Correct! what color is the sky? (Difficulty: 1) correct! what color is the grass (Difficulty 1) Correct! what color is the sun! (Difficulty: 2) Incorrect what color is an orange? (Difficulty: 1) Incorrect Your core is Exercise 5 Currently the difficulty of the questions is not used in creating the quizzes Overload the giveQuiz method in the Quiz class so that it accepts two integer parameters that specify the minimum and maximum difficulty levels for the quiz questions and presents only questions in that difficulty range Hint: work smarter not harder, don't duplicate code. If your overridden method contains almost all the same lines of code as the original giveQuiz method, you're doing it wrong. You have a questo de What color is Love? (Difficulty: 10) Correct what color is Anger? (Difficulty: 10) Correct! what color is Pain? (Fulty: 10) Correcti Your core i3 Create another Quiz in your tester class that demonstrates this new feature. Also demonstrate that you successfully track the total number of quizzes created To the right is a sample Output for one execution of Quiz Time

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 Databases Questions!