hangwomen2

hangwomen2 - / HANG WOMEN: LaTasha Shelton, Renita...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
// HANG WOMEN: LaTasha Shelton, Renita McKnight, Tashawna Harrell // Final Project #include <iostream> #include <string> #include <srand> #include <ctime> #include <cstdlib> #include <fstream> using namespace std; char g, gender, word[20]; int size, s, wrong_guesses; class Hangman { private: int size; char gender; public: void SetGender(char); void SetSize(int); void GuessWord(char); void DrawGallow(int); void DrawHead(char, int); void DrawBody(char, int); void DrawLegs(char, int); }; //********************************************** // SetGender assigns a value to the width member.* //********************************************** void SetGender(char gender) { g = gender; } //********************************************** // SetSize assigns a value to the width member.* //********************************************** void SetSize (int size) { s = size; } //********************************************** // DrawGallow provides the design of the gallow* //********************************************** void Hangman::DrawGallow(int size) { int row, col, n; for (row = 0; row < n; row++) { for (col = 0; col < n; col++) { if (row == 0) { cout <<"-"; } else cout <<" ";
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
} cout <<endl; } } void Hangman::DrawHead(char gender, int size) { int row, col, n; // 'm' represents male if (gender == 'm') { for (row = 0; row < n; row++) {
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 5

hangwomen2 - / HANG WOMEN: LaTasha Shelton, Renita...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online