项目作者: andresjimenezpenalver

项目描述 :
Swing and REST API Applications for Electoral Systems (D'Hont Method, Sainte-Lague, Droop Quota, Hare Quota, Imperiali Quota)
高级语言: Java
项目地址: git://github.com/andresjimenezpenalver/electoralsystems.git
创建时间: 2019-06-24T15:51:38Z
项目社区:https://github.com/andresjimenezpenalver/electoralsystems

开源协议:

下载


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:

  1. $ cd electoralsystems
  2. electoralsystems $ mvn install

Launching the applications

GUI/Swing Application

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

  1. 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:

  1. 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