Question: Using a char array, loops, and if statements design a program that plays a game of hangman using the predetermined words data structures that the


Using a char array, loops, and if statements design a program that plays a game of hangman using the predetermined words "data structures" that the player will guess (reference in class example).


In each round of the game your program should:

  1. Display which round of the game we're on
  2. Display the correctly guessed letters and/or underscores to indicate letters yet to be guessed
  3. Prompt for a new letter (Note: space characters do not need to be guessed)
  4. Determine if there are any matches, and announce how many
  5. Detect if the game is complete, if so announce this condition and end the program, else proceed to next round


Bonus: 10 pts Modify this program to accept any word(s) from the user as the word(s) to be guessed

Step by Step Solution

3.29 Rating (161 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Heres a Java program to play a game of hangman using the predetermined word data structures import j... View full answer

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 Programming Questions!