Question
Follow the instructions for starting your C++ development tool. Depending on the development tool you are using, you may need to create a new project;
Follow the instructions for starting your C++ development tool. Depending on the development tool you are using, you may need to create a new project; if so, name the project Lab13-2 Project and save it in the Cpp8\Chap13 folder. Enter the instructions shown in Figure 13-30 in a source file named Lab13-2.cpp. (Do not enter the line numbers.) Save the file in either the project folder or the Cpp8\Chap13 folder. Now follow the appropriate instructions for running the Lab13-2.cpp file. Test the program using an original word that does not contain exactly five characters. Also test the program using the words and letters shown in Figures 13-31 and 13-32. If necessary, correct any bugs (errors) in the program
LAB 13-2 Plan and Create In this lab, you will plan and create an algorithm for Mr. Coleman. The problem specification, IPO chart information, and C++ instructions are shown in Figure 13-29. Problem specification Mr. Coleman teaches second grade at Hinsbrook School. On days when the weather is bad and the students cannot go outside to play, he spends recess time playing the Guess the Word game with his class. The game requires two people to play. Currently, Mr. Coleman thinks of a word that has five letters. He then draws five dashes on the chalkboardone for each letter in the word. One student then is chosen to guess the word, letter by letter. When the student guesses a correct letter, Mr. Coleman replaces the appropriate dashles) with the letter. For example, if the original word is moose and the student guesses the letter o, Mr. Coleman changes the five dashes on the chalkboard to 00-. The game is over when the student either guesses all of the letters in the word or makes 10 incorrect guesses, whichever occurs first. Mr. Coleman wants a program that allows two students to play the game on the computer Figure 13-29 Problem specification, IPO chart information, and C++ instructions for Lab 13-2 (continues) (continued C++ instructions IPO chart Information Ingut viginal word (frow.player) Letter from player 2) string origWord - ""; string letter - ""; Processing Variable that loops track of whether a dash was replaced 'N' char dashReplaced - 'N': Vorod that letadle of whether the cat is over 'N' char gameOver-'N'; www.ber of incorrect guesses int numincorrect - 0: Output) display word (5 dashes who the program begins) string displayWord - ". .." Algorithm 1. pat will the vigin word does wot cont a ctly five characters) gotovigival word Write while (origWord, length - 5) cout >letter: for (int x - 0; x onStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started