Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a method for a student who is taking a multiple - choice test and has not studied, so wants to choose all of their
Write a method for a student who is taking a multiplechoice test and has not studied, so wants to choose all of their answers randomly. The method will take as parameters the number of possible choices for each question and return answers as a string, with each answer separated by a space.
For example, if each question has answer choices where choice A choice B choice C and choice D the method call would be problemchooseAnswers and a possible result is So the student would then fill in choice D for question choice C for question choice C for question choice A for question etc.
Inside your method, construct an object of the Random class see the Java API docs and invoke an appropriate method to generate each answer choice.
Assume the input value for numChoices will always be
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