subject

In Chapter 1, you created a class called RandomGuess. In this game, players guess a number, the application generates a random number, and players determine whether they were correct. Now that you can make decisions, modify the application so it allows a player to enter a guess before the random number is displayed and then displays a message indicating whether the player’s guess was correct, too high, or too low. Save the file as RandomGuess2.java.

This is the class I created in Chapter 1:

import javax. swing. JOptionPane;
public class GameZone1 {
public static void main(String[] args) {

JOptionPane. showMessageDialog(null, "Think of a number between 1 and 10");
JOptionPane. showMessageDialog(null, "The number is "+ (1 + (int)(Math. random() * 10)));
}
}

ansver
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 21.06.2019 19:30, muffinman97
Which of the following are types of formatting you can apply to a spreadsheet? choose all that apply.
Answers: 3
image
Computers and Technology, 22.06.2019 18:30, Akkenson17871
The "instance" relationship shows that something is an object of a
Answers: 1
image
Computers and Technology, 22.06.2019 23:00, maxy7347go
Which factor is the most important when choosing a website host? whether customers will make secure transactions the number of email accounts provided the purpose of the website the quality of the host control panel
Answers: 3
image
Computers and Technology, 23.06.2019 05:20, reeeeeee32
What did creator markus “notch" persson initially call his game
Answers: 1
You know the right answer?
In Chapter 1, you created a class called RandomGuess. In this game, players guess a number, the appl...

Questions in other subjects: