Computers and Technology

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)));
}
}

answer
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 12:30, umimgoingtofail
What is the difference between the internet and the world wide web?
Answers: 1
image
Computers and Technology, 23.06.2019 18:30, milkshakegrande101
Where can page numbers appear? check all that apply. in the header inside tables in the footer at the bottom of columns at the top of columns
Answers: 1
image
Computers and Technology, 23.06.2019 19:30, bevanscory123
What are loans to a company or government for a set amount of time
Answers: 1
image
Computers and Technology, 24.06.2019 20:00, Cookie320
Write c++programs for the following problem: let the user enter two numbers and display which is greater. !
Answers: 1
Do you know the correct answer?
In Chapter 1, you created a class called RandomGuess. In this game, players guess a number, the appl...

Questions in other subjects:

Konu
Mathematics, 23.09.2020 14:01
Konu
Geography, 23.09.2020 14:01
Konu
Arts, 23.09.2020 14:01
Konu
Mathematics, 23.09.2020 14:01