Question: Plese follow the specifications Cnstant called MAX must be called in the main method tit defines the maximum possible random nuber ( more are listed
Plese follow the specifications
Cnstant called MAX must be called in the main method tit defines the maximum possible random nuber more are listed below
TEP : Generate a random number: Generate a random integer between and from a seeded Random object
STEP : Prompt the user for a number between and Prompt the user to enter a number between and
STEP : Endgame: When the user guesses the correct number, proper congratulations are doled out, the number of guesses required is displayed, and the game is over. game immediately; otherwise, the program should end.
Observe that the flow chart for this assignment is very similar to the flow chart for Part of the Guess a Number assignment. The only difference is an extra prompt and a loop!
SPECIFICATIONS:
Use the completed code from the Guessing Game Part project from chapter as the starter code for this project
File name:GuessaNumberPartjava
The output must match the sample output exactly
The user must be prompted for
a seed for the random number generator and then play the game again.
Any integer may be used as the seed and as a guess.
The program must not discriminate a user's guess. A guess that contradicts a hint too high' or 'too low or is repeated is a valid guess.
Instance variablesconstants may not be used. In general, content not formally presented in the class heretofore cannot be usedI
To receive full credit,
the main method may either methods methods that you write:
a process nonvoid method that returns the number of userattempts to guess the randomnumber correctly,
an output void method that displays the final results of the program the number of guess required to correctly guess the random number and of times in order to return a userdefined response regarding an additional play of the game or
simply call a process void method that
employs a nested loop with:
the innerloop controlling the play of the game including calling an oulput void method that displays the final results of the program the number of guess required to correctly guess the random number and
the outerloop prompting the user to play again.
the main method must contain:
a salutation to the user
the constant called MAX that defines the maximum possible random number,
the Scanner object declaration,
either one programmerdefined method a method that you write call to the process method or three programmerdefined method calls to the process, output, and input methods that may be subject to a deduction check with your instructor and
one method call to the Scanner object that does not read from the input buffer!
the main method may either
contain the loop to govern the game and possibly at the expense of a deduction check with your instructor or
call a process nonvoid method that contains the loop to govern the game and return the number of guess required to correctly guess the random number.
the process method may not contain a print statement!
the repetition of the game may be governed by a loop either
: in the main method and possibly at the expense of a deduction check with your instructor but potentially cleverly avoiding a nested loops scenario or
in the process method thus presenting a nested loops scenario
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
