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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!