Objective: Create a simple "Guess the Number" game using Java. This game will involve a user guessing a number generated by the computer within a specified range.
-
The program should generate a random number between 1 and 100.
-
The user should be prompted to enter a number as their guess.
-
The program should inform the user if their guess is too high, too low, or correct.
-
The game should continue until the user guesses the number correctly or chooses to quit.
-
The program should keep track of the number of attempts made by the user.
-
Implement basic input validation to ensure the user enters a valid number.
-
GuessingGame: The main class that handles the game logic and user interaction. -
GameRunner: Contains themainmethod to run the game.