Create a class called Hurkel with a public static void main method to begin execution Display a number line 0 to 10 Get a random number Get a guess from the user Compare the userGuess to the Random number If they match announce Winner! If not tell the user if their guess is higher or lower than the random number Check to see how many times the User has guessed, limit guesses to 3 If not 3 then Compare the userGuess to the Random number If they match announce Winner! If not tell the user if their guess is higher or lower than the random number Check to see how many times the User has guessed, limit guesses to 3 until there is a match or the user has guessed 3 times.

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter4: More Object Concepts
Section: Chapter Questions
Problem 2PE
icon
Related questions
Question

Create a class called Hurkel with a public static void main method to begin execution
Display a number line 0 to 10
Get a random number
Get a guess from the user
Compare the userGuess to the Random number
If they match announce Winner!
If not tell the user if their guess is higher or lower than the random number
Check to see how many times the User has guessed, limit guesses to 3
If not 3 then
Compare the userGuess to the Random number
If they match announce Winner!
If not tell the user if their guess is higher or lower than the random number
Check to see how many times the User has guessed, limit guesses to 3
until there is a match or the user has guessed 3 times.

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 2 images

Blurred answer
Knowledge Booster
void method
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781305480537
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT