From a129bfd4b50b398ed8f272642d7795f8ee0cc483 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Heredero?= Date: Sun, 28 Nov 2021 12:40:29 +0100 Subject: [PATCH] --- README.md | 22 ++++++ src/{lab1 => lab1_Introduction}/Fuel.java | 2 +- src/lab1_Introduction/Input.java | 74 ++++++++++++++++++ .../MyProgram.java | 2 +- src/{lab1 => lab1_Introduction}/RoomCalc.java | 2 +- src/{lab1 => lab1_Introduction}/sphere.java | 2 +- src/{lab1 => lab1_Introduction}/swap.java | 2 +- .../2-Lab-FR-Datatypes.pdf | Bin src/{lab3 => lab2_DataTypes}/Input.java | 2 +- src/{lab2 => lab2_DataTypes}/Task1.java | 2 +- src/{lab2 => lab2_DataTypes}/TextTools.java | 2 +- src/{lab2 => lab2_DataTypes}/task2.java | 2 +- src/{lab2 => lab2_DataTypes}/task3.java | 2 +- src/{lab2 => lab2_DataTypes}/task4.java | 2 +- src/{lab2 => lab2_DataTypes}/task5.java | 2 +- src/{lab2 => lab2_DataTypes}/task6.java | 2 +- src/{lab2 => lab2_DataTypes}/task7.java | 2 +- src/{lab2 => lab2_DataTypes}/task8.java | 2 +- .../03-expression-test-loop-fr.pdf | Bin src/{lab3 => lab3_Loops}/DrawArrow.java | 2 +- src/{lab1 => lab3_Loops}/Input.java | 2 +- .../SimpleCalculator.java | 2 +- src/{lab3 => lab3_Loops}/task1.java | 2 +- src/{lab3 => lab3_Loops}/task4.java | 2 +- src/{lab3 => lab3_Loops}/task5.java | 2 +- src/{lab3 => lab3_Loops}/task6.java | 2 +- src/{lab3 => lab3_Loops}/task7.java | 2 +- .../05-functions-fr.pdf | Bin src/{lab4 => lab4_Fonctions}/DottedFlag.java | 2 +- src/{lab4 => lab4_Fonctions}/Input.java | 2 +- .../StringFunctions.java | 2 +- src/{lab4 => lab4_Fonctions}/task1.java | 2 +- src/{lab4 => lab4_Fonctions}/task2.java | 2 +- src/{lab4 => lab4_Fonctions}/task3.java | 2 +- .../06_SecretNumber_FR.pdf | Bin src/{lab6 => lab5_SecretNumber}/Dialogs.java | 2 +- src/{lab5 => lab5_SecretNumber}/Input.java | 2 +- .../secretNumber.java | 2 +- src/lab6/Input.java | 74 ------------------ src/{lab6 => lab6_Hangman}/07-HangMan_FR.pdf | Bin src/{lab5 => lab6_Hangman}/Dialogs.java | 2 +- src/{lab6 => lab6_Hangman}/HangMan.java | 2 +- src/{lab2 => lab6_Hangman}/Input.java | 2 +- src/{lab6 => lab6_Hangman}/Lexique.csv | 0 src/{lab6 => lab6_Hangman}/Lexique382.csv | 0 src/{lab6 => lab6_Hangman}/Person.java | 2 +- src/{lab6 => lab6_Hangman}/Task1.java | 2 +- src/{lab6 => lab6_Hangman}/WordManager.java | 2 +- .../french_common_words.csv | 0 .../french_dictionary.txt | 0 src/{lab6 => lab6_Hangman}/mots.csv | 0 src/{lab6 => lab6_Hangman}/mots.xlsx | Bin src/{lab6 => lab6_Hangman}/mots_beginner.csv | 0 src/{lab6 => lab6_Hangman}/mots_difficult.csv | 0 src/{lab6 => lab6_Hangman}/mots_easy.csv | 0 src/{lab6 => lab6_Hangman}/mots_hardcore.csv | 0 src/{lab6 => lab6_Hangman}/mots_medium.csv | 0 57 files changed, 134 insertions(+), 112 deletions(-) create mode 100644 README.md rename src/{lab1 => lab1_Introduction}/Fuel.java (95%) create mode 100644 src/lab1_Introduction/Input.java rename src/{lab1 => lab1_Introduction}/MyProgram.java (92%) rename src/{lab1 => lab1_Introduction}/RoomCalc.java (97%) rename src/{lab1 => lab1_Introduction}/sphere.java (97%) rename src/{lab1 => lab1_Introduction}/swap.java (91%) rename src/{lab2 => lab2_DataTypes}/2-Lab-FR-Datatypes.pdf (100%) rename src/{lab3 => lab2_DataTypes}/Input.java (98%) rename src/{lab2 => lab2_DataTypes}/Task1.java (95%) rename src/{lab2 => lab2_DataTypes}/TextTools.java (99%) rename src/{lab2 => lab2_DataTypes}/task2.java (89%) rename src/{lab2 => lab2_DataTypes}/task3.java (90%) rename src/{lab2 => lab2_DataTypes}/task4.java (88%) rename src/{lab2 => lab2_DataTypes}/task5.java (92%) rename src/{lab2 => lab2_DataTypes}/task6.java (90%) rename src/{lab2 => lab2_DataTypes}/task7.java (96%) rename src/{lab2 => lab2_DataTypes}/task8.java (94%) rename src/{lab3 => lab3_Loops}/03-expression-test-loop-fr.pdf (100%) rename src/{lab3 => lab3_Loops}/DrawArrow.java (97%) rename src/{lab1 => lab3_Loops}/Input.java (99%) rename src/{lab3 => lab3_Loops}/SimpleCalculator.java (99%) rename src/{lab3 => lab3_Loops}/task1.java (91%) rename src/{lab3 => lab3_Loops}/task4.java (97%) rename src/{lab3 => lab3_Loops}/task5.java (97%) rename src/{lab3 => lab3_Loops}/task6.java (97%) rename src/{lab3 => lab3_Loops}/task7.java (97%) rename src/{lab4 => lab4_Fonctions}/05-functions-fr.pdf (100%) rename src/{lab4 => lab4_Fonctions}/DottedFlag.java (99%) rename src/{lab4 => lab4_Fonctions}/Input.java (98%) rename src/{lab4 => lab4_Fonctions}/StringFunctions.java (94%) rename src/{lab4 => lab4_Fonctions}/task1.java (97%) rename src/{lab4 => lab4_Fonctions}/task2.java (89%) rename src/{lab4 => lab4_Fonctions}/task3.java (97%) rename src/{lab5 => lab5_SecretNumber}/06_SecretNumber_FR.pdf (100%) rename src/{lab6 => lab5_SecretNumber}/Dialogs.java (98%) rename src/{lab5 => lab5_SecretNumber}/Input.java (99%) rename src/{lab5 => lab5_SecretNumber}/secretNumber.java (99%) delete mode 100644 src/lab6/Input.java rename src/{lab6 => lab6_Hangman}/07-HangMan_FR.pdf (100%) rename src/{lab5 => lab6_Hangman}/Dialogs.java (98%) rename src/{lab6 => lab6_Hangman}/HangMan.java (99%) rename src/{lab2 => lab6_Hangman}/Input.java (98%) rename src/{lab6 => lab6_Hangman}/Lexique.csv (100%) rename src/{lab6 => lab6_Hangman}/Lexique382.csv (100%) rename src/{lab6 => lab6_Hangman}/Person.java (96%) rename src/{lab6 => lab6_Hangman}/Task1.java (94%) rename src/{lab6 => lab6_Hangman}/WordManager.java (99%) rename src/{lab6 => lab6_Hangman}/french_common_words.csv (100%) rename src/{lab6 => lab6_Hangman}/french_dictionary.txt (100%) rename src/{lab6 => lab6_Hangman}/mots.csv (100%) rename src/{lab6 => lab6_Hangman}/mots.xlsx (100%) rename src/{lab6 => lab6_Hangman}/mots_beginner.csv (100%) rename src/{lab6 => lab6_Hangman}/mots_difficult.csv (100%) rename src/{lab6 => lab6_Hangman}/mots_easy.csv (100%) rename src/{lab6 => lab6_Hangman}/mots_hardcore.csv (100%) rename src/{lab6 => lab6_Hangman}/mots_medium.csv (100%) diff --git a/README.md b/README.md new file mode 100644 index 0000000..61e3387 --- /dev/null +++ b/README.md @@ -0,0 +1,22 @@ +## Informatic 1 in HEVS - Practice- RĂ©mi Heredero + +All my work for labo during the first semester in engineering school of Wallis for Industrial Systems. + +All the practical exercices come to the modul INF1 in HES-SO Valais/Wallis. + +It's only some small labo on java. Probably nothing interresant, but maybe it can help someone one day. I store by labs in src for have only one Java project for all thoses labs. + +## Folder Structure + +The workspace contains two folders by default, where: + +- `src`: the folder to maintain sources +- `lib`: the folder to maintain dependencies + +Meanwhile, the compiled output files will be generated in the `bin` folder by default. + +> If you want to customize the folder structure, open `.vscode/settings.json` and update the related settings there. + +## Dependency Management + +The `JAVA PROJECTS` view allows you to manage your dependencies. More details can be found [here](https://github.com/microsoft/vscode-java-dependency#manage-dependencies). diff --git a/src/lab1/Fuel.java b/src/lab1_Introduction/Fuel.java similarity index 95% rename from src/lab1/Fuel.java rename to src/lab1_Introduction/Fuel.java index 36c6ff0..ba251d1 100644 --- a/src/lab1/Fuel.java +++ b/src/lab1_Introduction/Fuel.java @@ -1,4 +1,4 @@ -package lab1; +package lab1_Introduction; public class Fuel { public static void main(String args[]) diff --git a/src/lab1_Introduction/Input.java b/src/lab1_Introduction/Input.java new file mode 100644 index 0000000..614b217 --- /dev/null +++ b/src/lab1_Introduction/Input.java @@ -0,0 +1,74 @@ +package lab1_Introduction; +import java.io.*; + +/** +* The Class Input is here to enter data with the keyboard.
+* The types below are supported by the Input class.

+* - String
- Integer (int)
- Double (double) - Boolean (boolean)
- Character (char)


+* @see #readString() +* @see #readInt() +* @see #readDouble() +* @see #readBoolean() +* @see #readChar() +*/ +public class Input +{ + /** + * Reads a String from the console. + * @return The typed string + * @see java.lang.String + */ + public static String readString() + { + BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in)); + try {return stdin.readLine(); } + catch (Exception ex) { return "";} + } + + /** + * Reads an Integer from the console. + * @return The typed Integer or 0 if the typed Integer is invalid + * @see java.lang.Integer + */ + public static int readInt() + { + BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in)); + try { return Integer.parseInt(stdin.readLine()); } + catch (Exception ex) { return 0; } + } + + /** + * Reads a Double from the console. + * @return The typed Double or 0 if the typed Double is invalid + * @see java.lang.Double + */ + public static double readDouble() + { + BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in)); + try { return Double.parseDouble(stdin.readLine()); } + catch (Exception ex) { return 0; } + } + + /** + * Reads a boolean from the console. + * @return The typed boolean or false if the typed boolean is other than "true" + */ + public static boolean readBoolean() + { + + BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in)); + try { return (Boolean.valueOf(stdin.readLine())).booleanValue(); } + catch (Exception ex) {return false; } + } + + /** + * Reads a char from the console. + * @return The typed char or the character 0 if the typed char is invalid + */ + public static char readChar() + { + BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in)); + try { return stdin.readLine().charAt(0); } + catch (Exception ex) {return '\0'; } + } +} \ No newline at end of file diff --git a/src/lab1/MyProgram.java b/src/lab1_Introduction/MyProgram.java similarity index 92% rename from src/lab1/MyProgram.java rename to src/lab1_Introduction/MyProgram.java index 73545a2..5489da9 100644 --- a/src/lab1/MyProgram.java +++ b/src/lab1_Introduction/MyProgram.java @@ -1,4 +1,4 @@ -package lab1; +package lab1_Introduction; public class MyProgram { public static void main(String[] args) { diff --git a/src/lab1/RoomCalc.java b/src/lab1_Introduction/RoomCalc.java similarity index 97% rename from src/lab1/RoomCalc.java rename to src/lab1_Introduction/RoomCalc.java index a5fac16..be29201 100644 --- a/src/lab1/RoomCalc.java +++ b/src/lab1_Introduction/RoomCalc.java @@ -1,4 +1,4 @@ -package lab1; +package lab1_Introduction; public class RoomCalc { public static void main(String args[]) diff --git a/src/lab1/sphere.java b/src/lab1_Introduction/sphere.java similarity index 97% rename from src/lab1/sphere.java rename to src/lab1_Introduction/sphere.java index 6a8e1b5..9eda26b 100644 --- a/src/lab1/sphere.java +++ b/src/lab1_Introduction/sphere.java @@ -1,4 +1,4 @@ -package lab1; +package lab1_Introduction; public class sphere { public static void main(String args[]) { diff --git a/src/lab1/swap.java b/src/lab1_Introduction/swap.java similarity index 91% rename from src/lab1/swap.java rename to src/lab1_Introduction/swap.java index 7d1faed..cd37bb0 100644 --- a/src/lab1/swap.java +++ b/src/lab1_Introduction/swap.java @@ -1,4 +1,4 @@ -package lab1; +package lab1_Introduction; public class swap { diff --git a/src/lab2/2-Lab-FR-Datatypes.pdf b/src/lab2_DataTypes/2-Lab-FR-Datatypes.pdf similarity index 100% rename from src/lab2/2-Lab-FR-Datatypes.pdf rename to src/lab2_DataTypes/2-Lab-FR-Datatypes.pdf diff --git a/src/lab3/Input.java b/src/lab2_DataTypes/Input.java similarity index 98% rename from src/lab3/Input.java rename to src/lab2_DataTypes/Input.java index 91a65fa..590417e 100644 --- a/src/lab3/Input.java +++ b/src/lab2_DataTypes/Input.java @@ -1,4 +1,4 @@ -package lab3; +package lab2_DataTypes; import java.io.*; /** diff --git a/src/lab2/Task1.java b/src/lab2_DataTypes/Task1.java similarity index 95% rename from src/lab2/Task1.java rename to src/lab2_DataTypes/Task1.java index b815b11..2b93181 100644 --- a/src/lab2/Task1.java +++ b/src/lab2_DataTypes/Task1.java @@ -1,4 +1,4 @@ -package lab2; +package lab2_DataTypes; public class Task1 { public static void main(String[] args) { diff --git a/src/lab2/TextTools.java b/src/lab2_DataTypes/TextTools.java similarity index 99% rename from src/lab2/TextTools.java rename to src/lab2_DataTypes/TextTools.java index 9eed76a..491cf64 100644 --- a/src/lab2/TextTools.java +++ b/src/lab2_DataTypes/TextTools.java @@ -1,4 +1,4 @@ -package lab2; +package lab2_DataTypes; import java.io.*; /** diff --git a/src/lab2/task2.java b/src/lab2_DataTypes/task2.java similarity index 89% rename from src/lab2/task2.java rename to src/lab2_DataTypes/task2.java index ec6fd28..1450d95 100644 --- a/src/lab2/task2.java +++ b/src/lab2_DataTypes/task2.java @@ -1,4 +1,4 @@ -package lab2; +package lab2_DataTypes; public class task2 { public static void main(String[] args) { double a,b,c; diff --git a/src/lab2/task3.java b/src/lab2_DataTypes/task3.java similarity index 90% rename from src/lab2/task3.java rename to src/lab2_DataTypes/task3.java index fcbd951..7dd81bb 100644 --- a/src/lab2/task3.java +++ b/src/lab2_DataTypes/task3.java @@ -1,4 +1,4 @@ -package lab2; +package lab2_DataTypes; public class task3 { diff --git a/src/lab2/task4.java b/src/lab2_DataTypes/task4.java similarity index 88% rename from src/lab2/task4.java rename to src/lab2_DataTypes/task4.java index 0c8bf7b..70df727 100644 --- a/src/lab2/task4.java +++ b/src/lab2_DataTypes/task4.java @@ -1,4 +1,4 @@ -package lab2; +package lab2_DataTypes; public class task4 { diff --git a/src/lab2/task5.java b/src/lab2_DataTypes/task5.java similarity index 92% rename from src/lab2/task5.java rename to src/lab2_DataTypes/task5.java index 4b5aaca..4ed9e1d 100644 --- a/src/lab2/task5.java +++ b/src/lab2_DataTypes/task5.java @@ -1,4 +1,4 @@ -package lab2; +package lab2_DataTypes; public class task5 { diff --git a/src/lab2/task6.java b/src/lab2_DataTypes/task6.java similarity index 90% rename from src/lab2/task6.java rename to src/lab2_DataTypes/task6.java index 7329766..f6520b1 100644 --- a/src/lab2/task6.java +++ b/src/lab2_DataTypes/task6.java @@ -1,4 +1,4 @@ -package lab2; +package lab2_DataTypes; public class task6 { diff --git a/src/lab2/task7.java b/src/lab2_DataTypes/task7.java similarity index 96% rename from src/lab2/task7.java rename to src/lab2_DataTypes/task7.java index ff265ef..0936883 100644 --- a/src/lab2/task7.java +++ b/src/lab2_DataTypes/task7.java @@ -1,4 +1,4 @@ -package lab2; +package lab2_DataTypes; public class task7 { diff --git a/src/lab2/task8.java b/src/lab2_DataTypes/task8.java similarity index 94% rename from src/lab2/task8.java rename to src/lab2_DataTypes/task8.java index 7c48580..4760020 100644 --- a/src/lab2/task8.java +++ b/src/lab2_DataTypes/task8.java @@ -1,4 +1,4 @@ -package lab2; +package lab2_DataTypes; public class task8 { diff --git a/src/lab3/03-expression-test-loop-fr.pdf b/src/lab3_Loops/03-expression-test-loop-fr.pdf similarity index 100% rename from src/lab3/03-expression-test-loop-fr.pdf rename to src/lab3_Loops/03-expression-test-loop-fr.pdf diff --git a/src/lab3/DrawArrow.java b/src/lab3_Loops/DrawArrow.java similarity index 97% rename from src/lab3/DrawArrow.java rename to src/lab3_Loops/DrawArrow.java index ce74b8a..acb1353 100644 --- a/src/lab3/DrawArrow.java +++ b/src/lab3_Loops/DrawArrow.java @@ -1,4 +1,4 @@ -package lab3; +package lab3_Loops; import hevs.graphics.FunGraphics; import java.awt.Color; diff --git a/src/lab1/Input.java b/src/lab3_Loops/Input.java similarity index 99% rename from src/lab1/Input.java rename to src/lab3_Loops/Input.java index ec93c43..4f55d46 100644 --- a/src/lab1/Input.java +++ b/src/lab3_Loops/Input.java @@ -1,4 +1,4 @@ -package lab1; +package lab3_Loops; import java.io.*; /** diff --git a/src/lab3/SimpleCalculator.java b/src/lab3_Loops/SimpleCalculator.java similarity index 99% rename from src/lab3/SimpleCalculator.java rename to src/lab3_Loops/SimpleCalculator.java index 0f2c1f9..297e496 100644 --- a/src/lab3/SimpleCalculator.java +++ b/src/lab3_Loops/SimpleCalculator.java @@ -1,4 +1,4 @@ -package lab3; +package lab3_Loops; /** * This class offers a simple calculator which computes three standard * operations on two numbers entered with the console diff --git a/src/lab3/task1.java b/src/lab3_Loops/task1.java similarity index 91% rename from src/lab3/task1.java rename to src/lab3_Loops/task1.java index cdad88a..12d3d4e 100644 --- a/src/lab3/task1.java +++ b/src/lab3_Loops/task1.java @@ -1,4 +1,4 @@ -package lab3; +package lab3_Loops; public class task1 { diff --git a/src/lab3/task4.java b/src/lab3_Loops/task4.java similarity index 97% rename from src/lab3/task4.java rename to src/lab3_Loops/task4.java index e73367c..a4b6ebf 100644 --- a/src/lab3/task4.java +++ b/src/lab3_Loops/task4.java @@ -1,4 +1,4 @@ -package lab3; +package lab3_Loops; import hevs.graphics.FunGraphics; import java.awt.Color; diff --git a/src/lab3/task5.java b/src/lab3_Loops/task5.java similarity index 97% rename from src/lab3/task5.java rename to src/lab3_Loops/task5.java index 3a1dfb1..0c9bcd7 100644 --- a/src/lab3/task5.java +++ b/src/lab3_Loops/task5.java @@ -1,4 +1,4 @@ -package lab3; +package lab3_Loops; import hevs.graphics.FunGraphics; import java.awt.Color; diff --git a/src/lab3/task6.java b/src/lab3_Loops/task6.java similarity index 97% rename from src/lab3/task6.java rename to src/lab3_Loops/task6.java index f08d974..6322883 100644 --- a/src/lab3/task6.java +++ b/src/lab3_Loops/task6.java @@ -1,4 +1,4 @@ -package lab3; +package lab3_Loops; import hevs.graphics.FunGraphics; import java.awt.Color; diff --git a/src/lab3/task7.java b/src/lab3_Loops/task7.java similarity index 97% rename from src/lab3/task7.java rename to src/lab3_Loops/task7.java index c94cbb3..ccc6e44 100644 --- a/src/lab3/task7.java +++ b/src/lab3_Loops/task7.java @@ -1,4 +1,4 @@ -package lab3; +package lab3_Loops; import hevs.graphics.FunGraphics; //import java.awt.Color; diff --git a/src/lab4/05-functions-fr.pdf b/src/lab4_Fonctions/05-functions-fr.pdf similarity index 100% rename from src/lab4/05-functions-fr.pdf rename to src/lab4_Fonctions/05-functions-fr.pdf diff --git a/src/lab4/DottedFlag.java b/src/lab4_Fonctions/DottedFlag.java similarity index 99% rename from src/lab4/DottedFlag.java rename to src/lab4_Fonctions/DottedFlag.java index 6792c73..7535585 100644 --- a/src/lab4/DottedFlag.java +++ b/src/lab4_Fonctions/DottedFlag.java @@ -1,4 +1,4 @@ -package lab4; +package lab4_Fonctions; import hevs.graphics.FunGraphics; import hevs.utils.Input; diff --git a/src/lab4/Input.java b/src/lab4_Fonctions/Input.java similarity index 98% rename from src/lab4/Input.java rename to src/lab4_Fonctions/Input.java index 93c4b49..764184d 100644 --- a/src/lab4/Input.java +++ b/src/lab4_Fonctions/Input.java @@ -1,4 +1,4 @@ -package lab4; +package lab4_Fonctions; import java.io.*; /** diff --git a/src/lab4/StringFunctions.java b/src/lab4_Fonctions/StringFunctions.java similarity index 94% rename from src/lab4/StringFunctions.java rename to src/lab4_Fonctions/StringFunctions.java index aafd5d8..09110ca 100644 --- a/src/lab4/StringFunctions.java +++ b/src/lab4_Fonctions/StringFunctions.java @@ -1,4 +1,4 @@ -package lab4; +package lab4_Fonctions; public class StringFunctions { /** * @param s diff --git a/src/lab4/task1.java b/src/lab4_Fonctions/task1.java similarity index 97% rename from src/lab4/task1.java rename to src/lab4_Fonctions/task1.java index 962660d..13c7f7b 100644 --- a/src/lab4/task1.java +++ b/src/lab4_Fonctions/task1.java @@ -1,4 +1,4 @@ -package lab4; +package lab4_Fonctions; public class task1 { diff --git a/src/lab4/task2.java b/src/lab4_Fonctions/task2.java similarity index 89% rename from src/lab4/task2.java rename to src/lab4_Fonctions/task2.java index f3c321f..ca662ef 100644 --- a/src/lab4/task2.java +++ b/src/lab4_Fonctions/task2.java @@ -1,4 +1,4 @@ -package lab4; +package lab4_Fonctions; public class task2 { public static void main(String[] args) { diff --git a/src/lab4/task3.java b/src/lab4_Fonctions/task3.java similarity index 97% rename from src/lab4/task3.java rename to src/lab4_Fonctions/task3.java index e6444e1..f887f31 100644 --- a/src/lab4/task3.java +++ b/src/lab4_Fonctions/task3.java @@ -1,4 +1,4 @@ -package lab4; +package lab4_Fonctions; public class task3 { diff --git a/src/lab5/06_SecretNumber_FR.pdf b/src/lab5_SecretNumber/06_SecretNumber_FR.pdf similarity index 100% rename from src/lab5/06_SecretNumber_FR.pdf rename to src/lab5_SecretNumber/06_SecretNumber_FR.pdf diff --git a/src/lab6/Dialogs.java b/src/lab5_SecretNumber/Dialogs.java similarity index 98% rename from src/lab6/Dialogs.java rename to src/lab5_SecretNumber/Dialogs.java index 35642dd..2cefee4 100644 --- a/src/lab6/Dialogs.java +++ b/src/lab5_SecretNumber/Dialogs.java @@ -1,4 +1,4 @@ -package lab6; +package lab5_SecretNumber; import javax.swing.JFrame; import javax.swing.JOptionPane; import javax.swing.JPasswordField; diff --git a/src/lab5/Input.java b/src/lab5_SecretNumber/Input.java similarity index 99% rename from src/lab5/Input.java rename to src/lab5_SecretNumber/Input.java index 08a3687..bb19e28 100644 --- a/src/lab5/Input.java +++ b/src/lab5_SecretNumber/Input.java @@ -1,4 +1,4 @@ -package lab5; +package lab5_SecretNumber; import java.io.*; /** diff --git a/src/lab5/secretNumber.java b/src/lab5_SecretNumber/secretNumber.java similarity index 99% rename from src/lab5/secretNumber.java rename to src/lab5_SecretNumber/secretNumber.java index 1f90144..31552de 100644 --- a/src/lab5/secretNumber.java +++ b/src/lab5_SecretNumber/secretNumber.java @@ -1,4 +1,4 @@ -package lab5; +package lab5_SecretNumber; import hevs.utils.Input; diff --git a/src/lab6/Input.java b/src/lab6/Input.java deleted file mode 100644 index 1df6d27..0000000 --- a/src/lab6/Input.java +++ /dev/null @@ -1,74 +0,0 @@ -package lab6; -import java.io.*; - -/** -* The Class Input is here to enter data with the keyboard.
-* The types below are supported by the Input class.

-* - String
- Integer (int)
- Double (double) - Boolean (boolean)
- Character (char)


-* @see #readString() -* @see #readInt() -* @see #readDouble() -* @see #readBoolean() -* @see #readChar() -*/ -public class Input -{ - /** - * Reads a String from the console. - * @return The typed string - * @see java.lang.String - */ - public static String readString() - { - BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in)); - try {return stdin.readLine(); } - catch (Exception ex) { return "";} - } - - /** - * Reads an Integer from the console. - * @return The typed Integer or 0 if the typed Integer is invalid - * @see java.lang.Integer - */ - public static int readInt() - { - BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in)); - try { return Integer.parseInt(stdin.readLine()); } - catch (Exception ex) { return 0; } - } - - /** - * Reads a Double from the console. - * @return The typed Double or 0 if the typed Double is invalid - * @see java.lang.Double - */ - public static double readDouble() - { - BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in)); - try { return Double.parseDouble(stdin.readLine()); } - catch (Exception ex) { return 0; } - } - - /** - * Reads a boolean from the console. - * @return The typed boolean or false if the typed boolean is other than "true" - */ - public static boolean readBoolean() - { - - BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in)); - try { return (Boolean.valueOf(stdin.readLine())).booleanValue(); } - catch (Exception ex) {return false; } - } - - /** - * Reads a char from the console. - * @return The typed char or the character 0 if the typed char is invalid - */ - public static char readChar() - { - BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in)); - try { return stdin.readLine().charAt(0); } - catch (Exception ex) {return '\0'; } - } -} \ No newline at end of file diff --git a/src/lab6/07-HangMan_FR.pdf b/src/lab6_Hangman/07-HangMan_FR.pdf similarity index 100% rename from src/lab6/07-HangMan_FR.pdf rename to src/lab6_Hangman/07-HangMan_FR.pdf diff --git a/src/lab5/Dialogs.java b/src/lab6_Hangman/Dialogs.java similarity index 98% rename from src/lab5/Dialogs.java rename to src/lab6_Hangman/Dialogs.java index 9241ef2..0326ae6 100644 --- a/src/lab5/Dialogs.java +++ b/src/lab6_Hangman/Dialogs.java @@ -1,4 +1,4 @@ -package lab5; +package lab6_Hangman; import javax.swing.JFrame; import javax.swing.JOptionPane; import javax.swing.JPasswordField; diff --git a/src/lab6/HangMan.java b/src/lab6_Hangman/HangMan.java similarity index 99% rename from src/lab6/HangMan.java rename to src/lab6_Hangman/HangMan.java index 1aeb819..d37a360 100644 --- a/src/lab6/HangMan.java +++ b/src/lab6_Hangman/HangMan.java @@ -1,4 +1,4 @@ -package lab6; +package lab6_Hangman; import java.awt.Color; diff --git a/src/lab2/Input.java b/src/lab6_Hangman/Input.java similarity index 98% rename from src/lab2/Input.java rename to src/lab6_Hangman/Input.java index 6434b53..eb74292 100644 --- a/src/lab2/Input.java +++ b/src/lab6_Hangman/Input.java @@ -1,4 +1,4 @@ -package lab2; +package lab6_Hangman; import java.io.*; /** diff --git a/src/lab6/Lexique.csv b/src/lab6_Hangman/Lexique.csv similarity index 100% rename from src/lab6/Lexique.csv rename to src/lab6_Hangman/Lexique.csv diff --git a/src/lab6/Lexique382.csv b/src/lab6_Hangman/Lexique382.csv similarity index 100% rename from src/lab6/Lexique382.csv rename to src/lab6_Hangman/Lexique382.csv diff --git a/src/lab6/Person.java b/src/lab6_Hangman/Person.java similarity index 96% rename from src/lab6/Person.java rename to src/lab6_Hangman/Person.java index fce5b1e..86adf66 100644 --- a/src/lab6/Person.java +++ b/src/lab6_Hangman/Person.java @@ -1,4 +1,4 @@ -package lab6; +package lab6_Hangman; public class Person { String surname = ""; diff --git a/src/lab6/Task1.java b/src/lab6_Hangman/Task1.java similarity index 94% rename from src/lab6/Task1.java rename to src/lab6_Hangman/Task1.java index e538352..d1df413 100644 --- a/src/lab6/Task1.java +++ b/src/lab6_Hangman/Task1.java @@ -1,4 +1,4 @@ -package lab6; +package lab6_Hangman; public class Task1 { public static void main(String[] args) { diff --git a/src/lab6/WordManager.java b/src/lab6_Hangman/WordManager.java similarity index 99% rename from src/lab6/WordManager.java rename to src/lab6_Hangman/WordManager.java index 5da8dbe..c4f7159 100644 --- a/src/lab6/WordManager.java +++ b/src/lab6_Hangman/WordManager.java @@ -1,4 +1,4 @@ -package lab6; +package lab6_Hangman; import java.text.Normalizer; import java.io.BufferedReader; import java.io.FileReader; diff --git a/src/lab6/french_common_words.csv b/src/lab6_Hangman/french_common_words.csv similarity index 100% rename from src/lab6/french_common_words.csv rename to src/lab6_Hangman/french_common_words.csv diff --git a/src/lab6/french_dictionary.txt b/src/lab6_Hangman/french_dictionary.txt similarity index 100% rename from src/lab6/french_dictionary.txt rename to src/lab6_Hangman/french_dictionary.txt diff --git a/src/lab6/mots.csv b/src/lab6_Hangman/mots.csv similarity index 100% rename from src/lab6/mots.csv rename to src/lab6_Hangman/mots.csv diff --git a/src/lab6/mots.xlsx b/src/lab6_Hangman/mots.xlsx similarity index 100% rename from src/lab6/mots.xlsx rename to src/lab6_Hangman/mots.xlsx diff --git a/src/lab6/mots_beginner.csv b/src/lab6_Hangman/mots_beginner.csv similarity index 100% rename from src/lab6/mots_beginner.csv rename to src/lab6_Hangman/mots_beginner.csv diff --git a/src/lab6/mots_difficult.csv b/src/lab6_Hangman/mots_difficult.csv similarity index 100% rename from src/lab6/mots_difficult.csv rename to src/lab6_Hangman/mots_difficult.csv diff --git a/src/lab6/mots_easy.csv b/src/lab6_Hangman/mots_easy.csv similarity index 100% rename from src/lab6/mots_easy.csv rename to src/lab6_Hangman/mots_easy.csv diff --git a/src/lab6/mots_hardcore.csv b/src/lab6_Hangman/mots_hardcore.csv similarity index 100% rename from src/lab6/mots_hardcore.csv rename to src/lab6_Hangman/mots_hardcore.csv diff --git a/src/lab6/mots_medium.csv b/src/lab6_Hangman/mots_medium.csv similarity index 100% rename from src/lab6/mots_medium.csv rename to src/lab6_Hangman/mots_medium.csv