Question: To be done in JAVA Guessing Game Program Guessing Game Program For this program, you and your team will create a non-robotic program wherein the

To be done in JAVA

Guessing Game Program

Guessing Game Program

For this program, you and your team will create a non-robotic program wherein the user tries to guess a secret number that the program chooses. Youll use the provided files, Game_Program, and GuessingGame, as the starting point for your program. When the program starts up, it should print a message welcoming the user to the game, and then start the game. The game should start by printing a set of directions, and then asking the user for the users first guess. The user only gets 5 guesses to guess the secret number. If the user guesses the secret number, then a Youve won! message is printed to the screen, and the game ends. Otherwise, the program tells the user if the guess was lower or higher than the number. The program should keep track of the numbers that the user has guessed (using an array), and print them all out before the user guesses. If the user guesses something theyve already guessed, dont count it as a guess, but do print a message politely reminding them of this. You need to tell the user how many guesses they have left at each step. If the user runs out of guesses, the program should tell the user that, then print the secret number, and then the game ends. Once the game has ended, the user should be given the choice of whether to play the game again. This answer should be given back to the Game_Programs main method (as opposed to having another loop inside the GuessingGame object). An example transcript demonstrating how the program might run is as follows (player input is in bold) Welcome, new player! Lets play the guessing game! Rules of the guessing game: 1. Youve got 5 guesses to guess my secret number 2. The number is a whole number thats between 0 and 15 (inclusive at both ends) 3. Ill give you hints about the number, if you dont guess right. Ok, I just thought of a new number for you to guess. So far, youve guessed: You have 5 guesses left Your next guess? 7 Im sorry, but my secret number is not 7, my secret number is less than 7 So far, youve guessed: 7 You have 4 guesses left Your next guess? 7 Youve already guessed 7, so far, youve guessed: 7 You have 4 guesses left Your next guess? 5 Im sorry, but my secret number is not 5, my secret number is greater than 5 So far, youve guessed: 7 5 You have 3 guesses left Your next guess? 6 Great guess!!! Thats my number!! You _SOO_ win!! Want to play again (type 1 for yes, and 0 for no) 0 Have a nice day!

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!