Question: You created a Secret Phrase game similar to Hangman, in which the user guesses letters in a partially hidden phrase in an attempt to determine

You created a Secret Phrase game similar to Hangman, in which the user guesses letters in a partially hidden phrase in an attempt to determine the complete phrase. Modify the program so that: 

  • The phrase to be guessed is selected randomly from a list of at least 10 phrases.
  • The clue is presented to the user with asterisks replacing letters to be guessed but with spaces in the appropriate locations. For example, if the phrase to be guessed is No man is an island, then the user sees the following as a first clue: ** *** ** ** ******. The spaces provide valuable information as to where individual words start and end.
  • Make sure that when a user makes a correct guess, all the matching letters are filled in, regardless of case. Save the game as SecretPhrase2.java.

Step by Step Solution

3.47 Rating (167 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

import javaxswing public class SecretPhrase2 public static void mainString args String targetPhrases ... 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 Java Programming Questions!