Answered step by step
Verified Expert Solution
Question
1 Approved Answer
JAVA Language **describe how you are randomizing the choice of words (it must be random) Write a hangman game. . The program prompts the user
JAVA Language
**describe how you are randomizing the choice of words (it must be random)
Write a hangman game. . The program prompts the user for the words text file name, throws an exception if it fails to find the file . The program choses from the words stored in the text file in random order and prompts the user to guess one letter at a time The words are delimited by newline. Each letter in the word is displayed as an asterisk . When the user makes a correct guess, the actual letter is then displayed rement a bad guess counter (display to the user to increase pressure/stress II bad guesses -lose) When the user finishes a word, display the number of misses andask the user whether to continue to play with another word Reset the bad guesscounter for cach new word Declare an array to store words used and add words used in the game to this array . When the user declines to play again print the score (number of wins by user, number of wins by program) and the words used Write a hangman game. . The program prompts the user for the words text file name, throws an exception if it fails to find the file . The program choses from the words stored in the text file in random order and prompts the user to guess one letter at a time The words are delimited by newline. Each letter in the word is displayed as an asterisk . When the user makes a correct guess, the actual letter is then displayed rement a bad guess counter (display to the user to increase pressure/stress II bad guesses -lose) When the user finishes a word, display the number of misses andask the user whether to continue to play with another word Reset the bad guesscounter for cach new word Declare an array to store words used and add words used in the game to this array . When the user declines to play again print the score (number of wins by user, number of wins by program) and the words usedStep 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