Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Programming and Problem Solving with C++ Chapter 14 programming problem 1 Imagine you have been asked by a first grade teacher to create a hangman

Programming and Problem Solving with C++ Chapter 14 programming problem 1

Imagine you have been asked by a first grade teacher to create a hangman game for her students to help them spelling and word recognition. In this game of hangman you are first presented with a list of blanks representing unknown letters of a hidden word. you must then guess a letter to see if that letter exists in the word. if it does, the blank that corresponds to the guessed letter is then displayed along with blanks for the letters that have not been guessed yet. If you guess a previously guessed letter you get to try again. If you guess wrong you incrementally move toward being hung. You have eight bad guesses until you lose the game. To represent the different states of "being hang" we will use the values PLATFORM, HEAD, BODY, LEFT_ARM, RIGHT_ARIM,, LEFT_LEG, RIGHT_LEG and HUNG. To implement the game, you should use the Linked List ADT to represent the word being guessed. Each element in the list should be an object of type Slot that scores the letter of the word and a boolean that indicates if the letter is to be displayed or if a blank should be displayed. The Slot class should provide the appropriate observer and mutator methods for accessing and manipulating a slot. You should use a second linked list to represent the letters that have already been guessed and an enumeration to represent the states of the game. Your program should keep asking the user for another guess until either the entire word has been guessed or the state of game is HUNG. After each guess, the program should display the current state of the word to be guessed, the list of characters already guessed, and the state of the game.

The code should not be one file but many like client.cpp and List.cpp, and have no virtual or template. Also uses pointers.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

Question Can plan participants borrow from a VEBA?

Answered: 1 week ago