| CS285 -- Lab 4: WordSearch |
|
|
OverviewIn this lab, you will write a program to find all the words in a dictionary that can be spelled by combining adjacent letters in a grid of letters. ProceduresYou are required to design, implement, and test a program that will will read in a file consisting of a grid of letters and write a file containing all possible combinations of adjacent letters that spell words in a dictionary. Words with fewer than three characters should not be considered. Two example files are cs285L4a.txt and cs285L4b.txt. Your program should store all of the words from the dictionary in an STL set. In addition, your program should produce an output file that contains all of the words found in grid of letters. Although it is not required, you may wish to create a graphical user interface for your program. You may even wish to create an interface to simulate a popular board game and generate your own random grids. The green text in the following grid demonstrates legal letter combinations for LOOT, APE, and ROPE, but the letters that formed ROPE may not be used to form PORE since R and E are not adjacent to one another.
Lab report (due 11:00pm, the day prior to week 8 lab)Your report should include:
As with any report you submit, correct spelling and grammar are required. In addition, your report should be submitted electronically following the Electronic submission guidelines. (You may wish to consult the sample report before submitting your report.) Be sure to keep copies of all your files, in case something gets lost. It may be wise to keep a diskette backup as well. Your grade will depend on quality of design, clarity of code and documentation, as well as whether your program produces the correct results. Note: This lab is worth double points. If you have any questions, consult your instructor. |
| © 2001 Dr. Christopher C. Taylor | Office: CC-27C | Phone: 277-7339 | Last Updated: January 3, 2001 |
| I am responsible for all content posted on these pages; MSOE is welcome to share these opinions but may not want to. | |||