CSCI 475
Workshop 3 on Preliminary Design
November 19, 1997
Problem - Design a program to play the game hangman.
We need to define the scope of the problem. Do we have a graphical interface or a simple command line interface? What are the players' characteristics? Can they read English?
Redefined Problem:- Design a command line driven game of hangman for English speaking college students.
Requirements:
1. Resource Requirements - The program will be programmed in C++ and used in the Unix operating system environment. We will assume a GNU C++ compiler is available. No special libraries will be needed.
2. Performance Requirements - The game should not have long annoying delays.
3. Functional Requirements -
a). The word pool should contain 100 common English words. Each word should have 3 to 8 characters.
b). The secret word is selected randomly from the word pool.
c). The program displays a '_' for each letter in the secret word which has not been guessed.
d). The player guesses a letter one at a time. If a letter is in the secret word, then the program displays the secret word with all occurrences of the letter and '_' for all letters unguessed so far.
e). The program displays the letters guesses so far in alphabetical order.
f). For each incorrect guess, the program should redisplay a picture of a hangman with another part of the body shown.
g). The program should terminate when either all leters have been guessed correctly (player wins) or seven incorrect guesses have been made (computer wins and man is hanged).
1. Your team is to do an Object-orientted design of the game hangman using the above ultra simple requirements document.
2. Your team will write a document to be handed in before you leave today. Please write neatly.
I will bleed all over them and return in a day or two.