Question: In several Game Zone assignments earlier in this book, you created games similar to Hangman in which the user guesses a secret phrase by selecting
In several Game Zone assignments earlier in this book, you created games similar to Hangman in which the user guesses a secret phrase by selecting a series of letters. These versions had limited appeal because each contained only a few possible phrases to guess; after playing the games a few times, the user would have memorized all the phrases. Now create a version in which any number of secret phrases can be saved to a file before the game is played. Use a text editor such as Notepad to type any number of phrases into a file, one per line. Save the file as Phrases.txt. Then, create a game that randomly selects a phrase from the file and allows a user to guess the phrase letter by letter. Save the game as SecretPhraseUsingFile.java.
Step by Step Solution
3.44 Rating (160 Votes )
There are 3 Steps involved in it
Data for Phrasestxt Dont tread on me Whos on first I heart new york the sunshine state import javaxswing import javaniofile import javaio import stati... View full answer
Get step-by-step solutions from verified subject matter experts
