Question: Specific classes for this: Much like StringHelper in the previous lab, there are a few helper classes in the Autograder. class HangmanDictionary : Constructor: HangmanDictionary

Specific classes for this:
Much like StringHelper in the previous lab, there are a few helper classes in the Autograder.
class HangmanDictionary :
Constructor: HangmanDictionary()
Methods:
public int getNumberOfAvailableWords()- this returns the number of words in this dictionary
public String getWord(int wordIndex)- this returns a particular word in the dictionary; valid indexes start at 0(inclusive) and go up to the number of available
words (exclusive)
class HangmanDisplay :
Constructor: HangmanDisplay()
Methods:
public void displayHangman(int numGuessesLeft)- this draws an ascii art representation of the hangman game when there are numGuessesLeft guesses
remaining (the game ends when this value is 0)
public void displayWordToGuess(String wordToDisplay, String previouslyGuessedCharacters)- this displays the words involved in an in-progress
hangman game; wordToDisplay is the current (partially guessed) word the player is guessing, and previouslyGuessedCharacters are all the letters that the player has
tried so far
public char getLetter()- this prompts the user for a single character and returns it. Error handling for multiple, missing, or non-letter characters is handled
internally and will not throw an exception, although the result may be upper or lower case depending on what the user entered.
public void showEndGameMessage(String resultMessage)- displays a win/loss message to the player
Specific classes for this: Much like StringHelper

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!