Create a class Game, which allows a user to play "Guess the Number" game once. Game should have the following methods: 1. Constructor to generate the random number 2. takeUserInput() to take a user input of number 3. isCorrectNumber() to detect whether the number entered by the user is true 4. getter and setter for noOfGuesses Use properties such as noOfGuesses(int), etc to get this task done!
tashfiaj / guess-the-number Goto Github PK
View Code? Open in Web Editor NEWThis Java code defines a "Guess the Number" game using the `Game` class, allowing the user to guess a randomly generated number and providing feedback on their attempts until they guess correctly.