Question: JAVA 1. write a hangman game using 3 classes and objects shown on the UML Class Diagram 2. The Application class needs to instantiate hangman
JAVA
1. write a hangman game using 3 classes and objects shown on the UML Class Diagram
2. The Application class needs to instantiate hangman object for the game
3. The Hangman class needs to use all of the methods/responbilities: constructor (instantiates dictionary that will be used for game), loadwl, writewl, and playgame
4. ensure you use a dictionary from a site that produces random words and generates a word list.
5. last but not least, readfile and chooseword where readfile goes through the wordlist and fills array with wordlist, and chooseword needs to randomly pick a word from given array and return it.
game must - ask player if they wanna play, and if they say yes, it must pick a word and ask the gamer for guesses. each time an answer is incorrect, the game needs to decrease the total number of guesses. only 4 incorrect guesses are allowed and on the 5th incorrect guess, hangman game ends with a loss. it doesnt matter if the gamer/player won or lost, the game needs to ask if they wanna play again 
Application Hangman +main(String[] args): void -wins: int -losses: int -currentWord: String -dictionary: Dictionary +Hangman() -loadWL(): void -writeWL(): void +playGame(): void Dictionary -wordList: String -currentCard: int -randomNumbers: Secure Random +Dictionary(String fileName) -readFile(String fileName): void +chooseWord():String
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
