The WordCoach Project is a Java-based educational tool designed to improve vocabulary through interactive word-image pairing exercises. The program allows users to guess words based on displayed images, tracks their progress, and saves their session for later continuation.
- Interactive GUI with JFrame for user interaction.
- Tracks statistics such as total attempts and correct guesses.
- Saves and loads session data using JSON serialization via the Jackson library.
- Randomized word selection to keep the game engaging.
- Customizable list of word-image pairs.
- Error handling for invalid inputs and URLs.
The project is structured as follows:
src/
├── main/
│ ├── java/
│ │ ├── main/
│ │ │ └── Main.java
│ │ ├── model/
│ │ │ ├── WordCoach.java
│ │ │ └── WordPair.java
│ │ ├── persistenz/
│ │ │ ├── SessionSaver.java
│ │ │ └── SessionSaverJson.java
│ │ └── view/
│ │ └── View.java
│ └── resources/
│ └── wordcoach.json
- Java 17 or later
- Jackson Library
- An IDE or build tool supporting Gradle or Maven
- Clone the repository to your local machine:
git clone https://github.com/your-repository/wordcoach.git
- Open the project in your IDE (e.g., IntelliJ IDEA, Eclipse).
- Add the Jackson library to your project:
- Gradle:
implementation 'com.fasterxml.jackson.core:jackson-databind:2.15.2'
- Maven:
<dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-databind</artifactId> <version>2.15.2</version> </dependency>
- Gradle:
- Run the
Main
class to start the application.
- Launch the application by running
Main.java
. - Follow the on-screen instructions:
- Enter your guess for the displayed word.
- The app will notify you if your guess was correct or not.
- View statistics (total attempts and correct guesses) at any time.
- Stop the program to save your progress automatically.
- Relaunch the app to resume from your last session.
- Entry point of the application. Handles initial setup and session management.
- Core logic for managing word pairs, tracking statistics, and random word selection.
- Represents a single word-image pair with validation for proper URLs.
- Interface for session saving and loading functionality.
- Implementation of
SessionSaver
using JSON for persistence.
- Swing-based GUI for user interaction and displaying game data.
The application includes the following preloaded word-image pairs:
Word | Image URL |
---|---|
Dog | |
Cat | |
Rat | |
Mouse | |
Tiger | |
Hamster |
Contributions are welcome! Feel free to fork the project, make improvements, and submit a pull request.
This project is licensed under the MIT License. See the LICENSE
file for details.
- Jackson Library Documentation
- Java Swing Tutorials for GUI components.