Question: Read all the instructions carefully and write this program in java. I am a very begineer in java. Please donot use break statements in this

Read all the instructions carefully and write this program in java. I am a very begineer in java. Please donot use break statements in this program and add comments so i can understand your code

This is 4th time i am posting this question here but nobody has done it according to instructions. I hope somebody can help me out.

Read the bold statements in the questions carefully.

This program is based on chapter 9 information. I want you to create a hangman game. The program will start by asking the user for the hidden word or phrase (can be multiple words). And then ask for how many missed guesses are allowed before you will lose. Then the game will begin, (we are assuming a second person will take over at this point)

As the game begins you will show a series of dashes that represent each letter in the word or phrase (blank spaces and punctuation must still show as spaces and punctuation). The user will guess a letter. If that letter exists all versions of that letter (upper and lower case) will appear among the dashes. You can print back the original case of the letter or print back all lower or upper case. Whichever. If the letter doesnt exist you will be told that you have used up one of your misses and only have X number of guesses left. As you continue to guess letters, correct letters should stay shown on screen. You continue to guess letters until you either unveil all the letters and win the game, or you run out of missed guesses and lose. Repeating a letter should count as a miss, but if you have issues with this, leave it as no change to status.

Output Example (User input is marked with >>>. Everything else is what you print to the screen.)

This is a text-based Hangman game. Player 1, please enter the phrase or word for player 2.

>>> I Love Java.

How many wrong guesses would you like to give player 2?

>>> 3

Player 2 Begin

- - - - - - - - -.

Player 2, what is your guess? You have 3 incorrect guesses left.

>>> a

- - - - - - a - a.

Player 2, what is your guess? You have 3 incorrect guesses left.

>>> b

- - - - - - a - a.

This letter is not present.

Player 2, what is your guess? You have 2 incorrect guesses left.

>>> i

I - - - - - a - a.

Player 2, what is your guess? You have 2 incorrect guesses left.

>>> t

I - - - - - a - a.

This letter is not present.

Player 2, what is your guess? You have 1 incorrect guesses left.

>>> r

I - - - - - a - a.

This letter is not present.

You have no more guesses left. You lose. Goodbye.

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!