diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a5abdbe --- /dev/null +++ b/.gitignore @@ -0,0 +1,40 @@ +# Compiled class file +*.class + +# Log file +*.log + +# BlueJ files +*.ctxt + +# Mobile Tools for Java (J2ME) +.mtj.tmp/ + +# Package Files # +*.jar +*.war +*.nar +*.ear +*.zip +*.tar.gz +*.rar + +# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml +hs_err_pid* + +# Default ignored files +/shelf/ +/workspace.xml +.classpath +.project +.settings/ + +*.cache + +bin/**/* +target/**/* +build/**/* +gen/**/* +out/**/* + +.idea \ No newline at end of file diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..31cd7bf --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Datasource local storage ignored files +/../../../../../../../../../:\Users\yann_\Documents\Polytech\4A\GL\ProgLoto\.idea/dataSources/ +/dataSources.local.xml +# Editor-based HTTP Client requests +/httpRequests/ diff --git a/.idea/.name b/.idea/.name new file mode 100644 index 0000000..789f41e --- /dev/null +++ b/.idea/.name @@ -0,0 +1 @@ +ProjetGenieLogicielLoto \ No newline at end of file diff --git a/.idea/ProjetGenieLogicielLoto.iml b/.idea/ProjetGenieLogicielLoto.iml deleted file mode 100644 index b82c303..0000000 --- a/.idea/ProjetGenieLogicielLoto.iml +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/discord.xml b/.idea/discord.xml deleted file mode 100644 index 1ce1677..0000000 --- a/.idea/discord.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - \ No newline at end of file diff --git a/.idea/encodings.xml b/.idea/encodings.xml index aa00ffa..63e9001 100644 --- a/.idea/encodings.xml +++ b/.idea/encodings.xml @@ -2,6 +2,5 @@ - \ No newline at end of file diff --git a/.idea/libraries/Maven__org_apiguardian_apiguardian_api_1_1_0.xml b/.idea/libraries/Maven__org_apiguardian_apiguardian_api_1_1_0.xml new file mode 100644 index 0000000..f854ab0 --- /dev/null +++ b/.idea/libraries/Maven__org_apiguardian_apiguardian_api_1_1_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_junit_jupiter_junit_jupiter_api_5_7_0.xml b/.idea/libraries/Maven__org_junit_jupiter_junit_jupiter_api_5_7_0.xml new file mode 100644 index 0000000..cc01e3f --- /dev/null +++ b/.idea/libraries/Maven__org_junit_jupiter_junit_jupiter_api_5_7_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_junit_jupiter_junit_jupiter_engine_5_7_0.xml b/.idea/libraries/Maven__org_junit_jupiter_junit_jupiter_engine_5_7_0.xml new file mode 100644 index 0000000..f198e4b --- /dev/null +++ b/.idea/libraries/Maven__org_junit_jupiter_junit_jupiter_engine_5_7_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_junit_platform_junit_platform_commons_1_7_0.xml b/.idea/libraries/Maven__org_junit_platform_junit_platform_commons_1_7_0.xml new file mode 100644 index 0000000..cde8a48 --- /dev/null +++ b/.idea/libraries/Maven__org_junit_platform_junit_platform_commons_1_7_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_junit_platform_junit_platform_engine_1_7_0.xml b/.idea/libraries/Maven__org_junit_platform_junit_platform_engine_1_7_0.xml new file mode 100644 index 0000000..3391deb --- /dev/null +++ b/.idea/libraries/Maven__org_junit_platform_junit_platform_engine_1_7_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_openjfx_javafx_base_15.xml b/.idea/libraries/Maven__org_openjfx_javafx_base_15.xml deleted file mode 100644 index eaea861..0000000 --- a/.idea/libraries/Maven__org_openjfx_javafx_base_15.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Maven__org_openjfx_javafx_base_win_15.xml b/.idea/libraries/Maven__org_openjfx_javafx_base_win_15.xml deleted file mode 100644 index d0cb7ba..0000000 --- a/.idea/libraries/Maven__org_openjfx_javafx_base_win_15.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Maven__org_openjfx_javafx_controls_15.xml b/.idea/libraries/Maven__org_openjfx_javafx_controls_15.xml deleted file mode 100644 index eb1bbe0..0000000 --- a/.idea/libraries/Maven__org_openjfx_javafx_controls_15.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Maven__org_openjfx_javafx_controls_win_15.xml b/.idea/libraries/Maven__org_openjfx_javafx_controls_win_15.xml deleted file mode 100644 index 8572b37..0000000 --- a/.idea/libraries/Maven__org_openjfx_javafx_controls_win_15.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Maven__org_openjfx_javafx_fxml_15.xml b/.idea/libraries/Maven__org_openjfx_javafx_fxml_15.xml deleted file mode 100644 index b847060..0000000 --- a/.idea/libraries/Maven__org_openjfx_javafx_fxml_15.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Maven__org_openjfx_javafx_fxml_win_15.xml b/.idea/libraries/Maven__org_openjfx_javafx_fxml_win_15.xml deleted file mode 100644 index bf4c6b7..0000000 --- a/.idea/libraries/Maven__org_openjfx_javafx_fxml_win_15.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Maven__org_openjfx_javafx_graphics_15.xml b/.idea/libraries/Maven__org_openjfx_javafx_graphics_15.xml deleted file mode 100644 index 18ce4e3..0000000 --- a/.idea/libraries/Maven__org_openjfx_javafx_graphics_15.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Maven__org_openjfx_javafx_graphics_win_15.xml b/.idea/libraries/Maven__org_openjfx_javafx_graphics_win_15.xml deleted file mode 100644 index 6fce644..0000000 --- a/.idea/libraries/Maven__org_openjfx_javafx_graphics_win_15.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Maven__org_opentest4j_opentest4j_1_2_0.xml b/.idea/libraries/Maven__org_opentest4j_opentest4j_1_2_0.xml new file mode 100644 index 0000000..fbc1b16 --- /dev/null +++ b/.idea/libraries/Maven__org_opentest4j_opentest4j_1_2_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_slf4j_slf4j_api_1_7_25.xml b/.idea/libraries/Maven__org_slf4j_slf4j_api_1_7_25.xml new file mode 100644 index 0000000..20e8163 --- /dev/null +++ b/.idea/libraries/Maven__org_slf4j_slf4j_api_1_7_25.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_slf4j_slf4j_simple_1_7_25.xml b/.idea/libraries/Maven__org_slf4j_slf4j_simple_1_7_25.xml new file mode 100644 index 0000000..8bc862b --- /dev/null +++ b/.idea/libraries/Maven__org_slf4j_slf4j_simple_1_7_25.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml index bbd67ea..aa83fe4 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,6 +1,15 @@ - - + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml index ff8c83d..19b7cd7 100644 --- a/.idea/modules.xml +++ b/.idea/modules.xml @@ -2,7 +2,7 @@ - + \ No newline at end of file diff --git a/.idea/uiDesigner.xml b/.idea/uiDesigner.xml deleted file mode 100644 index e96534f..0000000 --- a/.idea/uiDesigner.xml +++ /dev/null @@ -1,124 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml index 94a25f7..35eb1dd 100644 --- a/.idea/vcs.xml +++ b/.idea/vcs.xml @@ -1,6 +1,6 @@ - + \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml deleted file mode 100644 index 34a756a..0000000 --- a/.idea/workspace.xml +++ /dev/null @@ -1,112 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 1612200481836 - - - - - - - - - \ No newline at end of file diff --git a/ProjetGenieLogicielLoto.iml b/ProjetGenieLogicielLoto.iml new file mode 100644 index 0000000..1fce218 --- /dev/null +++ b/ProjetGenieLogicielLoto.iml @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/apiguardian-api-1.1.0.jar b/apiguardian-api-1.1.0.jar deleted file mode 100644 index e6fcead..0000000 Binary files a/apiguardian-api-1.1.0.jar and /dev/null differ diff --git a/junit-jupiter-5.5.2.jar b/junit-jupiter-5.5.2.jar deleted file mode 100644 index 4fbff13..0000000 Binary files a/junit-jupiter-5.5.2.jar and /dev/null differ diff --git a/junit-jupiter-api-5.5.2.jar b/junit-jupiter-api-5.5.2.jar deleted file mode 100644 index a025d98..0000000 Binary files a/junit-jupiter-api-5.5.2.jar and /dev/null differ diff --git a/junit-jupiter-engine-5.5.2.jar b/junit-jupiter-engine-5.5.2.jar deleted file mode 100644 index f09e23c..0000000 Binary files a/junit-jupiter-engine-5.5.2.jar and /dev/null differ diff --git a/junit-jupiter-params-5.5.2.jar b/junit-jupiter-params-5.5.2.jar deleted file mode 100644 index 00dabf1..0000000 Binary files a/junit-jupiter-params-5.5.2.jar and /dev/null differ diff --git a/junit-platform-commons-1.5.2.jar b/junit-platform-commons-1.5.2.jar deleted file mode 100644 index 3a09812..0000000 Binary files a/junit-platform-commons-1.5.2.jar and /dev/null differ diff --git a/junit-platform-engine-1.5.2.jar b/junit-platform-engine-1.5.2.jar deleted file mode 100644 index de86ab7..0000000 Binary files a/junit-platform-engine-1.5.2.jar and /dev/null differ diff --git a/opentest4j-1.2.0.jar b/opentest4j-1.2.0.jar deleted file mode 100644 index d500636..0000000 Binary files a/opentest4j-1.2.0.jar and /dev/null differ diff --git a/src/main/java/fr/myny/data/DataCsv.java b/src/main/java/fr/myny/data/DataCsv.java index 3bb19ef..2b3c769 100644 --- a/src/main/java/fr/myny/data/DataCsv.java +++ b/src/main/java/fr/myny/data/DataCsv.java @@ -7,9 +7,6 @@ import java.io.IOException; import java.util.zip.ZipEntry; import java.util.zip.ZipInputStream; -/** - * Classe d'extraction de fichier Zip - */ public class DataCsv { protected String destination; diff --git a/src/main/java/fr/myny/database/DataBase.java b/src/main/java/fr/myny/database/DataBase.java new file mode 100644 index 0000000..e9217e3 --- /dev/null +++ b/src/main/java/fr/myny/database/DataBase.java @@ -0,0 +1,52 @@ +package fr.myny.database; + +import java.sql.Connection; + +/** + * La classe DataBase qui soccupera de la base de donnees + */ + +public class DataBase { + + + + /** + * Le constructeur de DataBase + */ + public DataBase(){ + + } + + /** + * La methode de remplissage de la base de donnees + */ + public void fillDataBase(){ + + } + + /** + * La methode d'import de donnees depuis la base de donnees + */ + public void importDataBase(){ + + } + + /** + * La methode de creation de la base de donnees + */ + public void createDataBase(){ + + } + + + /** + * La methode de mise a jour de la base de donnees + */ + public void updateDataBase(){ + + } + + public Connection getConnection() { + return null; + } +} diff --git a/src/main/java/fr/myny/grid/BuildGrid.java b/src/main/java/fr/myny/grid/BuildGrid.java new file mode 100644 index 0000000..e868228 --- /dev/null +++ b/src/main/java/fr/myny/grid/BuildGrid.java @@ -0,0 +1,24 @@ +package fr.myny.grid; + +public class BuildGrid { + /** + * Le constructeur de BuildGrid + */ + public BuildGrid(){ + + } + + /** + * La methode de recuperation de la grille + */ + public void getGrid(){ + + } + + /** + * La methode de demande du systeme reducteur + */ + public void ReductorSys(){ + + } +} diff --git a/src/main/java/fr/myny/gui/ButtonController.java b/src/main/java/fr/myny/gui/ButtonController.java deleted file mode 100644 index d56b6cb..0000000 --- a/src/main/java/fr/myny/gui/ButtonController.java +++ /dev/null @@ -1,74 +0,0 @@ -package fr.myny.gui; - -import javafx.fxml.FXML; - -import java.io.IOException; - -/** - * Classe permettant l'execution des fonctionnalités de l'application via les autres packages data, database, grid et stats. - */ -public class ButtonController { - - /** - * Execution de la méthode de téléchargement de toutes les données automatiquement et met à jour la base de données - * @throws IOException - */ - @FXML - private void controllerAutoTirage() throws IOException { - - } - - /** - * Execution de la méthode de téléchargement des dernières données automatiquement et met à jour la base de données - * @throws IOException - */ - @FXML - private void controllerAutoDernierTirage() throws IOException { - - } - - /** - * Demande à l'utilisateur de sélectionner un fichier CSV via l'explorateur des fichiers et met à jour la base de données - * @throws IOException - */ - @FXML - private void controllerGetCSVFile() throws IOException { - - } - - /** - * Appelle la méthode d'affichage des statistiques des fréquences d'apparitions d'un nombre - * @throws IOException - */ - @FXML - private void checkBoxNumeros() throws IOException { - - } - - /** - * Appelle la méthode d'affichage des statistiques des fréquences d'apparitions de combinaison de 2 chiffres - * @throws IOException - */ - @FXML - private void checkBox2Numeros() throws IOException { - - } - - /** - * Appelle la méthode d'affichage des statistiques des fréquences d'apparitions de combinaison de 3 chiffres - * @throws IOException - */ - @FXML - private void checkBox3Numeros() throws IOException { - - } - - /** - * Appelle la méthode d'affichage des statistiques des fréquences d'apparitions d'un nombre bonus - * @throws IOException - */ - @FXML - private void checkBoxNumerosBonus() throws IOException { - - } -} diff --git a/src/main/java/fr/myny/gui/DocumentController.java b/src/main/java/fr/myny/gui/DocumentController.java deleted file mode 100644 index 0099a32..0000000 --- a/src/main/java/fr/myny/gui/DocumentController.java +++ /dev/null @@ -1,80 +0,0 @@ -package fr.myny.gui; - -import javafx.collections.ObservableList; -import javafx.event.ActionEvent; -import javafx.fxml.FXML; -import javafx.fxml.Initializable; -import javafx.scene.control.ChoiceBox; - -import java.net.URL; -import java.util.ResourceBundle; - -/** - * Classe permettant d'initialiser et d'écouter le changement des ChoiceBox - */ -public class DocumentController implements Initializable { - - /** - * ChoiceBox créé grâce à FXML - */ - private ChoiceBox integerChoiceBox; - - /** - * - * ChoiceBox créé grâce à FXML - */ - private ChoiceBox stringChoiceBox; - - /** - * Liste d'entier observable grâce à FX - */ - private ObservableList observableIntegerList; - - /** - * Liste de chaîne de caractère observable grâce à FX - */ - private ObservableList observableStringList; - - /** - * Initialisation de la première ChoiceBox du nombre de numéros voulu - * @param url Paramètre non utilisé mais obligatoire en argument - * @param resourceBundle Paramètre non utilisé mais obligatoire en argument - */ - @Override - public void initialize(URL url, ResourceBundle resourceBundle) { - - } - - /** - * Action lors d'un évenement concernant la garantie du système - * @param event Action de l'évenement - */ - @FXML - private void numberGuarantee(ActionEvent event){ - - } - - /** - * Action lors d'un évenement concernant le nombre de numéros à jouer - * @param event Action de l'évenement - */ - @FXML - private void numberPlay(ActionEvent event){ - - } - - /** - * Chargement de toutes les options garantie du systeme - */ - private void loadDataGuarantee(){ - - } - - /** - * Chargement de toutes les options liés au nombre de numéro voulu - */ - private void loadDataNumbers(){ - - } - -} diff --git a/src/main/java/fr/myny/gui/GridController.java b/src/main/java/fr/myny/gui/GridController.java deleted file mode 100644 index c4b747a..0000000 --- a/src/main/java/fr/myny/gui/GridController.java +++ /dev/null @@ -1,498 +0,0 @@ -package fr.myny.gui; - -import javafx.fxml.FXML; -import javafx.fxml.Initializable; - -import java.io.IOException; -import java.net.URL; -import java.util.ArrayList; -import java.util.ResourceBundle; - -/** - * Classe permettant d'initaliser la grille de choix des nombres et d'écouter si l'un d'entre eux est sélectionné - */ -public class GridController implements Initializable { - - /** - * Liste des nombres bonus sélectionnés - */ - ArrayList bonusNumbersChecked; - - /** - * Liste des nombres sélectionnés - */ - ArrayList numbersChecked; - - /** - * @param url - * @param resourceBundle - */ - @Override - public void initialize(URL url, ResourceBundle resourceBundle) { - - } - - /** - * Contrôleur du numéro bonus 1 - */ - @FXML - private void numberBonusController1() throws IOException{ - - } - - /** - * Contrôleur du numéro bonus 2 - */ - @FXML - private void numberBonusController2() throws IOException{ - - } - - /** - * Contrôleur du numéro bonus 3 - */ - @FXML - private void numberBonusController3() throws IOException{ - - } - - /** - * Contrôleur du numéro bonus 4 - */ - @FXML - private void numberBonusController4() throws IOException{ - - } - - /** - * Contrôleur du numéro bonus 5 - */ - @FXML - private void numberBonusController5() throws IOException{ - - } - - /** - * Contrôleur du numéro bonus 6 - */ - @FXML - private void numberBonusController6() throws IOException{ - - } - - /** - * Contrôleur du numéro bonus 7 - */ - @FXML - private void numberBonusController7() throws IOException{ - - } - - /** - * Contrôleur du numéro bonus 8 - */ - @FXML - private void numberBonusController8() throws IOException{ - - } - - /** - * Contrôleur du numéro bonus 9 - */ - @FXML - private void numberBonusController9() throws IOException{ - - } - - /** - * Contrôleur du numéro bonus 10 - */ - @FXML - private void numberBonusController10() throws IOException { - - } - - /** - * Contrôleur du numéro 1 - */ - @FXML - private void numberController1() throws IOException { - - } - - /** - * Contrôleur du numéro 2 - */ - @FXML - private void numberController2() throws IOException { - - } - - /** - * Contrôleur du numéro 3 - */ - @FXML - private void numberController3() throws IOException { - - } - - /** - * Contrôleur du numéro 4 - */ - @FXML - private void numberController4() throws IOException { - - } - - /** - * Contrôleur du numéro 5 - */ - @FXML - private void numberController5() throws IOException { - - } - - /** - * Contrôleur du numéro 6 - */ - @FXML - private void numberController6() throws IOException { - - } - - /** - * Contrôleur du numéro 7 - */ - @FXML - private void numberController8() throws IOException { - - } - - /** - * Contrôleur du numéro 9 - */ - @FXML - private void numberController9() throws IOException { - - } - - /** - * Contrôleur du numéro 10 - */ - @FXML - private void numberController10() throws IOException { - - } - - /** - * Contrôleur du numéro 11 - */ - @FXML - private void numberController11() throws IOException { - - } - - /** - * Contrôleur du numéro 12 - */ - @FXML - private void numberController12() throws IOException { - - } - - /** - * Contrôleur du numéro 13 - */ - @FXML - private void numberController13() throws IOException { - - } - - /** - * Contrôleur du numéro 14 - */ - @FXML - private void numberController14() throws IOException { - - } - - /** - * Contrôleur du numéro 15 - */ - @FXML - private void numberController15() throws IOException { - - } - - /** - * Contrôleur du numéro 16 - */ - @FXML - private void numberController16() throws IOException { - - } - - /** - * Contrôleur du numéro 17 - */ - @FXML - private void numberController17() throws IOException { - - } - - /** - * Contrôleur du numéro 18 - */ - @FXML - private void numberController18() throws IOException { - - } - - /** - * Contrôleur du numéro 19 - */ - @FXML - private void numberController19() throws IOException { - - } - - /** - * Contrôleur du numéro 20 - */ - @FXML - private void numberController20() throws IOException { - - } - - /** - * Contrôleur du numéro 21 - */ - @FXML - private void numberController21() throws IOException { - - } - - /** - * Contrôleur du numéro 22 - */ - @FXML - private void numberController22() throws IOException { - - } - - /** - * Contrôleur du numéro 23 - */ - @FXML - private void numberController23() throws IOException { - - } - - /** - * Contrôleur du numéro 24 - */ - @FXML - private void numberController24() throws IOException { - - } - - /** - * Contrôleur du numéro 25 - */ - @FXML - private void numberController25() throws IOException { - - } - - /** - * Contrôleur du numéro 26 - */ - @FXML - private void numberController26() throws IOException { - - } - - /** - * Contrôleur du numéro 27 - */ - @FXML - private void numberController27() throws IOException { - - } - - /** - * Contrôleur du numéro 28 - */ - @FXML - private void numberController28() throws IOException { - - } - - /** - * Contrôleur du numéro 29 - */ - @FXML - private void numberController29() throws IOException { - - } - - /** - * Contrôleur du numéro 30 - */ - @FXML - private void numberController30() throws IOException { - - } - - /** - * Contrôleur du numéro 31 - */ - @FXML - private void numberController31() throws IOException { - - } - - /** - * Contrôleur du numéro 32 - */ - @FXML - private void numberController32() throws IOException { - - } - - /** - * Contrôleur du numéro 33 - */ - @FXML - private void numberController33() throws IOException { - - } - - /** - * Contrôleur du numéro 34 - */ - @FXML - private void numberController34() throws IOException { - - } - - /** - * Contrôleur du numéro 35 - */ - @FXML - private void numberController35() throws IOException { - - } - - /** - * Contrôleur du numéro 36 - */ - @FXML - private void numberController36() throws IOException { - - } - - /** - * Contrôleur du numéro 37 - */ - @FXML - private void numberController37() throws IOException { - - } - - /** - * Contrôleur du numéro 38 - */ - @FXML - private void numberController38() throws IOException { - - } - - /** - * Contrôleur du numéro 39 - */ - @FXML - private void numberController39() throws IOException { - - } - - /** - * Contrôleur du numéro 40 - */ - @FXML - private void numberController40() throws IOException { - - } - - /** - * Contrôleur du numéro 41 - */ - @FXML - private void numberController41() throws IOException { - - } - - /** - * Contrôleur du numéro 42 - */ - @FXML - private void numberController42() throws IOException { - - } - - /** - * Contrôleur du numéro 43 - */ - @FXML - private void numberController43() throws IOException { - - } - - /** - * Contrôleur du numéro 44 - */ - @FXML - private void numberController44() throws IOException { - - } - - /** - * Contrôleur du numéro 45 - */ - @FXML - private void numberController45() throws IOException { - - } - - /** - * Contrôleur du numéro 46 - */ - @FXML - private void numberController46() throws IOException { - - } - - /** - * Contrôleur du numéro 47 - */ - @FXML - private void numberController47() throws IOException { - - } - - /** - * Contrôleur du numéro 48 - */ - @FXML - private void numberController48() throws IOException { - - } - - /** - * Contrôleur du numéro 49 - */ - @FXML - private void numberController49() throws IOException { - - } -} diff --git a/src/main/java/fr/myny/gui/Gui.java b/src/main/java/fr/myny/gui/Gui.java deleted file mode 100644 index 633d32b..0000000 --- a/src/main/java/fr/myny/gui/Gui.java +++ /dev/null @@ -1,33 +0,0 @@ -package fr.myny.gui; - -import javafx.application.Application; -import javafx.fxml.FXMLLoader; -import javafx.scene.Parent; -import javafx.scene.Scene; -import javafx.stage.Stage; -import java.io.IOException; - -public class Gui extends Application { - - private static Scene scene; - - @Override - public void start(Stage stage) throws IOException { - scene = new Scene(loadFXML("primary")); - stage.setScene(scene); - stage.show(); - } - - static void setRoot(String fxml) throws IOException { - scene.setRoot(loadFXML(fxml)); - } - - private static Parent loadFXML(String fxml) throws IOException { - FXMLLoader fxmlLoader = new FXMLLoader(Gui.class.getResource(fxml + ".fxml")); - return fxmlLoader.load(); - } - - public static void main(String[] args) { - launch(); - } -} diff --git a/src/main/java/fr/myny/gui/Ihm.java b/src/main/java/fr/myny/gui/Ihm.java new file mode 100644 index 0000000..9c8ec2c --- /dev/null +++ b/src/main/java/fr/myny/gui/Ihm.java @@ -0,0 +1,53 @@ +package fr.myny.gui; + + +public class Ihm { + /** + * Le constructeur de Ihm + */ + public Ihm(){ + + } + + /** + * La methode de demande de mise a jour de la base de donnees + */ + public void update(){ + + } + + /** + * La methode de demande de recuperation d'URL ??? + */ + public void getUrl(){ + + } + + /** + * La methode de demande de telechargement de donnees + */ + public void downloadData(){ + // Envoie directement l'utilisateur vers le site de téléchargement + } + + /** + * La methode de demande daffichage de donness + */ + public void printStatistics(){ + + } + + /** + * La methode de demande de generation dun fichier pdf avec des grilles proposees + */ + public void printGrid(){ + + } + + /** + * La methode de demande daffichage de la table + */ + public void generateTable(){ + + } +} diff --git a/src/main/java/fr/myny/gui/PrimaryController.java b/src/main/java/fr/myny/gui/PrimaryController.java deleted file mode 100644 index b3e3df4..0000000 --- a/src/main/java/fr/myny/gui/PrimaryController.java +++ /dev/null @@ -1,13 +0,0 @@ -package fr.myny.gui; - -import javafx.fxml.FXML; - -import java.io.IOException; - -public class PrimaryController { - - @FXML - private void switchToSecondary() throws IOException { - Gui.setRoot("secondary"); - } -} diff --git a/src/main/java/fr/myny/gui/SecondaryController.java b/src/main/java/fr/myny/gui/SecondaryController.java deleted file mode 100644 index ed9f6bd..0000000 --- a/src/main/java/fr/myny/gui/SecondaryController.java +++ /dev/null @@ -1,13 +0,0 @@ -package fr.myny.gui; - -import javafx.fxml.FXML; - -import java.io.IOException; - -public class SecondaryController { - - @FXML - private void switchToPrimary() throws IOException { - Gui.setRoot("primary"); - } -} \ No newline at end of file diff --git a/src/main/java/fr/myny/stats/Choix.java b/src/main/java/fr/myny/stats/Choix.java new file mode 100644 index 0000000..4a42481 --- /dev/null +++ b/src/main/java/fr/myny/stats/Choix.java @@ -0,0 +1,425 @@ +package fr.myny.stats; + +import fr.myny.database.DataBase; + +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; + +public class Choix { + public DataBase maDB; + public Connection conn; + public long numSelect[]; + public int bonusSelect; + public long numId[][]; + public long numCpt[][]; + public long bonusId[][]; + public long bonusCpt[][]; + public long combi1Id[][]; + public long combi1Cpt[]; + public long combi2Id[][]; + public long combi2Cpt[]; + public long num1_bonusId[][]; + public long num1_bonusCpt[]; + public long num2_bonusId[][]; + public long num2_bonusCpt[]; + public long num3_bonusId[][]; + public long num3_bonusCpt[]; + + + /** + * Constructeur par defaut : initialise toutes les variables et les tableaux + */ + public Choix(){ + maDB=new DataBase(); + maDB.getConnection(); + numSelect =new long[5]; + numId =new long[50][4000]; + numCpt = new long[50][2]; + combi1Id =new long[50][4000]; + combi1Cpt = new long[50]; + num1_bonusId =new long[11][4000]; + num1_bonusCpt = new long[11]; + num2_bonusId =new long[11][4000]; + num2_bonusCpt = new long[11]; + num3_bonusId =new long[11][4000]; + num3_bonusCpt = new long[11]; + combi2Id=new long[50][4000]; + combi2Cpt=new long[50]; + bonusId =new long[11][4000]; + bonusCpt=new long[11][2]; + conn= maDB.getConnection(); + } + + /** + * Methode affichant les numeros avec leur frequence d'apparition + * @throws SQLException + */ + public void afficherChiffre1() throws SQLException { + System.out.println("debut afficherChiffre1"); + int k=0, numprec=0, l=0; + ResultSet rs=null; + String sql; + int j = 0; + for (int i=1; i<6;i++) { + sql = "SELECT Test_Table.boule_" + i + ",Count(*) as 'cnt' FROM myny.Test_Table GROUP BY Test_Table.boule_" + i + "; "; + try { + conn = maDB.getConnection(); + if (conn != null) { + Statement ps = conn.createStatement(); + rs = ps.executeQuery(sql); + conn.commit(); + System.out.println("statement cree"); + } + } catch (SQLException e) { + System.out.println("chiffre1 probleme"); + System.out.println(e.getMessage()); + } + + //rs.next(); + while (rs.next()) { + if (i == 1) { + numCpt[rs.getInt(1)][0] = rs.getInt(1); + numCpt[rs.getInt(1)][1] = rs.getLong(2); + } else { + numCpt[rs.getInt(1)][1] += rs.getLong(2); + } + j++; + } + j=0; + } + //for (int i=0; i<50;i++) { System.out.println(i+" :"+ numCpt[i][1]); } + + for (int i=1; i<=5;i++) { + sql = "SELECT Test_Table.annee_numero_de_tirage, Test_Table.boule_" + i + " FROM myny.Test_Table ORDER BY Test_Table.boule_" + i + "; "; + try { + conn = maDB.getConnection(); + if (conn != null) { + Statement ps = conn.createStatement(); + rs = ps.executeQuery(sql); + conn.commit(); + System.out.println("statement cree"); + } + } catch (SQLException e) { + System.out.println("chiffre1 probleme"); + System.out.println(e.getMessage()); + } + + + //rs.next(); + while (rs.next()) { + //System.out.println(numprec+", "+rs.getInt(2)); + if(numprec!=rs.getInt(2)) {k = 0;} + while(numId[rs.getInt(2)][k]!=0){ + k++; + } + numId[rs.getInt(2)][k]=rs.getInt(1); + //System.out.println(numId[rs.getInt(2)][k]); + numprec=rs.getInt(2); + } + k=0; + //j=0; + } + for (int i=1; i<50;i++) { + System.out.println(i+":"); + while(numId[i][l]!=0){ + System.out.print(numId[i][l]+", "); + l++; + } + System.out.println(); + l=0; + } + } + + /** + * Methode affichant les combinaisons a deux numeros en fonction du premier numero choisi + * @param chiffre1 premiere combinaison + * @throws SQLException + */ + public void afficherCombinaisons2(int chiffre1) throws SQLException { + afficherChiffre1(); + System.out.println("debut afficherCombinaisons2"); + numSelect[1]=chiffre1; + int j=0, k=0, l=0, cpt=0; + for(int i=1;i<50;i++) { + if (i != chiffre1) { + while (numId[chiffre1][j] != 0) { + while (numId[i][k] != 0) { + //System.out.println(numId[i][k] +"=="+ numId[chiffre1][j]); + if (numId[i][k] == numId[chiffre1][j]) { + combi1Cpt[i]++; + combi1Id[i][cpt++]=numId[i][k]; + } + k++; + } + k = 0; + j++; + } + j = 0; + } + cpt=0; + } + for (int i=1; i<50;i++) { + /*for (int p=1; p<50;p++) { + System.out.print(combi1Id[i][p]+", "); + }*/ + System.out.println(i+": "+combi1Cpt[i]); + while(combi1Id[i][l]!=0){ + System.out.print(combi1Id[i][l]+", "); + l++; + } + System.out.println(); + l=0; + } + + } + + /** + * Methode affichant les combinaisons a trois numeros en fonction des deux numeros choisi + * @param chiffre1 + * @param chiffre2 + * @throws SQLException + */ + public void afficherCombinaisons3(int chiffre1, int chiffre2) throws SQLException { + afficherChiffre1(); + afficherCombinaisons2(chiffre1); + System.out.println("debut afficherCombinaisons3"); + numSelect[2]=chiffre2; + int j=0, k=0, m=0, cpt=0; + for(int i=1;i<50;i++) { + if (i != chiffre1 && i!=chiffre2) { + while (combi1Id[chiffre2][j] != 0){ + while (numId[i][k] != 0) { + //System.out.println(numId[i][k] +"=="+ combi1Id[chiffre2][j]); + if (numId[i][k] == combi1Id[chiffre2][j]) { + combi2Cpt[i]++; + combi2Id[i][cpt++]=numId[i][k]; + } + k++; + } + k = 0; + j++; + } + j = 0; + } + cpt=0; + } + for (int i=1; i<50;i++) { + /*for (int p=1; p<50;p++) { + System.out.print(combi1Id[i][p]+", "); + }*/ + System.out.println(i+": "+combi2Cpt[i]); + while(combi2Id[i][k]!=0){ + System.out.print(combi2Id[i][k]+", "); + k++; + } + System.out.println(); + k=0; + } + + } + + /** + * @throws SQLException + */ + public void afficherBonus() throws SQLException { + System.out.println("debut afficherBonus"); + int k=0, numprec=0, l=0; + ResultSet rs=null; + String sql; + sql = "SELECT Test_Table.numero_chance,Count(*) as 'cnt' FROM myny.Test_Table GROUP BY Test_Table.numero_chance; "; + try { + conn = maDB.getConnection(); + if (conn != null) { + Statement ps = conn.createStatement(); + rs = ps.executeQuery(sql); + conn.commit(); + System.out.println("statement cree"); + } + } catch (SQLException e) { + System.out.println("chiffre1 probleme"); + System.out.println(e.getMessage()); + } + + //rs.next(); + while (rs.next()) { + bonusCpt[rs.getInt(1)][0] = rs.getInt(1); + bonusCpt[rs.getInt(1)][1] = rs.getLong(2); + } + for (int i=0; i<11;i++) { + System.out.println(i+" :"+ bonusCpt[i][1]); + } + sql = "SELECT Test_Table.annee_numero_de_tirage, Test_Table.numero_chance FROM myny.Test_Table ORDER BY Test_Table.numero_chance; "; + try { + conn = maDB.getConnection(); + if (conn != null) { + Statement ps = conn.createStatement(); + rs = ps.executeQuery(sql); + conn.commit(); + System.out.println("statement cree"); + } + } catch (SQLException e) { + System.out.println("chiffre1 probleme"); + System.out.println(e.getMessage()); + } + + + //rs.next(); + while (rs.next()) { + //System.out.println(numprec+", "+rs.getInt(2)); + if(numprec!=rs.getInt(2)) {k = 0;} + while(bonusId[rs.getInt(2)][k]!=0){ + k++; + } + bonusId[rs.getInt(2)][k]=rs.getInt(1); + System.out.println(bonusId[rs.getInt(2)][k]); + numprec=rs.getInt(2); + } + k=0; + //j=0; + for (int i=1; i<11;i++) { + System.out.println(i+":"+bonusCpt[i][1]); + while(bonusId[i][l]!=0){ + System.out.print(bonusId[i][l]+", "); + l++; + } + System.out.println(); + l=0; + } + } + + /** + * Methode affichant les numeros bonus avec leur frequence d'apparition + * @param chiffre1 + * @throws SQLException + */ + public void afficherNumBonus(int chiffre1) throws SQLException { + afficherChiffre1(); + this.afficherBonus(); + System.out.println("debut afficherNumBonus"); + numSelect[1]=chiffre1; + int j=0, k=0, l=0, cpt=0; + for(int i=1;i<11;i++) { + while (numId[chiffre1][j] != 0) { + while (bonusId[i][k] != 0) { + //System.out.println(bonusId[i][k] +"=="+ numId[chiffre1][j]); + if (bonusId[i][k] == numId[chiffre1][j]) { + num1_bonusCpt[i]++; + num1_bonusId[i][cpt++]=bonusId[i][k]; + j++; + } + k++; + } + k = 0; + j++; + } + j = 0; + cpt=0; + } + for (int i=1; i<11;i++) { + /*for (int p=1; p<50;p++) { + System.out.print(combi1Id[i][p]+", "); + }*/ + System.out.println(i+": "+num1_bonusCpt[i]); + while(num1_bonusId[i][l]!=0){ + System.out.print(num1_bonusId[i][l]+", "); + l++; + } + System.out.println(); + l=0; + } + + } + + /** + * Methode affichant les numeros bonus en fonction des combinaisons à deux numeros + * @param chiffre1 + * @param chiffre2 + * @throws SQLException + */ + public void afficherNumBonusCombi2(int chiffre1, int chiffre2) throws SQLException { + afficherCombinaisons2(chiffre1); + afficherBonus(); + System.out.println("debut afficherNumBonusCombi2"); + numSelect[1]=chiffre1; + numSelect[2]=chiffre2; + int j=0, k=0, l=0, cpt=0; + for(int i=1;i<11;i++) { + while (combi1Id[chiffre2][j] != 0) { + while (bonusId[i][k] != 0) { + //System.out.println(bonusId[i][k] +"=="+ combi1Id[chiffre2][j]); + if (bonusId[i][k] == combi1Id[chiffre2][j]) { + num2_bonusCpt[i]++; + num2_bonusId[i][cpt++]=bonusId[i][k]; + j++; + } + k++; + } + k = 0; + j++; + } + j = 0; + cpt=0; + } + for (int i=1; i<11;i++) { + /*for (int p=1; p<50;p++) { + System.out.print(combi1Id[i][p]+", "); + }*/ + System.out.println(i+": "+num2_bonusCpt[i]); + while(num2_bonusId[i][l]!=0){ + System.out.print(num2_bonusId[i][l]+", "); + l++; + } + System.out.println(); + l=0; + } + + } + + /** + * Methode affichant les numeros bonus en fonction des combinaisons à trois numeros + * @param chiffre1 + * @param chiffre2 + * @param chiffre3 + * @throws SQLException + */ + public void afficherNumBonusCombi3(int chiffre1, int chiffre2, int chiffre3) throws SQLException { + afficherCombinaisons3(chiffre1, chiffre2); + afficherBonus(); + System.out.println("debut afficherNumBonusCombi3"); + numSelect[1]=chiffre1; + numSelect[2]=chiffre2; + numSelect[3]=chiffre3; + int j=0, k=0, l=0, cpt=0; + while (combi2Id[chiffre3][j] != 0) { + for(int i=1;i<11;i++) { + while (bonusId[i][k] != 0) { + //System.out.println(combi2Id[chiffre3][j] +"=="+ bonusId[i][k]); + if (bonusId[i][k] == combi2Id[chiffre3][j]) { + num3_bonusCpt[i]++; + num3_bonusId[i][cpt++]=bonusId[i][k]; + j++; + } + k++; + } + k = 0; + } + cpt=0; + j++; + } + for (int i=1; i<11;i++) { + /*for (int p=1; p<50;p++) { + System.out.print(combi1Id[i][p]+", "); + }*/ + System.out.println(i+": "+num3_bonusCpt[i]); + while(num3_bonusId[i][l]!=0){ + System.out.print(num3_bonusId[i][l]+", "); + l++; + } + System.out.println(); + l=0; + } + + } +} diff --git a/src/main/java/fr/myny/stats/Statistics.java b/src/main/java/fr/myny/stats/Statistics.java new file mode 100644 index 0000000..8198337 --- /dev/null +++ b/src/main/java/fr/myny/stats/Statistics.java @@ -0,0 +1,303 @@ +package fr.myny.stats; + +import fr.myny.database.DataBase; + +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; + +/** + * Classe permettant de renvoyer les statistiques a partir de la DB + */ +public class Statistics { + public DataBase maDB; + public Connection conn; + public long numSelect[]; + public long numId[][]; + public long numCpt[][]; + public long bonusId[][]; + public long bonusCpt[][]; + public long combi1Id[][]; + public long combi1Cpt[]; + public long combi2Id[][]; + public long combi2Cpt[]; + public long num1_bonusId[][]; + public long num1_bonusCpt[]; + + + /** + * Constructeur par defaut : initialise toutes les variables et les tableaux + */ + public Statistics() { + maDB = new DataBase(); + maDB.getConnection(); + numSelect = new long[5]; + numId = new long[50][4000]; + numCpt = new long[50][2]; + combi1Id = new long[50][4000]; + combi1Cpt = new long[50]; + num1_bonusId = new long[11][4000]; + num1_bonusCpt = new long[11]; + combi2Id = new long[50][4000]; + combi2Cpt = new long[50]; + bonusId = new long[11][4000]; + bonusCpt = new long[11][2]; + conn = maDB.getConnection(); + } + + /** + * Methode renvoyant les numeros avec leur frequence d'apparition + * + * @return affichage numeros + * @throws SQLException + */ + public String numero1() throws SQLException { + System.out.println("debut numero1"); + int k = 0, numprec = 0, l = 0; + ResultSet rs = null; + String sql; + int j = 0; + for (int i = 1; i < 6; i++) { + sql = "SELECT Test_Table.boule_" + i + ",Count(*) as 'cnt' FROM myny.Test_Table GROUP BY Test_Table.boule_" + i + "; "; + try { + conn = maDB.getConnection(); + if (conn != null) { + Statement ps = conn.createStatement(); + rs = ps.executeQuery(sql); + conn.commit(); + System.out.println("statement cree"); + } + } catch (SQLException e) { + System.out.println("chiffre1 probleme"); + System.out.println(e.getMessage()); + } + + //rs.next(); + while (rs.next()) { + if (i == 1) { + numCpt[rs.getInt(1)][0] = rs.getInt(1); + numCpt[rs.getInt(1)][1] = rs.getLong(2); + } else { + numCpt[rs.getInt(1)][1] += rs.getLong(2); + } + j++; + } + j = 0; + } + //for (int i=0; i<50;i++) { System.out.println(i+" :"+ numCpt[i][1]); } + + for (int i = 1; i <= 5; i++) { + sql = "SELECT Test_Table.annee_numero_de_tirage, Test_Table.boule_" + i + " FROM myny.Test_Table ORDER BY Test_Table.boule_" + i + "; "; + try { + conn = maDB.getConnection(); + if (conn != null) { + Statement ps = conn.createStatement(); + rs = ps.executeQuery(sql); + conn.commit(); + System.out.println("statement cree"); + } + } catch (SQLException e) { + System.out.println("chiffre1 probleme"); + System.out.println(e.getMessage()); + } + + + //rs.next(); + while (rs.next()) { + //System.out.println(numprec+", "+rs.getInt(2)); + if (numprec != rs.getInt(2)) { + k = 0; + } + while (numId[rs.getInt(2)][k] != 0) { + k++; + } + numId[rs.getInt(2)][k] = rs.getInt(1); + //System.out.println(numId[rs.getInt(2)][k]); + numprec = rs.getInt(2); + } + k = 0; + //j=0; + } + String s = null; + for (int i = 1; i < 50; i++) { + s = i + ":\n"; + while (numId[i][l] != 0) { + s = s + numId[i][l] + ", "; + l++; + } + l = 0; + } + return s; + } + + /** + * Methode renvoyant les combinaisons a deux numeros en fonction du premier numero choisi + * + * @param chiffre1 premiere combinaison + * @return affichage combinaison + * @throws SQLException + */ + public String combinaison2(int chiffre1) throws SQLException { + numero1(); + System.out.println("debut combinaison2"); + numSelect[1] = chiffre1; + int j = 0, k = 0, l = 0, cpt = 0; + for (int i = 1; i < 50; i++) { + if (i != chiffre1) { + while (numId[chiffre1][j] != 0) { + while (numId[i][k] != 0) { + //System.out.println(numId[i][k] +"=="+ numId[chiffre1][j]); + if (numId[i][k] == numId[chiffre1][j]) { + combi1Cpt[i]++; + combi1Id[i][cpt++] = numId[i][k]; + } + k++; + } + k = 0; + j++; + } + j = 0; + } + cpt = 0; + } + String s = null; + for (int i = 1; i < 50; i++) { + /*for (int p=1; p<50;p++) { + System.out.print(combi1Id[i][p]+", "); + }*/ + s = i + ": " + combi1Cpt[i] + "\n"; + while (combi1Id[i][l] != 0) { + s = s + combi1Id[i][l] + ", "; + l++; + } + l = 0; + } + return s; + } + + /** + * Methode renvoyant les combinaisons a trois numeros en fonction des deux numeros choisi + * + * @param chiffre1 + * @param chiffre2 + * @return affichage combinaison + * @throws SQLException + */ + public String combinaison3(int chiffre1, int chiffre2) throws SQLException { + numero1(); + combinaison2(chiffre1); + System.out.println("debut combinaison3"); + numSelect[2] = chiffre2; + int j = 0, k = 0, m = 0, cpt = 0; + for (int i = 1; i < 50; i++) { + if (i != chiffre1 && i != chiffre2) { + while (combi1Id[chiffre2][j] != 0) { + while (numId[i][k] != 0) { + //System.out.println(numId[i][k] +"=="+ combi1Id[chiffre2][j]); + if (numId[i][k] == combi1Id[chiffre2][j]) { + combi2Cpt[i]++; + combi2Id[i][cpt++] = numId[i][k]; + } + k++; + } + k = 0; + j++; + } + j = 0; + } + cpt = 0; + } + String s = null; + for (int i = 1; i < 50; i++) { + /*for (int p=1; p<50;p++) { + System.out.print(combi1Id[i][p]+", "); + }*/ + s = i + ": " + combi2Cpt[i] + "\n"; + while (combi2Id[i][k] != 0) { + s = s + combi2Id[i][k] + ", "; + k++; + } + System.out.println(); + k = 0; + } + return s; + } + + /** + * Methode renvoyant les numeros bonus avec leur frequence d'apparition + * + * @return affichage numero bonus + * @throws SQLException + */ + public String bonus() throws SQLException { + System.out.println("debut bonus"); + int k = 0, numprec = 0, l = 0; + ResultSet rs = null; + String sql; + sql = "SELECT Test_Table.numero_chance,Count(*) as 'cnt' FROM myny.Test_Table GROUP BY Test_Table.numero_chance; "; + try { + conn = maDB.getConnection(); + if (conn != null) { + Statement ps = conn.createStatement(); + rs = ps.executeQuery(sql); + conn.commit(); + System.out.println("statement cree"); + } + } catch (SQLException e) { + System.out.println("chiffre1 probleme"); + System.out.println(e.getMessage()); + } + + //rs.next(); + while (rs.next()) { + bonusCpt[rs.getInt(1)][0] = rs.getInt(1); + bonusCpt[rs.getInt(1)][1] = rs.getLong(2); + } + for (int i = 0; i < 11; i++) { + System.out.println(i + " :" + bonusCpt[i][1]); + } + sql = "SELECT Test_Table.annee_numero_de_tirage, Test_Table.numero_chance FROM myny.Test_Table ORDER BY Test_Table.numero_chance; "; + try { + conn = maDB.getConnection(); + if (conn != null) { + Statement ps = conn.createStatement(); + rs = ps.executeQuery(sql); + conn.commit(); + System.out.println("statement cree"); + } + } catch (SQLException e) { + System.out.println("chiffre1 probleme"); + System.out.println(e.getMessage()); + } + + + //rs.next(); + while (rs.next()) { + //System.out.println(numprec+", "+rs.getInt(2)); + if (numprec != rs.getInt(2)) { + k = 0; + } + while (bonusId[rs.getInt(2)][k] != 0) { + k++; + } + bonusId[rs.getInt(2)][k] = rs.getInt(1); + System.out.println(bonusId[rs.getInt(2)][k]); + numprec = rs.getInt(2); + } + k = 0; + //j=0; + String s = null; + for (int i = 1; i < 11; i++) { + s = i + ":" + bonusCpt[i][1] + "\n"; + while (bonusId[i][l] != 0) { + s = s + bonusId[i][l] + ", "; + l++; + } + System.out.println(); + l = 0; + } + return s; + } +} + diff --git a/src/main/java/fr/myny/stats/YuukiStats.java b/src/main/java/fr/myny/stats/YuukiStats.java new file mode 100644 index 0000000..a765a41 --- /dev/null +++ b/src/main/java/fr/myny/stats/YuukiStats.java @@ -0,0 +1,45 @@ +package fr.myny.stats; + +import fr.myny.database.DataBase; + +import java.sql.Connection; +import java.sql.SQLException; +import java.util.TreeMap; + +public class YuukiStats { + private DataBase dataBase; + private Connection connection; + + private TreeMap treeMap; + + public YuukiStats() throws SQLException { + setDataBase(new DataBase()); + setConnection(getDataBase().getConnection()); + statsNumero(); + } + + public DataBase getDataBase() { return dataBase; } + public Connection getConnection() { return connection; } + public TreeMap getTreeMap() { return treeMap; } + + public void setConnection(Connection connection) { this.connection = connection; } + public void setDataBase(DataBase dataBase) { this.dataBase = dataBase; } + public void setTreeMap(TreeMap treeMap) { this.treeMap = treeMap; } + + public void statsNumero() throws SQLException { + setTreeMap(new TreeMap()); + } + + public void statsCombinaison2(int chiffre1) throws SQLException { + setTreeMap(new TreeMap()); + } + + public void statsCombinaison3(int chiffre1, int chiffre2) throws SQLException { + setTreeMap(new TreeMap()); + } + + public void statsNumeroBonus() throws SQLException { + setTreeMap(new TreeMap()); + } + +} diff --git a/src/main/java/module-info.java b/src/main/java/module-info.java deleted file mode 100644 index 8065c10..0000000 --- a/src/main/java/module-info.java +++ /dev/null @@ -1,7 +0,0 @@ -module fr.myny.gui { - requires javafx.controls; - requires javafx.fxml; - - opens fr.myny.gui to javafx.fxml; - exports fr.myny.gui; -} \ No newline at end of file diff --git a/src/main/resources/fr/myny/gui/popup.fxml b/src/main/resources/fr/myny/gui/popup.fxml deleted file mode 100644 index df35472..0000000 --- a/src/main/resources/fr/myny/gui/popup.fxml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - -