Answered step by step
Verified Expert Solution
Link Copied!

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 (questions.size ());
LinkedList=>()???0??q1=Random()-min+1??????> answer = answers.get (randomIndex);
LinkedList String > result = new LinkedList >();
result.addAll (question);
result.addAll (answer);
return result;???
select a random question with the answer and return itas a linkedlist. 0???
q and 1a.
l
public int rolldice (int min, int max){???
create random number generator
Random random = new Random();
return random.nextInt (max-min+1)+min;
}
public static boolean checkAnswers(String userInput, String realAnswer){???
you may want to add an extra parameter to check original list rather???
than just a single question and answer???
check if the correct answer is given for a specific question
return userInput.trim(). equalsIgnoreCase (realAnswer.trim());
}
> question = questions.get (randomIndex);
LinkedList> answer = answers.get (randomIndex);
LinkedList String > result = new LinkedList >();
result.addAll (question);
result.addAll (answer);
return result;???
select a random question with the answer and return itas a linkedlist. 0???
q and 1a.
l
public int rolldice (int min, int max){???
create random number generator
Random random = new Random();
return random.nextInt (max-min+1)+min;
}
public static boolean checkAnswers(String userInput, String realAnswer){???
you may want to add an extra parameter to check original list rather???
than just a single question and answer???
check if the correct answer is given for a specific question
return userInput.trim(). equalsIgnoreCase (realAnswer.trim());
}
image text in transcribed

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

Secrets Of Analytical Leaders Insights From Information Insiders

Authors: Wayne Eckerson

1st Edition

1935504347, 9781935504344

More Books

Students also viewed these Databases questions