/electoralsystems

Swing and REST API Applications for Electoral Systems (D'Hont Method, Sainte-Lague, Droop Quota, Hare Quota, Imperiali Quota)

Primary LanguageJava

This is a maven multimodule project developed in Java for simulating electoral systems.

Currently the following methods or algorithms are supported:

  • D'Hont Method
  • Sainte-LaguĂ« Method
  • Droop Quota
  • Hare Quota
  • Imperiali Quota

Building the applications

You need Java 8+ and maven. Use the following command to build the applications:

$ cd electoralsystems

electoralsystems $ mvn install

Launching the applications

GUI/Swing Application

Use the following command to launch the GUI/Swing Application:

electoralsystems $ mvn -f app/pom.xml spring-boot:run

alt text

Example of D'Hont Algorithm Results:

alt text

REST API Application

Use the following command to launch the API Application:

electoralsystems $ mvn -f api/pom.xml spring-boot:run 

URL swagger: http://localhost:8080/v2/api-docs

URL swagger-ui: http://localhost:8080/swagger-ui.html

alt text