If the user's guess is higher than the random number, the application should display, 'too high! ' if the user's guess is lower than the random number, the application should display, 'too low! ' if the user's guess is more than 10 higher or 10 lower than the random number, the application should display, 'way too high! ' or 'way too low! ' the message that's displayed when the user gets the number should vary depending on the number of guesses. for example: number of guesses message < =3 great work! you are a mathematical wizard. > 3 and < =7 not too bad! you've got some potential. > 7 what took you so long? maybe you should take some lessons. when the user guesses a number, the application should only accept numbers from 1 to 100. when the user responds to the try again? prompt, the application should only accept a value of y or n . if the user enters invalid data, the application should display an appropriate error message and prompt the user again until the user enters valid data. the code that's used to validate data should be stored in separate methods. for example: public static double getdoublewithinrange(scanner sc, string prompt, double min, double max) public static int getintwithinrange(scanner sc, string prompt, int min, int max) the code that's used to run the application should also be stored in separate methods. use the random() method of the java.lang.math class to generate a random number.

Solved
Show answers

Ask an AI advisor a question