Hang
man was chosen because it was a simple game that could incorporate all of the
requirements. There are two GUI windows
(one to choose the word and one to actually play) and a dialog box to add words
to the list. I decided to add an option
to import and export lists of words so that a long list would not have to be
created each time and it would allow a person to play single player if they had
a long enough list of word from which they could start the game with a random
word. I have a class called WordModel
which works with the JList in the word selection GUI to keep track of all the
words in the list. I had to create
another class called Word that just stores and returns a word and it is used to
make the dialog box part easier. I was
planning on having a 2D graphic on the game GUI that would update each time when
an incorrect guess was made but then decided that it was too much work and I
didn’t need the points.

(Click on the UML Use Case Model above to enlarge in a new window.)
(Click here to download the program. See notes on Final
Project page.)

(RT needed)
-OR-
(Download the Installation Package in EXE form)

18.4 Mb
|