Overview
This is a simple hangman program written in java. During my second year of school one of my courses introduced some applet concepts during the last few lectures. I tried to make a hangman program as an example applet but it only worked in the IDE and not on the web so I ended up scraping the idea. Sometime later I was trying to think of a java program to write. I wanted to do something not related to school and while trying to think up what to make I remembered my old java applet. I didn’t have the code anymore but I remembered the framework I was going for so I remade the program from scratch but using the console for output instead of an applet frame.
Interface
Code
hangman.java
man.java
letter.java
word.java
wordList.java
This class defines the list of possible words for the game. It has one constructor that populates the list and has one program that randomly picks a word from the list. The actual list was created by a C program parsing a file. I went online and got a bunch of words in a variety of categories and put them together in a file with category headers to separate the lists. The C program then reads this file and builds the word constructor and vector add statement to be copied into the java code.