Answered step by step
Verified Expert Solution
Question
1 Approved Answer
This project is loosely based on a word puzzle called the Spelling Beehive found in the Sunday New York Times magazine. In it , a
This project is loosely based on a word puzzle called the Spelling Beehive found in the Sunday New
York Times magazine. In it a player is given a set of seven letters and has to find as many words as
possible using some portion, but at least five, of those seven letters. Letters may be used more than
once. Each correct word earns one point.
The input file
To make a simple example, lets suppose the player is given just four letters instead of the seven we
will use for this project and has to make words of at least three letters. The first line of the input file will
be the letters to use, and the rest of the input file will contain solutions that would be hidden from the
user. Here is an example:
PRTA
PART
TARP
ART
RAT
APART
TRAP
Etc.
You program should read the first line into a String variable for the letters, and the rest of the file into an
array of Strings against which the users guesses can be matched.
Create a GUI for the puzzle with a grid layout of one row and two columns. In the left column put the
puzzle letters, and in the right column display the words that the user has found so far words the user
has guessed and your program has found on the solutions list. and the users score. Accept words
from the user via a JOptionPane.
MessageDialogs should be shown to the user in the following cases: The user has used a letter that
is not one of the seven letters given. The users guess is less than letters long. The users guess
is not in the solutions list. You should have two files to submit for this project:
Projectjava
PuzzleGUI.java
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