The League Standings Calculator is a Java application that processes match results from sports leagues and generates team standings tables. It accepts input in multiple formats and calculates points based on standard league rules: 3 points for a win, 1 point for a draw, and 0 points for a loss.
# Clone the repository
git clone https://github.com/CorrieP/league-standing.git
cd league-standing
# Build the project
mvn clean install
# Run the application
mvn spring-boot:run
- Multiple input methods supported:
- Standard console input
- CSV file input
- Automatic calculation of league standings
- Sorting of standings by:
- Points (descending)
- Team name (alphabetically when points are tied)
- Robust error handling for various input formats
- Java 21 or higher
- Maven 3.8 or higher
When prompted, enter match results in the format: TeamA 3,TeamB 1
Type done when finished.
Provide a path to a CSV file with match results in the same format: Lions 3,Snakes 1 Tarantulas 1,FC Awesome 0 Lions 1,FC Awesome 1
# Standard build
mvn clean install
# Skip tests
mvn clean install -DskipTests
# Run all tests
mvn test
# Run specific test class
mvn test -Dtest=MatchServiceImplTest
# Generate test coverage report
mvn jacoco:report