Answered step by step
Verified Expert Solution
Question
1 Approved Answer
it is a hangman game in java thank you so much! Game: Hangman Write a hangman game that randomly generates a word and prompts the
it is a hangman game in java thank you so much!
Game: Hangman Write a hangman game that randomly generates a word and prompts the user to guess one letter at a time, as shown in the sample run. Each letter in the word is displayed as an asterisk. When the user makes a correct guess, the actual letter is then displayed. When the user finishes a word, display the number of misses and ask the user whether to continue to play with another word. Declare an array to store words, as follows: // Add any words you wish in this array String[] words {"write", "that", ); (Guess) Enter a letter in wordp Enter (Guess) Enter a letter in word pr**t** > p-Enter p is already in the word (Guess) Enter a letter in word pr****oEnter (Guess) Enter a letter in word pro***g Enter (Guess) Enter a letter in word progr** nEnter n is not in the word (Guess) Enter a letter in word progr**m Enter (Guess) Enter a letter in word progr*m a Ente The word is program. You missed 1 time Do you want to guess another word? Enter y or n>Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started