diff --git a/.gitignore b/.gitignore deleted file mode 100644 index cd531cf..0000000 --- a/.gitignore +++ /dev/null @@ -1,54 +0,0 @@ -# ---> C -# Prerequisites -*.d - -# Object files -*.o -*.ko -*.obj -*.elf - -# Linker output -*.ilk -*.map -*.exp - -# Precompiled Headers -*.gch -*.pch - -# Libraries -*.lib -*.a -*.la -*.lo - -# Shared objects (inc. Windows DLLs) -*.dll -*.so -*.so.* -*.dylib - -# Executables -*.exe -*.out -*.app -*.i*86 -*.x86_64 -*.hex - -# Debug files -*.dSYM/ -*.su -*.idb -*.pdb - -# Kernel Module Compile Results -*.mod* -*.cmd -.tmp_versions/ -modules.order -Module.symvers -Mkfile.old -dkms.conf - diff --git a/BUT1/CONTROLE/controle.md b/BUT1/CONTROLE/controle.md index 81a4221..27c825a 100644 --- a/BUT1/CONTROLE/controle.md +++ b/BUT1/CONTROLE/controle.md @@ -1,5 +1,5 @@ Contrôle n°1 : 17/20 -Contrôle n°2 : 15.25/20 +Contrôle n°2 : 15.25/20 ! plusieurs programmes qui ne fonctionne pas ! -Contrôle n°3 : 18.25/20 \ No newline at end of file +Contrôle n°3 : 18.25/20 ! plusieurs programmes qui ne fonctionne pas ! -> EXO 1 = remplacer ... == 3 par ... == '3' \ No newline at end of file diff --git a/BUT1/DEV1.1/CM2 2022/1/repetition b/BUT1/DEV1.1/CM2 2022/1/repetition old mode 100755 new mode 100644 diff --git a/BUT1/DEV1.1/CM2_2/CM2/carre b/BUT1/DEV1.1/CM2_2/CM2/carre old mode 100755 new mode 100644 diff --git a/BUT1/DEV1.1/CM2_2/EntrainementDS2/SUJET1 /EXO 1/.vscode/c_cpp_properties.json b/BUT1/DEV1.1/CM2_2/EntrainementDS2/SUJET1 /EXO 1/.vscode/c_cpp_properties.json deleted file mode 100644 index c2098a2..0000000 --- a/BUT1/DEV1.1/CM2_2/EntrainementDS2/SUJET1 /EXO 1/.vscode/c_cpp_properties.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "configurations": [ - { - "name": "linux-gcc-x64", - "includePath": [ - "${workspaceFolder}/**" - ], - "compilerPath": "/usr/bin/gcc", - "cStandard": "${default}", - "cppStandard": "${default}", - "intelliSenseMode": "linux-gcc-x64", - "compilerArgs": [ - "" - ] - } - ], - "version": 4 -} \ No newline at end of file diff --git a/BUT1/DEV1.1/CM2_2/EntrainementDS2/SUJET1 /EXO 1/.vscode/launch.json b/BUT1/DEV1.1/CM2_2/EntrainementDS2/SUJET1 /EXO 1/.vscode/launch.json deleted file mode 100644 index b271c7a..0000000 --- a/BUT1/DEV1.1/CM2_2/EntrainementDS2/SUJET1 /EXO 1/.vscode/launch.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "version": "0.2.0", - "configurations": [ - { - "name": "C/C++ Runner: Debug Session", - "type": "cppdbg", - "request": "launch", - "args": [], - "stopAtEntry": false, - "externalConsole": false, - "cwd": "/export/home/an23/stiti/Desktop/EntrainementDS2/SUJET1 /EXO 1", - "program": "/export/home/an23/stiti/Desktop/EntrainementDS2/SUJET1 /EXO 1/build/Debug/outDebug", - "MIMode": "gdb", - "miDebuggerPath": "gdb", - "setupCommands": [ - { - "description": "Enable pretty-printing for gdb", - "text": "-enable-pretty-printing", - "ignoreFailures": true - } - ] - } - ] -} \ No newline at end of file diff --git a/BUT1/DEV1.1/CM2_2/EntrainementDS2/SUJET1 /EXO 1/.vscode/settings.json b/BUT1/DEV1.1/CM2_2/EntrainementDS2/SUJET1 /EXO 1/.vscode/settings.json deleted file mode 100644 index bfd7745..0000000 --- a/BUT1/DEV1.1/CM2_2/EntrainementDS2/SUJET1 /EXO 1/.vscode/settings.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "C_Cpp_Runner.cCompilerPath": "gcc", - "C_Cpp_Runner.cppCompilerPath": "g++", - "C_Cpp_Runner.debuggerPath": "gdb", - "C_Cpp_Runner.cStandard": "", - "C_Cpp_Runner.cppStandard": "", - "C_Cpp_Runner.msvcBatchPath": "", - "C_Cpp_Runner.useMsvc": false, - "C_Cpp_Runner.warnings": [ - "-Wall", - "-Wextra", - "-Wpedantic", - "-Wshadow", - "-Wformat=2", - "-Wconversion", - "-Wnull-dereference", - "-Wsign-conversion" - ], - "C_Cpp_Runner.enableWarnings": true, - "C_Cpp_Runner.warningsAsError": false, - "C_Cpp_Runner.compilerArgs": [], - "C_Cpp_Runner.linkerArgs": [], - "C_Cpp_Runner.includePaths": [], - "C_Cpp_Runner.includeSearch": [ - "*", - "**/*" - ], - "C_Cpp_Runner.excludeSearch": [ - "**/build", - "**/build/**", - "**/.*", - "**/.*/**", - "**/.vscode", - "**/.vscode/**" - ], - "C_Cpp_Runner.useAddressSanitizer": false -} \ No newline at end of file diff --git a/BUT1/DEV1.1/CM2_2/EntrainementDS2/SUJET1 /EXO 1/Makefile b/BUT1/DEV1.1/CM2_2/EntrainementDS2/SUJET1 /EXO 1/Makefile deleted file mode 100644 index e202ac3..0000000 --- a/BUT1/DEV1.1/CM2_2/EntrainementDS2/SUJET1 /EXO 1/Makefile +++ /dev/null @@ -1,14 +0,0 @@ -# BUT PRINCIPAL -repetition_ou_pas : main.o repetition.o - gcc -ansi -pedantic -o repetition_ou_pas repetition.o main.o - -repetition.o : repetition.c - gcc -ansi -pedantic -c repetition.c - -main.o : main.c repetition.h - gcc -ansi -pedantic -c main.c - -clean : - rm -f main.o repetition.o - -.PHONY : clean \ No newline at end of file diff --git a/BUT1/DEV1.1/CM2_2/EntrainementDS2/SUJET1 /EXO 1/main.c b/BUT1/DEV1.1/CM2_2/EntrainementDS2/SUJET1 /EXO 1/main.c deleted file mode 100644 index 4faca23..0000000 --- a/BUT1/DEV1.1/CM2_2/EntrainementDS2/SUJET1 /EXO 1/main.c +++ /dev/null @@ -1,25 +0,0 @@ -#include -#include -#include "../EXO 1/repetition.h" - - -int main(int argc,char* argv[]){ /* Ou "char** argv" */ - int i; - long* tab; - tab = (long*) malloc(argc*sizeof(long)); - /* Création d'un tableau de argc - 1 élément (Autrement dit, création d'un tableau du nombre d'éléments donner en argument au programme sans compter le a.out)*/ - for(i=1;i -#include - -int repetition(long tab[], int taille){ - int i; - for(i=0;i -#include - -int main(void){ - FILE* fichier; - char couleur; - int i,a=5; - fichier = fopen("image","r"); - if(fichier==NULL){ - fputs("Erreur d'ouverture du fichier",stderr); - return EXIT_FAILURE; - }else{ - while(feof(fichier)!=1){ - a = fread(&couleur,1,1,fichier); - if(couleur == 0){ - printf("\n"); - }else{ - printf("\33[48;5;%hhum \33[m",couleur); - } - } - - } - - fclose(fichier); - return EXIT_SUCCESS; -} diff --git a/BUT1/DEV1.1/CM2_2/EntrainementDS2/SUJET1 /EXO2/image b/BUT1/DEV1.1/CM2_2/EntrainementDS2/SUJET1 /EXO2/image deleted file mode 100644 index d2ac982..0000000 Binary files a/BUT1/DEV1.1/CM2_2/EntrainementDS2/SUJET1 /EXO2/image and /dev/null differ diff --git a/BUT1/DEV1.1/CM2_2/EntrainementDS2/SUJET1 /EXO2/image(2) b/BUT1/DEV1.1/CM2_2/EntrainementDS2/SUJET1 /EXO2/image(2) deleted file mode 100644 index d2ac982..0000000 Binary files a/BUT1/DEV1.1/CM2_2/EntrainementDS2/SUJET1 /EXO2/image(2) and /dev/null differ diff --git a/BUT1/DEV1.1/CM2_2/EntrainementDS2/SUJET1 /EXO3/exo3.c b/BUT1/DEV1.1/CM2_2/EntrainementDS2/SUJET1 /EXO3/exo3.c deleted file mode 100644 index ca40af6..0000000 --- a/BUT1/DEV1.1/CM2_2/EntrainementDS2/SUJET1 /EXO3/exo3.c +++ /dev/null @@ -1,23 +0,0 @@ -#include -#include -#include -#include - -int main(void){ - int i; - - struct timeval tv1; - struct timeval tv2; - - gettimeofday(&tv1,NULL); - - for(i=0;i<1000000;i++){ - sqrt(2); - } - - gettimeofday(&tv2,NULL); - - printf("%dμs",tv2.tv_usec-tv1.tv_usec); - - return EXIT_SUCCESS; -} \ No newline at end of file diff --git a/BUT1/DEV1.1/CM2_2/EntrainementDS2/SUJET1 /Lenny/main.c b/BUT1/DEV1.1/CM2_2/EntrainementDS2/SUJET1 /Lenny/main.c deleted file mode 100644 index e69de29..0000000 diff --git a/BUT1/DEV1.1/CM2_2/EntrainementDS2/SUJET1 /Lenny/nom1.c b/BUT1/DEV1.1/CM2_2/EntrainementDS2/SUJET1 /Lenny/nom1.c deleted file mode 100644 index e69de29..0000000 diff --git a/BUT1/DEV1.1/CM2_2/EntrainementDS2/SUJET2/EXO1/valeurs_nulles b/BUT1/DEV1.1/CM2_2/EntrainementDS2/SUJET2/EXO1/valeurs_nulles old mode 100755 new mode 100644 diff --git a/BUT1/DEV1.1/CM2_2/EntrainementDS2/SUJET2/EXO1/valeurs_nulles_ou_pas b/BUT1/DEV1.1/CM2_2/EntrainementDS2/SUJET2/EXO1/valeurs_nulles_ou_pas old mode 100755 new mode 100644 diff --git a/BUT1/DEV1.1/Organisation_code/exo1/exo1 b/BUT1/DEV1.1/Organisation_code/exo1/exo1 old mode 100755 new mode 100644 diff --git a/BUT1/DEV1.1/hello_world b/BUT1/DEV1.1/hello_world old mode 100755 new mode 100644 diff --git a/BUT1/DEV1.3/EXO3/css.svg b/BUT1/DEV1.2/TP3/EXO3/css.svg similarity index 100% rename from BUT1/DEV1.3/EXO3/css.svg rename to BUT1/DEV1.2/TP3/EXO3/css.svg diff --git a/BUT1/DEV1.3/EXO3/exo3.css b/BUT1/DEV1.2/TP3/EXO3/exo3.css similarity index 100% rename from BUT1/DEV1.3/EXO3/exo3.css rename to BUT1/DEV1.2/TP3/EXO3/exo3.css diff --git a/BUT1/DEV1.3/EXO3/exo3.html b/BUT1/DEV1.2/TP3/EXO3/exo3.html similarity index 100% rename from BUT1/DEV1.3/EXO3/exo3.html rename to BUT1/DEV1.2/TP3/EXO3/exo3.html diff --git a/BUT1/DEV1.3/EXO3/html.svg b/BUT1/DEV1.2/TP3/EXO3/html.svg similarity index 100% rename from BUT1/DEV1.3/EXO3/html.svg rename to BUT1/DEV1.2/TP3/EXO3/html.svg diff --git a/BUT1/DEV1.3/EXO3/js.svg b/BUT1/DEV1.2/TP3/EXO3/js.svg similarity index 100% rename from BUT1/DEV1.3/EXO3/js.svg rename to BUT1/DEV1.2/TP3/EXO3/js.svg diff --git a/BUT1/DEV1.3/exo1.css b/BUT1/DEV1.2/TP3/exo1.css similarity index 100% rename from BUT1/DEV1.3/exo1.css rename to BUT1/DEV1.2/TP3/exo1.css diff --git a/BUT1/DEV1.3/exo1.html b/BUT1/DEV1.2/TP3/exo1.html similarity index 100% rename from BUT1/DEV1.3/exo1.html rename to BUT1/DEV1.2/TP3/exo1.html diff --git a/BUT1/DEV1.3/exo2.css b/BUT1/DEV1.2/TP3/exo2.css similarity index 100% rename from BUT1/DEV1.3/exo2.css rename to BUT1/DEV1.2/TP3/exo2.css diff --git a/BUT1/DEV1.3/exo2.html b/BUT1/DEV1.2/TP3/exo2.html similarity index 100% rename from BUT1/DEV1.3/exo2.html rename to BUT1/DEV1.2/TP3/exo2.html diff --git a/BUT1/DEV2.2/.DS_Store b/BUT1/DEV2.1/.DS_Store similarity index 100% rename from BUT1/DEV2.2/.DS_Store rename to BUT1/DEV2.1/.DS_Store diff --git a/BUT1/DEV2.2/TEMPLATE.JAVA b/BUT1/DEV2.1/TEMPLATE.JAVA similarity index 100% rename from BUT1/DEV2.2/TEMPLATE.JAVA rename to BUT1/DEV2.1/TEMPLATE.JAVA diff --git a/BUT1/DEV2.2/TP1-Introduction/EXO 2/Exo2.class b/BUT1/DEV2.1/TP1-Introduction/EXO 2/Exo2.class similarity index 100% rename from BUT1/DEV2.2/TP1-Introduction/EXO 2/Exo2.class rename to BUT1/DEV2.1/TP1-Introduction/EXO 2/Exo2.class diff --git a/BUT1/DEV2.2/TP1-Introduction/EXO 2/Exo2.java b/BUT1/DEV2.1/TP1-Introduction/EXO 2/Exo2.java similarity index 100% rename from BUT1/DEV2.2/TP1-Introduction/EXO 2/Exo2.java rename to BUT1/DEV2.1/TP1-Introduction/EXO 2/Exo2.java diff --git a/BUT1/DEV2.2/TP1-Introduction/EXO 3/exo3.class b/BUT1/DEV2.1/TP1-Introduction/EXO 3/exo3.class similarity index 100% rename from BUT1/DEV2.2/TP1-Introduction/EXO 3/exo3.class rename to BUT1/DEV2.1/TP1-Introduction/EXO 3/exo3.class diff --git a/BUT1/DEV2.2/TP1-Introduction/EXO 3/exo3.java b/BUT1/DEV2.1/TP1-Introduction/EXO 3/exo3.java similarity index 100% rename from BUT1/DEV2.2/TP1-Introduction/EXO 3/exo3.java rename to BUT1/DEV2.1/TP1-Introduction/EXO 3/exo3.java diff --git a/BUT1/DEV2.2/TP1-Introduction/EXO 4/exo4.class b/BUT1/DEV2.1/TP1-Introduction/EXO 4/exo4.class similarity index 100% rename from BUT1/DEV2.2/TP1-Introduction/EXO 4/exo4.class rename to BUT1/DEV2.1/TP1-Introduction/EXO 4/exo4.class diff --git a/BUT1/DEV2.2/TP1-Introduction/EXO 4/exo4.java b/BUT1/DEV2.1/TP1-Introduction/EXO 4/exo4.java similarity index 100% rename from BUT1/DEV2.2/TP1-Introduction/EXO 4/exo4.java rename to BUT1/DEV2.1/TP1-Introduction/EXO 4/exo4.java diff --git a/BUT1/DEV2.2/TP1-Introduction/EXO 5/exo5.class b/BUT1/DEV2.1/TP1-Introduction/EXO 5/exo5.class similarity index 100% rename from BUT1/DEV2.2/TP1-Introduction/EXO 5/exo5.class rename to BUT1/DEV2.1/TP1-Introduction/EXO 5/exo5.class diff --git a/BUT1/DEV2.2/TP1-Introduction/EXO 5/exo5.java b/BUT1/DEV2.1/TP1-Introduction/EXO 5/exo5.java similarity index 100% rename from BUT1/DEV2.2/TP1-Introduction/EXO 5/exo5.java rename to BUT1/DEV2.1/TP1-Introduction/EXO 5/exo5.java diff --git a/BUT1/DEV2.2/TP2-ComposantsGraphique/.DS_Store b/BUT1/DEV2.1/TP2-ComposantsGraphique/.DS_Store similarity index 100% rename from BUT1/DEV2.2/TP2-ComposantsGraphique/.DS_Store rename to BUT1/DEV2.1/TP2-ComposantsGraphique/.DS_Store diff --git a/BUT1/DEV2.2/TP2-ComposantsGraphique/EXO1/exo1.class b/BUT1/DEV2.1/TP2-ComposantsGraphique/EXO1/exo1.class similarity index 100% rename from BUT1/DEV2.2/TP2-ComposantsGraphique/EXO1/exo1.class rename to BUT1/DEV2.1/TP2-ComposantsGraphique/EXO1/exo1.class diff --git a/BUT1/DEV2.2/TP2-ComposantsGraphique/EXO1/exo1.java b/BUT1/DEV2.1/TP2-ComposantsGraphique/EXO1/exo1.java similarity index 100% rename from BUT1/DEV2.2/TP2-ComposantsGraphique/EXO1/exo1.java rename to BUT1/DEV2.1/TP2-ComposantsGraphique/EXO1/exo1.java diff --git a/BUT1/DEV2.2/TP2-ComposantsGraphique/EXO2/exo2.class b/BUT1/DEV2.1/TP2-ComposantsGraphique/EXO2/exo2.class similarity index 100% rename from BUT1/DEV2.2/TP2-ComposantsGraphique/EXO2/exo2.class rename to BUT1/DEV2.1/TP2-ComposantsGraphique/EXO2/exo2.class diff --git a/BUT1/DEV2.2/TP2-ComposantsGraphique/EXO2/exo2.java b/BUT1/DEV2.1/TP2-ComposantsGraphique/EXO2/exo2.java similarity index 100% rename from BUT1/DEV2.2/TP2-ComposantsGraphique/EXO2/exo2.java rename to BUT1/DEV2.1/TP2-ComposantsGraphique/EXO2/exo2.java diff --git a/BUT1/DEV2.2/TP2-ComposantsGraphique/EXO3/exo3.class b/BUT1/DEV2.1/TP2-ComposantsGraphique/EXO3/exo3.class similarity index 100% rename from BUT1/DEV2.2/TP2-ComposantsGraphique/EXO3/exo3.class rename to BUT1/DEV2.1/TP2-ComposantsGraphique/EXO3/exo3.class diff --git a/BUT1/DEV2.2/TP2-ComposantsGraphique/EXO3/exo3.java b/BUT1/DEV2.1/TP2-ComposantsGraphique/EXO3/exo3.java similarity index 100% rename from BUT1/DEV2.2/TP2-ComposantsGraphique/EXO3/exo3.java rename to BUT1/DEV2.1/TP2-ComposantsGraphique/EXO3/exo3.java diff --git a/BUT1/DEV2.2/TP2-ComposantsGraphique/EXO4/exo4.class b/BUT1/DEV2.1/TP2-ComposantsGraphique/EXO4/exo4.class similarity index 100% rename from BUT1/DEV2.2/TP2-ComposantsGraphique/EXO4/exo4.class rename to BUT1/DEV2.1/TP2-ComposantsGraphique/EXO4/exo4.class diff --git a/BUT1/DEV2.2/TP2-ComposantsGraphique/EXO4/exo4.java b/BUT1/DEV2.1/TP2-ComposantsGraphique/EXO4/exo4.java similarity index 100% rename from BUT1/DEV2.2/TP2-ComposantsGraphique/EXO4/exo4.java rename to BUT1/DEV2.1/TP2-ComposantsGraphique/EXO4/exo4.java diff --git a/BUT1/DEV2.2/TP2-ComposantsGraphique/EXO5/exo5.class b/BUT1/DEV2.1/TP2-ComposantsGraphique/EXO5/exo5.class similarity index 100% rename from BUT1/DEV2.2/TP2-ComposantsGraphique/EXO5/exo5.class rename to BUT1/DEV2.1/TP2-ComposantsGraphique/EXO5/exo5.class diff --git a/BUT1/DEV2.2/TP2-ComposantsGraphique/EXO5/exo5.java b/BUT1/DEV2.1/TP2-ComposantsGraphique/EXO5/exo5.java similarity index 100% rename from BUT1/DEV2.2/TP2-ComposantsGraphique/EXO5/exo5.java rename to BUT1/DEV2.1/TP2-ComposantsGraphique/EXO5/exo5.java diff --git a/BUT1/DEV2.2/TP3-MiseEnPage/EXO1/exo1.class b/BUT1/DEV2.1/TP3-MiseEnPage/EXO1/exo1.class similarity index 100% rename from BUT1/DEV2.2/TP3-MiseEnPage/EXO1/exo1.class rename to BUT1/DEV2.1/TP3-MiseEnPage/EXO1/exo1.class diff --git a/BUT1/DEV2.2/TP3-MiseEnPage/EXO1/exo1.java b/BUT1/DEV2.1/TP3-MiseEnPage/EXO1/exo1.java similarity index 100% rename from BUT1/DEV2.2/TP3-MiseEnPage/EXO1/exo1.java rename to BUT1/DEV2.1/TP3-MiseEnPage/EXO1/exo1.java diff --git a/BUT1/DEV2.2/TP3-MiseEnPage/EXO2/exo2.class b/BUT1/DEV2.1/TP3-MiseEnPage/EXO2/exo2.class similarity index 100% rename from BUT1/DEV2.2/TP3-MiseEnPage/EXO2/exo2.class rename to BUT1/DEV2.1/TP3-MiseEnPage/EXO2/exo2.class diff --git a/BUT1/DEV2.2/TP3-MiseEnPage/EXO2/exo2.java b/BUT1/DEV2.1/TP3-MiseEnPage/EXO2/exo2.java similarity index 100% rename from BUT1/DEV2.2/TP3-MiseEnPage/EXO2/exo2.java rename to BUT1/DEV2.1/TP3-MiseEnPage/EXO2/exo2.java diff --git a/BUT1/DEV2.2/TP3-MiseEnPage/EXO3/exo3.class b/BUT1/DEV2.1/TP3-MiseEnPage/EXO3/exo3.class similarity index 100% rename from BUT1/DEV2.2/TP3-MiseEnPage/EXO3/exo3.class rename to BUT1/DEV2.1/TP3-MiseEnPage/EXO3/exo3.class diff --git a/BUT1/DEV2.2/TP3-MiseEnPage/EXO3/exo3.java b/BUT1/DEV2.1/TP3-MiseEnPage/EXO3/exo3.java similarity index 100% rename from BUT1/DEV2.2/TP3-MiseEnPage/EXO3/exo3.java rename to BUT1/DEV2.1/TP3-MiseEnPage/EXO3/exo3.java diff --git a/BUT1/DEV2.2/TP3-MiseEnPage/EXO4/exo4.class b/BUT1/DEV2.1/TP3-MiseEnPage/EXO4/exo4.class similarity index 100% rename from BUT1/DEV2.2/TP3-MiseEnPage/EXO4/exo4.class rename to BUT1/DEV2.1/TP3-MiseEnPage/EXO4/exo4.class diff --git a/BUT1/DEV2.2/TP3-MiseEnPage/EXO4/exo4.java b/BUT1/DEV2.1/TP3-MiseEnPage/EXO4/exo4.java similarity index 100% rename from BUT1/DEV2.2/TP3-MiseEnPage/EXO4/exo4.java rename to BUT1/DEV2.1/TP3-MiseEnPage/EXO4/exo4.java diff --git a/BUT1/DEV2.2/TP4-ClassesEtObjets/EXO1/binaire.class b/BUT1/DEV2.1/TP4-ClassesEtObjets/EXO1/binaire.class similarity index 100% rename from BUT1/DEV2.2/TP4-ClassesEtObjets/EXO1/binaire.class rename to BUT1/DEV2.1/TP4-ClassesEtObjets/EXO1/binaire.class diff --git a/BUT1/DEV2.2/TP4-ClassesEtObjets/EXO1/binaire.java b/BUT1/DEV2.1/TP4-ClassesEtObjets/EXO1/binaire.java similarity index 100% rename from BUT1/DEV2.2/TP4-ClassesEtObjets/EXO1/binaire.java rename to BUT1/DEV2.1/TP4-ClassesEtObjets/EXO1/binaire.java diff --git a/BUT1/DEV2.2/TP4-ClassesEtObjets/EXO1/compteur.class b/BUT1/DEV2.1/TP4-ClassesEtObjets/EXO1/compteur.class similarity index 100% rename from BUT1/DEV2.2/TP4-ClassesEtObjets/EXO1/compteur.class rename to BUT1/DEV2.1/TP4-ClassesEtObjets/EXO1/compteur.class diff --git a/BUT1/DEV2.2/TP4-ClassesEtObjets/EXO1/compteur.java b/BUT1/DEV2.1/TP4-ClassesEtObjets/EXO1/compteur.java similarity index 100% rename from BUT1/DEV2.2/TP4-ClassesEtObjets/EXO1/compteur.java rename to BUT1/DEV2.1/TP4-ClassesEtObjets/EXO1/compteur.java diff --git a/BUT1/DEV2.1/TP4-ClassesEtObjets/EXO2 et 3/Partie1/Date.class b/BUT1/DEV2.1/TP4-ClassesEtObjets/EXO2 et 3/Partie1/Date.class new file mode 100644 index 0000000..d59816b Binary files /dev/null and b/BUT1/DEV2.1/TP4-ClassesEtObjets/EXO2 et 3/Partie1/Date.class differ diff --git a/BUT1/DEV2.1/TP4-ClassesEtObjets/EXO2 et 3/Partie1/Date.java b/BUT1/DEV2.1/TP4-ClassesEtObjets/EXO2 et 3/Partie1/Date.java new file mode 100644 index 0000000..e4697d4 --- /dev/null +++ b/BUT1/DEV2.1/TP4-ClassesEtObjets/EXO2 et 3/Partie1/Date.java @@ -0,0 +1,27 @@ +public class Date{ + + // Attribut + private int jour; + private int mois; + private int annee; + + // Constructeur + public Date(){ + this.jour = 18; + this.mois = 2; + this.annee = 2024; + } + + // Méthode + public String toString() { + String dateString = String.format("%d/%02d/%02d", this.annee, this.mois, this.jour); // Format ISO 8601 = AAAA/MM/JJ + System.out.println(dateString); + return dateString; + } + + + public static void main(String args[]){ + Date date = new Date(); + date.toString(); + } +} \ No newline at end of file diff --git a/BUT1/DEV2.1/TP4-ClassesEtObjets/EXO2 et 3/Partie2/Date.class b/BUT1/DEV2.1/TP4-ClassesEtObjets/EXO2 et 3/Partie2/Date.class new file mode 100644 index 0000000..9f7eb47 Binary files /dev/null and b/BUT1/DEV2.1/TP4-ClassesEtObjets/EXO2 et 3/Partie2/Date.class differ diff --git a/BUT1/DEV2.1/TP4-ClassesEtObjets/EXO2 et 3/Partie2/Date.java b/BUT1/DEV2.1/TP4-ClassesEtObjets/EXO2 et 3/Partie2/Date.java new file mode 100644 index 0000000..99dc787 --- /dev/null +++ b/BUT1/DEV2.1/TP4-ClassesEtObjets/EXO2 et 3/Partie2/Date.java @@ -0,0 +1,99 @@ +public class Date{ + + // Attribut + private int jour; + private int mois; + private int annee; + + // Constructeur + public Date(int jour, int mois, int annee){ + this.jour = jour; + this.mois = mois; + this.annee = annee; + } + + // Méthode pour afficher la date + public String toString() { + return String.format("%d/%02d/%02d", this.annee, this.mois, this.jour); // Format ISO 8601 = AAAA/MM/JJ; + } + + // Méthode pour donner le lendemain d'une date + public Date lendemain() { + int jourLendemain = this.jour; + int moisLendemain = this.mois; + int anneeLendemain = this.annee; + + if(this.mois == 1 || this.mois == 3 || this.mois == 5 || this.mois == 7 || this.mois == 8 || this.mois == 10 || this.mois == 12){ + if (this.jour == 31) { + jourLendemain = 1; + if (this.mois == 12) { + moisLendemain = 1; + anneeLendemain += 1; + } else { + moisLendemain += 1; + } + } else { + jourLendemain += 1; + } + }else{ + if (this.jour == 30) { + jourLendemain = 1; + if (this.mois == 12) { + moisLendemain = 1; + anneeLendemain += 1; + } else { + moisLendemain += 1; + } + } else { + jourLendemain += 1; + } + } + + return new Date(jourLendemain, moisLendemain, anneeLendemain); + } + + public Date comparerDate(Date date1, Date date2){ + // Si l'année de la date 1 est plus grande que l'année de la date 2 + if(date1.annee > date2.annee){ + return date1; + } + + // Si l'année de la date 2 est plus grande que l'année de la date 1 + if(date1.annee < date2.annee){ + return date2; + } + + // Si l'année de la date 1 est égale à l'année de la date 2 = on ne peut pas se fier à l'année et on passe aux mois + if(date1.annee == date2.annee){ + if(date1.mois > date2.mois){ + return date1; + } + if(date1.mois < date2.mois){ + return date2; + } + if(date1.mois == date2.mois){ + if(date1.jour > date2.jour){ + return date1; + } + if(date1.jour < date2.jour){ + return date2; + } + } + } + return null; + } + + + + + public static void main(String[] args) { + Date date = new Date(31,12,2024); + Date dateLendemain = date.lendemain(); + + System.out.println("Aujourd'hui : " + date); + System.out.println("Demain : " + dateLendemain); + + System.out.println(date.comparerDate(date,dateLendemain)); + } + +} \ No newline at end of file diff --git a/BUT1/DEV2.2/TP1-Introduction/EXO 1 /Bonjour.java b/BUT1/DEV2.2/TP1-Introduction/EXO 1 /Bonjour.java deleted file mode 100644 index ab95b0b..0000000 --- a/BUT1/DEV2.2/TP1-Introduction/EXO 1 /Bonjour.java +++ /dev/null @@ -1,17 +0,0 @@ -/** -* Cette classe est une simple coquille pour recevoir la méthode principale -* -* @version 1.1 09 March 2014 -* @author Luc Hernandez -*/ -public class Bonjour { - - /** - * Affiche «Bonjour !» - * - * @param args la liste des arguments de la ligne de commande (inutilisée ici) - */ - public static void main(String[] args) { - System.out.println("Bonjour !"); - } -} \ No newline at end of file diff --git a/BUT1/DEV2.2/TP1-Introduction/EXO 1 /exo1.java b/BUT1/DEV2.2/TP1-Introduction/EXO 1 /exo1.java deleted file mode 100644 index 590fe19..0000000 --- a/BUT1/DEV2.2/TP1-Introduction/EXO 1 /exo1.java +++ /dev/null @@ -1,33 +0,0 @@ -/** -* Cette classe est une simple coquille pour recevoir la méthode principale -* -* @version 1.1 09 March 2014 -* @author Luc Hernandez -*/ -public class exo1 { - - /** - * Affiche «Bonjour !» - * - * @param args la liste des arguments de la ligne de commande (inutilisée ici) - */ - public static void main(String[] args) { - byte moncefleboss1 = 1; - short moncefleboss2 = 1; - int moncefleboss3 = 1; - long moncefleboss4 = 1; - boolean moncefleboss5 = false; - char moncefleboss6 = 'Y'; - float moncefleboss7 = -1.5f; - double moncefleboss8 = 47.0d; - - System.out.println("Valeur : " + moncefleboss1); - System.out.println("Valeur : " + moncefleboss2); - System.out.println("Valeur : " + moncefleboss3); - System.out.println("Valeur : " + moncefleboss4); - System.out.println("Valeur : " + moncefleboss5); - System.out.println("Valeur : " + moncefleboss6); - System.out.println("Valeur : " + moncefleboss7); - System.out.println("Valeur : " + moncefleboss8); - } -} \ No newline at end of file diff --git a/README.md b/README.md deleted file mode 100644 index 8d773ca..0000000 --- a/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# DEV - -L'ensemble de mes TP de DEV depuis le début de l'année. -