Outcomes Addressed
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. ProcedureYou 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 cs2851L4a.txt and cs2851L4b.txt. Your program should store all of the words from the dictionary in a JFC container that implements the Set interface. 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.
Interim Deliverables (due 11:00pm, Friday of week 6)Given the following grid of letters: cel khp cow Use your recursive algorithm to produce a list of all the legal combinations of letters beginning with the center (h). For example, your list should include the following (not necessarily in this order): hce hcel hcelp hcelpw hcelpwo hcelpwoc hcelpwock help Create a .zip file containing all of your source code files required to produce the results described above and a file called words.txt containing the complete list of words generated by your recursive algorithm, as described above. Submit the words.txt as the report and the .zip file as the support file. Note: This submission will be worth 30% of your grade for this assignment. I do not plan to grade the source code unless I have questions about how the list was generated. Your grade will be based on generating the correct list of words. In addition, you should indicate how much time you spend on this assignment in the FAST system. You are encouraged to log your activity as you work on the project. At a minimum, you should log all of the time spent during the first week (logged for week 6) before the due date given above. Lab report (due 11:00pm, Friday of week 7)Here is a template file to use as a starting point for this report. 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. If you have any questions, consult your instructor. AcknowledgmentThis assignment was originally developed by Dr. Chris Taylor. |