Implement the ‘Guess the Word' game in an object-oriented manner. This program would add some basic manipulation of strings - reading, comparing, writing, finding the length, etc.
Instructions
Prepare a program that implements the ‘Guess the Word' game. The game could have five levels. Each level would need the player to guess four words correctly before moving to the next level. The game could become more challenging with each passing level. The data in input file comes in 3 parts delimited by the ‘#' character. The first set are the hardest words, the second medium complexity and third the ‘easy' ones. So one possibility is for the first two levels you would use the ‘easy' words, for the next two levels selects the word to be guessed from the second category and for the last level choose from the ‘hardest' words. To distinguish between the two levels using words from same category, one would show three characters and leave the rest to be guessed while the other displays only two characters; or, the easier level could show the first char as one of the characters shown (it is easier to guess the word when you know the first character). The rules you choose are up to you but you need to distinguish between the five levels. Each level should be scored separately and the scored added to the cumulative score when the level ends or the game ends. The game starts with asking the player for his/her name and ends with displaying the final information.
To summarize the steps:
1. Load the dictionaries of words from a user specified file.
2. The word to be guessed should be chosen randomly from the appropriate category.
3. Display the partial word with appropriate number of dashes.
4. Read user input and display corresponding result.
5. Get user choice to continue/ stop playing.
6. Output should go both to the screen and an output file
Programming concepts that are expected in the solution:
1. Object oriented modular solution
2. File input and output
3. Use of selection and repetition constructs
4. Use of random function
5. The class used should have constructors and overloaded input and output operators.