Program 6: Word Find

Purpose
The purpose of this assignment is to give you experience with many of the course concepts including 2D arrays, exceptions, file input and recursion.
Preliminaries
  • Create a BlueJ project named Program6.
  • Create a class named Driver and copy this code into that class. Do not modify this class at all.
  • Create a class named WordFind and copy this code into that class. You may make changes to this class, but do not add any additional instance variables (5 points will be deducted for each additional instance variable) and do not import any additional classes (5 points will be deducted for each additional imported class).
  • Add the file named puzzle.txt to the Program6 directory. Restart BlueJ once you add the file so that BlueJ becomes aware of it.
Sample TranscriptTo help you better understand how the program should work when it is run, please refer to this transcript. User input appears to the right of the prompt.AssignmentBy looking at the above transcript, determine the missing functionality in the WordFind class and supply it.Assumptions
  • When a file such as puzzle.txt exists, the first line contains two numbers. The first is the number of rows in the WordFind puzzle and the second is the number of columns. The file then consists of the appropriate number of rows, where each row contains the appropriate number of single characters, each separated by a single space.
  • This particular WordFind game is case sensitive. In other words, capital letters (such as 'A') are different from lowercase letters (such as 'a').
Grading - 100 points
  • 10 points - The buildGrid() method (and any private helper methods it employs) is correct.
  • 20 points - The toString() method (and any private helper methods it employs) is correct. You will receive 10 of these points if the letters in the grid are printed in any readable format. You will receive the other 10 points if the format that appears in the transcript is matched exactly.
  • 50 points - the find() method (and any private helper methods it employs) is correct. It is worth 5 points each to correctly find words that run north, south, east, west, northeast, northwest, southeast, and southwest. It is worth 5 points to correctly count single character words. It is worth 5 points to correctly find words that are on the boundaries of the grid.
  • 10 points - at least one method in your solution uses recursion appropriately.
  • 10 points - Catch-all category. Is the code concise and non-redundant? Are object-oriented principles used properly? Are meaningful variable names used? Is Javadoc used properly?

Powered by