Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed**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 used

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Strategic Database Technology Management For The Year 2000

Authors: Alan Simon

1st Edition

155860264X, 978-1558602649

More Books

Students also viewed these Databases questions

Question

Project management skills and/or experience desirable

Answered: 1 week ago