Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a Java application that will help the user solve a puzzle that is found in many newspapers The user interface intially looks like this:
Write a Java application that will help the user solve a puzzle that is found in many newspapers The user interface intially looks like this:
Enter encrypted quote
Y
After the the user types the encrypted quote into the upper TextArea and enters the hint, the interface looks like this:
EASJH FJ LHGKKJL E VSSVJ IS GA RGGCJL KEQSE ZT SFJ IEHT, SPJ QSEIVJIGU SHZJL SG AZTL E TOGLVJ ZT E FEUQSERC.
Letter frequencies are shown above the alphabet and the substitutions are shown below. In this example, L equals was given as a hint to begin solving the puzzle.
When a substitution is entered, the program will apply that and show the result in the lower TextAres. The complete solution for this puzzle is:
le e
EASJH FJ LHGKRJL E VZSSVJ IZS GA RGGCJL KEQSE T SFJ IEHT, SFJ QSEIVJIGU SHZJL SG AZTL E TGGLVJ T E FEUQSERC.
AFTER HE DROPPED A LITTLE BIT OF COOKED PASTA IN THE BARN, THE STABLEBOY TRIED TO FIND A NOODLE IN A HAYSTACK.
The Update button merely reapplies all substitutions to the encrypted text and displays the result in the lower TextArea. This allows the user to correct mistakes in the upper TextArea.
The Undo button removes the most recent substitution that has not been undone. The button should be gray inactive when there are no substitutions to undo. Notice the declaration of the variable "undoStack" following the GUI components. This is a hint to implementing the Undo button.
The Reset Subs button removes all substitutions.
Substitution offor nonletters as well as substitution offor multiple letters should be ignored. Lower case letters should be converted to upper case will be given Java code for the GUI.
Do not change anything above the line of asterisks.
You may add other variables and methods below the line of asterisks.
Again, do not change anything above the line
I have application launched and created, contents of frame initialized. Just need public void actionPerformedActionEvent e
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started