In this assignment, you will be re-creating a Wordle game, similar to the activity done in the classroom. You are given two classes: WordleGame.java
and Main.java
. You will be modifying these two classes, and creating a third one. You are also given a text file database.txt
, which is a list of 5-letter words (all 5-letter words from the first Harry Potter book!). The objective of your program is to create a Wordle game with a random word from the text file.
Here's a breakdown of the requirements:
- Modify the
Main.java
to read a word from thedatabase.txt
file - Create a custom exception named
InvalidInputException
that will be used when the user inputs an invalid guess (invalid doesn't mean wrong, means it's not 5-letter long, etc.) - Throw the exception from the
WordleGame
class when appropriate - Use
try/catch
in theMain
when appropriate
This assignment will not be *completely autograded like the previous ones. It will be manually graded by the instructor. Making the game work is more important than having the tests pass. Submission is still done via GitHub.
- Accept the assignment when posted on Moodle
- Clone the assignment repository
- Solve the assignment
- Submit (
commit
andpush
) the assignment- Resubmit if necessary or contact the instructor for questions.