Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please find the screen shot of GameFunctions class which is causing the error in the Main function and the GameSetup function import java.util.LinkedList; public class
Please find the screen shot of GameFunctions class which is causing the error in the Main function and the GameSetup function import java.util.LinkedList;
public class GameFunctions
Random random new Random randomNum;
int randomIndex random.nextInt questionssize ;
LinkedListRandommin answer answers.get ;
LinkedList String result new LinkedList ;
result.addAll ;
result.addAll ;
return result;
select a random question with the answer and return a linkedlist.
and
public int rolldice min, int max
create random number generator
Random random new Random;
return random.nextInt minmin;
public static boolean checkAnswers userInput, String realAnswer
you may want add extra parameter check original list rather
than just a single question and answer
check the correct answer given for a specific question
return userInput.trim equalsIgnoreCase trim;
question questions.get ;
LinkedList answer answers.get ;
LinkedList String result new LinkedList ;
result.addAll ;
result.addAll ;
return result;
select a random question with the answer and return a linkedlist.
and
public int rolldice min, int max
create random number generator
Random random new Random;
return random.nextInt minmin;
public static boolean checkAnswers userInput, String realAnswer
you may want add extra parameter check original list rather
than just a single question and answer
check the correct answer given for a specific question
return userInput.trim equalsIgnoreCase trim;
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