Skip to content

A fun and interactive Java application that brings the excitement of horse racing to life! πŸŽ‰ Users can register horses, simulate races, and watch as horses race to the top, all displayed through a sleek JavaFX GUI.

Notifications You must be signed in to change notification settings

amnashouqi/HorseRaceAdvanced

Repository files navigation

πŸ‡ Horse Race Program

Welcome to the Horse Race Program β€” a Java application built for Semester 2 coursework! This project showcases the power of Object-Oriented Programming (OOP) and JavaFX in creating a feature-rich and visually appealing application for managing and simulating horse races.


πŸ“‹ Overview

The Horse Race Program allows users to:

  • Register Horses: Add, update, and view horse details effortlessly.
  • Simulate Races: Automatically rank horses and display race results visually.
  • Data Persistence: Save user inputs to a text file and retrieve them when needed.

Built with maintainability and scalability in mind, this project uses industry best practices, such as error handling, unit testing, and modular design.


🎨 Features

  • JavaFX GUI: A sleek and intuitive interface designed for an engaging user experience, enhanced with CSS styling.
  • OOP Concepts: Full utilization of Encapsulation, Inheritance, Abstraction, and Polymorphism for robust and maintainable code.
  • Sorting Algorithm: Bubble sort implementation to arrange horse IDs in ascending order.
  • Error Handling: User input validation with comprehensive error handling using try-catch blocks.
  • Unit Testing: Rigorous testing of classes and methods to ensure expected functionality.

πŸ› οΈ Key Functionalities

  1. Horse Registration:

    • Add new horses with unique IDs.
    • Update or delete existing horse details.
  2. Race Simulation:

    • Select top horses based on category.
    • Automatically rank and position horses based on race results.
    • Display results visually using JavaFX.
  3. Data Persistence:

    • Save horse details and race data in a text file.
    • Retrieve saved data as needed.

πŸš€ How It Works

  1. Start the Program: Launch the GUI via the JavaFX interface.
  2. Manage Horses: Use intuitive forms to register, update, or view horse details.
  3. Simulate Races: Select horses and see their rankings based on race outcomes.
  4. Visual Display: Enjoy a clean and interactive visualization of race results.

πŸ§ͺ Testing

  • Unit Tests: Each class and method is rigorously tested to ensure accurate functionality.
  • Error Handling: Comprehensive validation and exception handling for user inputs.
  • Expected vs. Actual Outputs: Verifications ensure alignment between desired and actual outcomes.

πŸ” Assumptions

  • All horse IDs are unique.
  • Bubble sorting is sufficient for sorting horse IDs due to limited data size.

🌟 Future Improvements

  • Implement advanced race algorithms for realistic simulations.
  • Integrate a database for better scalability and data management.
  • Enhance GUI design with richer animations and themes.
  • Introduce multiplayer functionality for a competitive experience.

πŸ“‚ Technologies Used

  • Programming Language: Java
  • GUI Framework: JavaFX
  • Styling: CSS
  • Data Storage: Text Files

πŸ“ˆ Why You'll Love It

  • Clean, modular code with detailed comments for easy understanding.
  • Fully functional GUI with smooth performance.
  • Designed with extensibility in mind, making future updates seamless.

πŸ† Acknowledgements

This project demonstrates the culmination of advanced Java concepts and practical implementation skills gained during Semester 2 coursework.


Start exploring the Horse Race Program and experience the thrill of race simulation firsthand! πŸŽ‰

About

A fun and interactive Java application that brings the excitement of horse racing to life! πŸŽ‰ Users can register horses, simulate races, and watch as horses race to the top, all displayed through a sleek JavaFX GUI.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages