Assignment 5
The following classes have been partially completed, you are to use them in completing a program for playing hangman as described below.
In addition, the program hang.cpp shows how the classes can be used. It's not a complete version of a game, but it's something to use to get started.
Your program should take words from the file mywords.txt. In reading words from that file, the class WordSource should return any word in the file with equal probability. You can do this using either a Dice object or a RandGen object. The files that you need to create objects of these types were provided in assignment 3. You can read the words directly from a file or read the words into a StringSet object, either approach is acceptable. If you chose to use a StringSet object, you will have to add a StringSet variable to the private section of the class definition. The files needed to create StringSet objects were provided in assignment 4.
+-----+ | 0 0 | | - | | --- | +-----+ | | +-----|-----+ | | / \ / \ / \ --/ \--If you do this, you should use a class Gallows to create the picture.
The programs written for this assignment must be turned in by transferring the C++ source code files to your ftp directory for this class. In this assignment, you will need to submit all code that you have written, this should include: letters.h, letters.cpp, wordsource.h, wordsource.cpp, hang.cpp and the .h and .cpp files for any other classes that you write for this assignment. All of these files should be transfered to your class ftp directory.