Answered step by step
Verified Expert Solution
Question
1 Approved Answer
1) Write a Java Program in which you are going to create a game to guess a number. You will create a program that
1) Write a Java Program in which you are going to create a game to guess a number. You will create a program that will generate a random number between 0 and 100. Depending on the number entered by the user, the program will prompt you to enter a greater or lower number. The process will end when the user enters the guessed number and will also indicate how many attempts it is taken to guess the number. (60 points) a. Name the program: game.java b. The program should start asking with the following message: Input Message Enter a greater number OK Enter a number c. You should receive one of the following message boxes depending on the number that the user entered. Message OK X Message Cancel OK UITOR Enter a lower number OK d. Finally, after you have guessed the number, it will show the message box shown below. X Great!! You guessed the number is: 59 It took 7 attempts to win!!
Step by Step Solution
There are 3 Steps involved in it
Step: 1
import javautilRandom import javautilScanner public class GuessingGam...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