NOTE:
This is similar to Assignment 06. Again you need to implement the game Hangman with two improvements: (i) the dictionary is not fixed, it is a separate object that is created from a given text file; (ii) the Hangman game first deals with the two possible exceptions thrown when trying to open the dictionary (dictionary not found, or dictionary has no words).
The files GameInterface.java and GameDriver.java are given to you.
Your classes should allow one to play the game Hangman as in GameDriver.java. In this game,
the game picks a secret word from a dictionary, and the player guesses letters until: all letters
of the secret word are guessed, OR the max number of guesses is reached, OR the max number
of wrong guesses is reached. The player wins if they guess all letters of the secret word.
The class DictFileE2 should contain the private final array "String[] word", the private variable
size, for the number of words stored in the array, and the
Get Free Quote!
307 Experts Online