Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: THEend8_
1 Word-Search Puzzle (20 points)
For this assignment, you will be using the provided WordPuzzle class. This class is almost entirely
complete. When its main() method is executed, it will open up a window, featuring a single button;
when that button is pressed a file-chooser dialogue window will open, allowing the user to select a
text-file. Once a file is chosen, the program calls the solve() method, with the file as input.
Your job is to implement a new class, called WordPuzzleSolver. This new class must implement
the provided interface, PuzzleSolver, which means:
There will be a public method, readFile(), that takes in a file as input. This method must
be called so that the implementing class knows which file it will use to read in the data about
the puzzle it needs to solve. (It will not solve the puzzle yet, that will come later). Exactly
how this method works is up to you.
There will be a public method, solvePuzzle(), that solves the puzzle contained in the file
that was sent as input to the previous method. Thus, this method will only work if the
previous method has already been called, with a proper puzzle file as input (the format of
puzzle files, and of correct output, is described below).
Back in the WordPuzzle class, you will complete the solve() method so that when called it
creates an instance of your new solver class, sends in the input file, and calls the two methods
just described to solve the puzzle and print results.