Question
4. Correctly implement the following static methods in addition to method main: A method that generates a random number between 1 and maximum number defined
4. Correctly implement the following static methods in addition to method main:
A method that generates a random number between 1 and maximum number defined in 3.
A method to give instructions to the user
A method to play one game with the user
5. When you ask the user whether or not to play again, you should use the next() method of the Scanner class to read a one-word answer from the user. You should continue playing if this answer begins with the letter y or the letter Y. Notice that the user can type words like yes. You have to look just at the first letter of the users response and see whether it begins with a y or n (either capitalized or not) to determine whether to play again.
4. Correctly implement the following static methods in addition to method main:
A method that generates a random number between 1 and maximum number defined in 3.
A method to give instructions to the user
A method to play one game with the user
5. When you ask the user whether or not to play again, you should use the next() method of the Scanner class to read a one-word answer from the user. You should continue playing if this answer begins with the letter y or the letter Y. Notice that the user can type words like yes. You have to look just at the first letter of the users response and see whether it begins with a y or n (either capitalized or not) to determine whether to play again.
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