Project: Level Up the Java Menu App
Add a number guessing game to your Java menu app using input, loops, and random numbers.
We'll cover the following
You’ve built a menu app that greets users and tells jokes. Now let’s make it smarter and more interactive.
Add new menu options: Show a random number and play a number guessing game.
Menu options
Greet
Tell a joke
Show a random number (1–100)
Play a number-guessing game
Exit
Requirements
In option 4, start a number-guessing game:
Use
Random
to generate a number between 1 and 10.Ask the user to guess the number until they get it right.
After each guess, say “Too high,” “Too low,” or “Correct!”.
Return to the main menu once they guess correctly.
Get hands-on with 1400+ tech skills courses.