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

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 18:30
Which of the following is an example of intellectual properly! oa. new version of a novelb. journal of ideasc. pages of a bookood. lines of a poem
Answers: 2
question
Computers and Technology, 23.06.2019 00:00
What engine component is shown in the above figure?
Answers: 1
question
Computers and Technology, 23.06.2019 11:00
Sports and entertainment class, your goal is to increase attendance and make a profit for a game by getting your team on a winning track with total salaries less than $3,000,000
Answers: 3
question
Computers and Technology, 23.06.2019 12:50
Which syntax error in programming is unlikely to be highlighted by a compiler or an interpreter? a variable name misspelling a missing space a comma in place of a period a missing closing quotation mark
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
question
Mathematics, 27.06.2020 02:01
question
Physics, 27.06.2020 02:01
Questions on the website: 13722363