Homework 5 (Hangman) FAQ
Where do I start????
How do I get a String from a Scanner object?
How do I use the drawGame method?
-
Q: Where do I start????
-
A: Read the write-up in its entirety. Try to develop the program in stages. Two sample stages are shown on the second page of the
write-up. You do not have to do it exactly this way. If you have a development strategy that work for you, that's fine.
-
Q: How do I get a String from a Scanner object?
-
A: Scanners have a method called next() that returns whatever the user typed as a String. It is similar to nextInt(), which you are
familiar with, except that it returns a String and not an int.
-
Q: How do I use the drawGame method?
-
A:
HangmanUtils.drawGame(wordToGuess, missedLetters);
where wordToGuess
is the word the user sees (underscores and all) and missedLetters
are the
letters (and only the letters) the user wrongly guessed. Remember, we will be only grading the text output,
so do not use drawGame until your text output is working perfectly.