Homework 5 (Evil Hangman) FAQ

Q: Where do I start?
A: Create a simple test client to test behavior as you add it. Start with isolated tasks such as printing a Hangman-style hint or reducing the dictionary to words of a relevant length. Consider writing a stub record method that counts everything as a wrong guess.
Q: How do I make a pattern?
A: Review the cumulative sum pattern on Strings. Try this Practice-It problem.
Q: What is a map? How do I use a map? Why is a map useful here?
A: Look at the WordCount and Friends programs from lecture. Remember that a map stores a relationship between a pair (known as a key to value relationship). Look at the example from the writeup that shows an initial dictionary of 9 words being split into different word families.

Java has a more detailed definition of a Map on the Java API.
Q: How do I store a complex structure as the values of a Map?
A: Review the Friends example from lecture.
Q: How do I call methods on the Sets that are in my Map?
A: Call get on the Map first. Then call methods on that. Review the Friends example from lecture.
Q: What is SortedSet<E>?
A: SortedSet is a variation of the Set interface that requires that the values in the set are to appear in increasing order.