CSCI 121 Programming Assignment 3
CryptoQuip!
Create a GUI application that implements the popular Cryptoquip program that appears on the comic page of newspapers. Here is a possible layout (feel free to develop a better one):

Figure 1: The initial
puzzle
The text areas labeled “Puzzle” and “Solution” initially contain the same text—the encoded quip. As the user makes substitutions for letters in the encoded puzzle, the text area labeled “Solution” will change to reflect the substitutions.
In this screen shot you will notice 2 rows of letters. Using the mouse, the user can select a letter from the upper row and a letter from the lower row. The selected letters are highlighted. When the user presses the “Substitute” button, each of occurrence of the upper letter in the puzzle will be replaced by the lower letter. The following shots illustrate this feature:

Figure 2: The user
wants to replace T’s with Y’s

Figure 3: After the
user presses the “Substitute” key
You may optionally supply a “Hint” feature that allows the user to request a hint when he gets stuck. You may use a JOptionPane dialog for this if you wish:

Figure 4: User
requested a hint
The puzzle solver continues to make letter substitutions until she reaches the solution. In the following figure, the user is getting ready to make the final substitution (G = C) that solves the puzzle:

Figure 5: Solution is
near!
When the puzzle is solved, the program should display a congratulatory message:

Figure 6: Success!
You may also optionally allow the user to load a new puzzle from a text file on disk. Use a JFileChooser to show an Open dialog and encode the text file as you did the opening puzzle.

Figure 7: User
chooses text file crypto1 for new puzzle.
The following figure shows the newly-encoded puzzle. Note that the encoding is not the same as that in the previous puzzle:
Figure 8: The new puzzle
after loading from the disk file.
Call your application CryptoQuip.java.
Suggestions