Question: Given Backend.java, Invalid Guess Exception.java, and words.txt , please write a Jordle.java implementation: Backend.java This class represents the backend implementation of your Jordle game and

Given Backend.java, Invalid Guess Exception.java, and words.txt, please write a Jordle.java implementation:
Backend.java
This class represents the backend implementation of your Jordle game and contains the logic
used in checking the correctness of the players guesses. There are four public methods you
should know:
o Constructor
The Backend class has one no-arg constructor which initializes a random 5-letter
target word from the Jordle word bank words.txt. The target word is a
private instance field of Backend.
o reset()
This method sets a new target word in the backend of the Jordle game by
picking a random 5-letter word from words.txt. The constructor calls this
method once to set an initial target word, but you should call this method
whenever you need to set a new target word.
o check(String)
This method takes in a String, which is a word that you want to guess. If the
word is an invalid Jordle guess, this method throws an
InvalidGuessException. If the word is valid, the method checks the
correctness of the guess against the target word by returning a five-letter String
only containing the characters g,y, or i.
A g means that the correct letter is in the correct place.
A y means that this letter is in the target string, but in an incorrect
position.
A i means that this letter is not in the target string, and is an incorrect
guess.
For example, if the target word is trace, guessing adieu will return yiiyi.
Guessing brace will return igggg. Guessing trace will return ggggg.
This method is case-insensitive on its inputs. For example, if the target is
trace, then inputs trace,TRACE,TraCe, and so on, will all return
ggggg.
o getTarget()
This is a getter for the target word.
InvalidGuessException.java
This class is a checked exception which is thrown by Backends check if the input word is not
valid. An invalid guess is a String that is null, empty, blank, or has a length not equal to five
characters. For example, adieu is a valid guess, but ,
words.txt
This text file is the word bank for your Jordle game. This file contains 29 five-letter words, each
one on a new line. Feel free to add your own five-letter words to the word bank! When you are
testing your Jordle application, make sure that words.txt is in the same directory as
Backend.java.Jordle.java
Please write a JavaFX application class called Jordle. This class must meet the following minimum
requirements:
Create a window with the title Jordle. The window should be sized appropriately, such that
contents within the window are not cut off.
The application will have two screens the welcome screen and game screen.
o Welcome Screen
On this screen, there should be a non-editable display of text that says Jordle
There should be an appropriate background image that relates to Jordle. Name
this file jordleImage.jpg
Make sure to use relative paths for images in your application.
There should be a button that says Play, which when pressed, takes the user
to the game screen.
o Game Screen
This is where Jordle will be played.
You should create an instance of a Backend.
You should Include an instructions button that, when clicked, opens a new
window with a list of written instructions for how to play Jordle.
Opening the new window should not close the game screen.
Include a 6-by-5 grid where the user will have 6 opportunities to guess 5-letter
words.
The grid should read key input from the user.
o Typing keys should populate the cells in the current row of the
grid one by one, left to right (like in a regular game of Wordle).
Pressing numbers or special characters should not do anything.
Pressing backspace should remove one character at a time.
Pressing enter should evaluate the users 5-letter guess against the
actual word.
o If the correct letter is in the correct place, the cell should turn a
certain color (for example, green).
o If the letter exists in the target word, but in the incorrect place,
the cell should turn a different color (for example, yellow).
o If the letter does not exist in the word, the cell should turn a
different color from the default background (for example, grey).
Pressing enter when a 5-letter word is not supplied should alert the user
that their guess is invalid.
Include a restart button that, when clicked, resets the grid and resets the
Backend, generating a new target word.
Include a text label that lets the user know about the status of their game:
Contains a default message (for example, Try guessing a word!)
Notifies the user of the correct word if they lose after 6 guesses
- congradulate user when they win ("congrats! you guessed the word!")
- changes back to the default messaged once the user clicks restart
- use at least one anonomous inner class and one lambda expression

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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!