Question: In this Java project, the user will be trying to make the longest possible word ladder. A word ladder is a sequence of distinct words

In this Java project, the user will be trying to make the longest possible word ladder. A word ladder is a
sequence of distinct words having the same number of letters in which each word has exactly one index
in which the letter is different from the letter in that index in the previous word.
To begin the program, read in the words from the file words.txt. For full credit, read the entire file at the
beginning of the program and do not read it again.
Following that, choose a random 5-letter word and display it as the start word. Then begin prompting
the user for a subsequent word. Continue prompting the user until one of the following three conditions
occurs:
The user enters something that is not a word (not in the words.txt file).
The user enters a word that has already been used.
The user enters a word that does not follow from the previous word.
Once the user makes one of those three errors, print which one occurred. You only need to print one
reason for ending even if there are multiple reasons. Then print a list of all possible words the user could
have entered (or a message that there are no such words, if appropriate). Finally, print the users score,
which is the number of correct words entered by the user.
You may assume that the user will always input their word as a string of capital letters.
When you are finished, submit your .java file on Blackboard. Late submissions will not be accepted.Start word: SUETS
Enter Word: SUITS
Enter Word: SUITE
Enter Word: GUITE
GUITE is not a word!
You could have entered any of the following words:
[QUITE, SHITE, SKITE, SMITE, SPITE, SUETE]
Your final score is 2.
Start word: PERKY
Enter Word: JERKY
Enter Word: PERKY
You already used PERKY!
You could have entered any of the following words:
[JERKS, JERRY, KERKY]
Your final score is 1.
Start word: CAINS
Enter Word: PAINS
Enter Word: PAWNS
Enter Word: LAWNS
Enter Word: FLOWN
FLOWN doesn't follow from LAWNS!
You could have entered any of the following words:
[BAWNS, DAWNS, FAWNS, LARNS, LAWKS, LAWNY, LOWNS,
MAWNS, RAWNS, YAWNS]
Your final score is 3

Step by Step Solution

3.37 Rating (156 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

It seems like youre describing the requirements for a Java program that implements a word ladder gam... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!