Answered step by step
Verified Expert Solution
Link Copied!

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 V2SSVJ I2S 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 D-1 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 2T SFJ IEHT, SFJ QSEIVJIGU SHZJL SG AZTL E TGGLVJ 2 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 of/for non-letters as well as substitution of/for 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 actionPerformed(ActionEvent e)
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

Understanding Group Roles

Answered: 1 week ago