Word Search A word search is often a rectangular puzzle containing a bunch of characters, when these characters are combined across rows, columns, or diagonals then hidden words can be discoered. Assignment Specifications You will implement a console version of a word search puzzle solver. For this assignment, we are providing an initial source code file which contains skeleton code that you must complete. You are not allowed to change the provided code. You must use a two-dimensional array to store the puzzle. Grab the initial C++ file and example input file, then upload all the files to your workspace or place all of the files in the same folder on your computer if developing locally. For the functions you must implement, we have provided only a stub. A stub is a function definition that compiles, but does not yet implement the complete specifications for that function. As you develop the program, you should implement each function one at a time and test each as you go. Additionally, we encourage the development of several helper functions. These helper functions will benefit your code organization and will more than likely help reduce the debugging time spent fixing errors in your code. Helpful Hints • Solve on paper first! o record the actual steps you take to find a word Go through the given code first and note all the TODO comments Don't bite off too much, do one TODO at a time, or even break down a TODO into many steps! • Don't implement everything at once. A search in all 8 potential directions can be confusing, try implementing search in one direction then move on to another direction. o If you solved on paper first, then you should know all the words and the direction for each of the discovered words. • Print the puzzle and other arrays out to make sure you read it in correctly. • You should be adding the words to the discovery vector as you find them. • You only need to find a word once, so it should only exist in the discovery vector a single time. Use input redirection to test: /a.out < mylnputFile.txt • You do not want to type those entire puzzles in! • The input file and executable must be in the same directory to use the above input redirection. • Don't wait until the last minute, zyBooks will provide a grade and limited feedback so that you can fix your problems and resubmit prior to the deadline to earn a better grade! Example Execution $ ./a.out < exampleInput.txt HELLO Example Input File P ZIMKOP HELL OJKI W RLDQ JKLIY QSR P ZIM KO P BYZA NTINE Q WERTYUIOP z HELLO WORLD

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter12: Points, Classes, Virtual Functions And Abstract Classes
Section: Chapter Questions
Problem 29SA
icon
Related questions
Question

C++ 

Can you build on the Given code with comments so its easy to understand.

Word Search
A word search is often a rectangular puzzle containing a bunch of characters, when these characters are combined across rows, columns,
or diagonals then hidden words can be discovered.
Assignment Specifications
You will implement a console version of a word search puzzle solver. For this assignment, we are providing an initial source code file which
contains skeleton code that you must complete. You are not allowed to change the provided code. You must use a two-dimensional array
to store the puzzle. Grab the initial C++ file and example input file, then upload all the files to your workspace or place all of the files in the
same folder on your computer if developing locally.
For the functions you must implement, we have provided only a stub. A stub is a function definition that compiles, but does not yet
implement the complete specifications for that function. As you develop the program, you should implement each function one at a time
and test each as you go. Additionally, we encourage the development of several helper functions. These helper functions will benefit your
code organization and will more than likely help reduce the debugging time spent fixing errors in your code.
Helpful Hints
• Solve on paper first!
o record the actual steps you take to find a word
• Go through the given code first and note all the TODO comments
• Don't bite off too much, do one TODO at a time, or even break down a TODO into many steps!
• Don't implement everything at once. A search in all 8 potential directions can be confusing, try implementing search in one direction
then move on to another direction.
o If you solved on paper first, then you should know all the words and the direction for each of the discovered words.
• Print the puzzle and other arrays out to make sure you read it in correctly.
• You should be adding the words to the discovery vector as you find them.
• You only need to find a word once, so it should only exist in the discovery vector a single time.
• Use input redirection to test: /a.out < mylnputFile.txt
o You do not want to type those entire puzzles in!
• The input file and executable must be in the same directory to use the above input redirection.
• Don't wait until the last minute, zyBooks will provide a grade and limited feedback so that you can fix your problems and resubmit
prior to the deadline to earn a better grade!
Example Execution
$ ./a.out < exampleInput.txt
HELLO
Example Input File
3
2
HELLOJKLI Y Q S R P Z IM KOE
W RL DQ JKL IY QS R P Z I M KOF
BY Z ANTINE Q WERTY U IOP z
HELLO
WORLD
Transcribed Image Text:Word Search A word search is often a rectangular puzzle containing a bunch of characters, when these characters are combined across rows, columns, or diagonals then hidden words can be discovered. Assignment Specifications You will implement a console version of a word search puzzle solver. For this assignment, we are providing an initial source code file which contains skeleton code that you must complete. You are not allowed to change the provided code. You must use a two-dimensional array to store the puzzle. Grab the initial C++ file and example input file, then upload all the files to your workspace or place all of the files in the same folder on your computer if developing locally. For the functions you must implement, we have provided only a stub. A stub is a function definition that compiles, but does not yet implement the complete specifications for that function. As you develop the program, you should implement each function one at a time and test each as you go. Additionally, we encourage the development of several helper functions. These helper functions will benefit your code organization and will more than likely help reduce the debugging time spent fixing errors in your code. Helpful Hints • Solve on paper first! o record the actual steps you take to find a word • Go through the given code first and note all the TODO comments • Don't bite off too much, do one TODO at a time, or even break down a TODO into many steps! • Don't implement everything at once. A search in all 8 potential directions can be confusing, try implementing search in one direction then move on to another direction. o If you solved on paper first, then you should know all the words and the direction for each of the discovered words. • Print the puzzle and other arrays out to make sure you read it in correctly. • You should be adding the words to the discovery vector as you find them. • You only need to find a word once, so it should only exist in the discovery vector a single time. • Use input redirection to test: /a.out < mylnputFile.txt o You do not want to type those entire puzzles in! • The input file and executable must be in the same directory to use the above input redirection. • Don't wait until the last minute, zyBooks will provide a grade and limited feedback so that you can fix your problems and resubmit prior to the deadline to earn a better grade! Example Execution $ ./a.out < exampleInput.txt HELLO Example Input File 3 2 HELLOJKLI Y Q S R P Z IM KOE W RL DQ JKL IY QS R P Z I M KOF BY Z ANTINE Q WERTY U IOP z HELLO WORLD
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
ADT and Class
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning