├── AO ├── Notes.txt └── TP AO │ ├── PGCD.asm │ ├── exxxxx3.asm │ ├── TP3_ex2.asm │ ├── supp_répète.asm │ ├── tableau_pdf.asm │ ├── affiche_nbr_paire.asm │ ├── TP3_ex1.asm │ ├── exxx1.asm │ ├── conditionnel.asm │ ├── boucle.asm │ ├── tableau_test.asm │ ├── fpu.asm │ ├── image miroir.asm │ ├── boucle 2.asm │ ├── mips1.asm │ ├── nbr_paire.asm │ ├── revision_miroir.asm │ ├── converte vers binaire.asm │ ├── Fibonacci.asm │ ├── TP3_ex3.asm │ ├── remplire et affiche tableau.asm │ ├── nombre premier.asm │ ├── intero.asm │ ├── TP3_ex4.asm │ ├── nombre parfait.asm │ └── anniversaire.asm ├── ASD 3 ├── TP2ASD3 │ ├── structer_liste_double_chane.c │ ├── obj │ │ └── Debug │ │ │ ├── main.o │ │ │ ├── Remove.o │ │ │ ├── insert.o │ │ │ ├── CREET_LIST.o │ │ │ ├── printlist.o │ │ │ └── structer_liste_double_chane.o │ ├── bin │ │ └── Debug │ │ │ └── TP2ASD3.exe │ ├── main.c │ ├── fill.c │ ├── CREET_LIST.c │ ├── printlist.c │ ├── insert.c │ ├── mylib.h │ └── Remove.c ├── TP3ASD3 │ ├── TP3data.csv │ └── TP3ASD3 (1).c └── TP1ASD3 │ ├── TPFINALASD3.txt │ └── main.c ├── OPP ├── person │ ├── target │ │ ├── maven-status │ │ │ └── maven-compiler-plugin │ │ │ │ └── compile │ │ │ │ └── default-compile │ │ │ │ ├── createdFiles.lst │ │ │ │ └── inputFiles.lst │ │ └── classes │ │ │ └── com │ │ │ └── mycompany │ │ │ └── person │ │ │ ├── etd.class │ │ │ ├── Person.class │ │ │ └── main.class │ ├── src │ │ └── main │ │ │ └── java │ │ │ └── com │ │ │ └── mycompany │ │ │ └── person │ │ │ ├── main.java │ │ │ ├── Person.java │ │ │ └── etd.java │ └── pom.xml ├── TP1 │ ├── target │ │ ├── maven-status │ │ │ └── maven-compiler-plugin │ │ │ │ └── compile │ │ │ │ └── default-compile │ │ │ │ ├── createdFiles.lst │ │ │ │ └── inputFiles.lst │ │ └── classes │ │ │ └── com │ │ │ └── mycompany │ │ │ └── tp1 │ │ │ ├── TP1.class │ │ │ └── heuteur.class │ ├── src │ │ └── main │ │ │ └── java │ │ │ └── com │ │ │ └── mycompany │ │ │ └── tp1 │ │ │ ├── TP1.java │ │ │ └── heuteur.java │ └── pom.xml ├── Pointa │ ├── target │ │ ├── maven-status │ │ │ └── maven-compiler-plugin │ │ │ │ └── compile │ │ │ │ └── default-compile │ │ │ │ ├── createdFiles.lst │ │ │ │ └── inputFiles.lst │ │ └── classes │ │ │ └── com │ │ │ └── mycompany │ │ │ └── pointa │ │ │ ├── Pointa.class │ │ │ └── Program.class │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── com │ │ └── mycompany │ │ └── pointa │ │ ├── Pointa.java │ │ └── Program.java ├── point │ ├── target │ │ ├── maven-status │ │ │ └── maven-compiler-plugin │ │ │ │ └── compile │ │ │ │ └── default-compile │ │ │ │ ├── createdFiles.lst │ │ │ │ └── inputFiles.lst │ │ └── classes │ │ │ └── com │ │ │ └── mycompany │ │ │ └── point │ │ │ ├── Point.class │ │ │ ├── main.class │ │ │ └── Pointmain.class │ ├── src │ │ └── main │ │ │ └── java │ │ │ └── com │ │ │ └── mycompany │ │ │ └── point │ │ │ ├── Point.java │ │ │ ├── Pointmain.java │ │ │ └── main.java │ └── pom.xml ├── Test │ ├── target │ │ ├── classes │ │ │ ├── Etoile.class │ │ │ └── com │ │ │ │ └── mycompany │ │ │ │ └── test │ │ │ │ ├── Test.class │ │ │ │ └── Etoile.class │ │ └── maven-status │ │ │ └── maven-compiler-plugin │ │ │ └── compile │ │ │ └── default-compile │ │ │ ├── createdFiles.lst │ │ │ └── inputFiles.lst │ ├── src │ │ └── main │ │ │ └── java │ │ │ └── com │ │ │ └── mycompany │ │ │ └── test │ │ │ ├── Test.java │ │ │ └── Etoile.java │ └── pom.xml ├── TV │ ├── target │ │ ├── maven-status │ │ │ └── maven-compiler-plugin │ │ │ │ └── compile │ │ │ │ └── default-compile │ │ │ │ ├── createdFiles.lst │ │ │ │ └── inputFiles.lst │ │ └── classes │ │ │ └── com │ │ │ └── mycompany │ │ │ └── tv │ │ │ ├── TV.class │ │ │ └── TestTV.class │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── com │ │ └── mycompany │ │ └── tv │ │ ├── TestTV.java │ │ └── TV.java ├── mainTestTP01 │ ├── target │ │ ├── maven-status │ │ │ └── maven-compiler-plugin │ │ │ │ └── compile │ │ │ │ └── default-compile │ │ │ │ ├── createdFiles.lst │ │ │ │ └── inputFiles.lst │ │ └── classes │ │ │ └── com │ │ │ └── mycompany │ │ │ └── maintesttp01 │ │ │ └── MainTestTP01.class │ ├── src │ │ └── main │ │ │ └── java │ │ │ └── com │ │ │ └── mycompany │ │ │ └── maintesttp01 │ │ │ └── MainTestTP01.java │ └── pom.xml ├── mavenproject1 │ ├── target │ │ ├── maven-status │ │ │ └── maven-compiler-plugin │ │ │ │ └── compile │ │ │ │ └── default-compile │ │ │ │ ├── createdFiles.lst │ │ │ │ └── inputFiles.lst │ │ └── classes │ │ │ └── com │ │ │ └── mycompany │ │ │ └── mavenproject1 │ │ │ └── Mavenproject1.class │ ├── src │ │ └── main │ │ │ └── java │ │ │ └── com │ │ │ └── mycompany │ │ │ └── mavenproject1 │ │ │ └── Mavenproject1.java │ └── pom.xml ├── Carre │ ├── target │ │ ├── maven-status │ │ │ └── maven-compiler-plugin │ │ │ │ └── compile │ │ │ │ └── default-compile │ │ │ │ ├── createdFiles.lst │ │ │ │ └── inputFiles.lst │ │ └── classes │ │ │ └── com │ │ │ └── mycompany │ │ │ └── carre │ │ │ ├── Carre.class │ │ │ ├── main.class │ │ │ ├── Rectangle.class │ │ │ └── Parallélépipède.class │ ├── src │ │ └── main │ │ │ └── java │ │ │ └── com │ │ │ └── mycompany │ │ │ └── carre │ │ │ ├── Carre.java │ │ │ ├── main.java │ │ │ ├── Parallélépipède.java │ │ │ └── Rectangle.java │ └── pom.xml ├── Livre │ ├── target │ │ ├── maven-status │ │ │ └── maven-compiler-plugin │ │ │ │ └── compile │ │ │ │ └── default-compile │ │ │ │ ├── createdFiles.lst │ │ │ │ └── inputFiles.lst │ │ └── classes │ │ │ └── com │ │ │ └── mycompany │ │ │ └── livre │ │ │ ├── Livre.class │ │ │ └── TestLivre.class │ ├── src │ │ └── main │ │ │ └── java │ │ │ └── com │ │ │ └── mycompany │ │ │ └── livre │ │ │ ├── Livre.java │ │ │ └── TestLivre.java │ └── pom.xml ├── Article │ ├── target │ │ ├── maven-status │ │ │ └── maven-compiler-plugin │ │ │ │ └── compile │ │ │ │ └── default-compile │ │ │ │ ├── createdFiles.lst │ │ │ │ └── inputFiles.lst │ │ └── classes │ │ │ └── com │ │ │ └── mycompany │ │ │ └── article │ │ │ ├── Test.class │ │ │ ├── Test0.class │ │ │ ├── Article.class │ │ │ └── TabArticle.class │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── com │ │ └── mycompany │ │ └── article │ │ ├── Test0.java │ │ ├── Article.java │ │ ├── TabArticle.java │ │ └── Test.java ├── Pr │ ├── target │ │ ├── classes │ │ │ └── com │ │ │ │ └── mycompany │ │ │ │ └── pr │ │ │ │ ├── Em.class │ │ │ │ ├── Emh.class │ │ │ │ ├── Pr.class │ │ │ │ └── main.class │ │ └── maven-status │ │ │ └── maven-compiler-plugin │ │ │ └── compile │ │ │ └── default-compile │ │ │ ├── createdFiles.lst │ │ │ └── inputFiles.lst │ ├── src │ │ └── main │ │ │ └── java │ │ │ └── com │ │ │ └── mycompany │ │ │ └── pr │ │ │ ├── main.java │ │ │ ├── Pr.java │ │ │ ├── Emh.java │ │ │ └── Em.java │ └── pom.xml ├── Etudiant │ ├── target │ │ ├── maven-status │ │ │ └── maven-compiler-plugin │ │ │ │ └── compile │ │ │ │ └── default-compile │ │ │ │ ├── createdFiles.lst │ │ │ │ └── inputFiles.lst │ │ └── classes │ │ │ └── com │ │ │ └── mycompany │ │ │ └── etudiant │ │ │ ├── Test.class │ │ │ └── Etudiant.class │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── com │ │ └── mycompany │ │ └── etudiant │ │ ├── Etudiant.java │ │ └── Test.java ├── Exprivate │ ├── target │ │ ├── maven-status │ │ │ └── maven-compiler-plugin │ │ │ │ └── compile │ │ │ │ └── default-compile │ │ │ │ ├── createdFiles.lst │ │ │ │ └── inputFiles.lst │ │ └── classes │ │ │ └── com │ │ │ └── mycompany │ │ │ └── exprivate │ │ │ ├── Exprivate.class │ │ │ └── TestPrivate.class │ ├── src │ │ └── main │ │ │ └── java │ │ │ └── com │ │ │ └── mycompany │ │ │ └── exprivate │ │ │ ├── Exprivate.java │ │ │ └── TestPrivate.java │ └── pom.xml ├── Nomber │ ├── target │ │ ├── classes │ │ │ └── com │ │ │ │ └── mycompany │ │ │ │ └── nomber │ │ │ │ ├── Nomber.class │ │ │ │ ├── main.class │ │ │ │ └── ExmpleStatic.class │ │ └── maven-status │ │ │ └── maven-compiler-plugin │ │ │ └── compile │ │ │ └── default-compile │ │ │ ├── createdFiles.lst │ │ │ └── inputFiles.lst │ ├── src │ │ └── main │ │ │ └── java │ │ │ └── com │ │ │ └── mycompany │ │ │ └── nomber │ │ │ ├── ExmpleStatic.java │ │ │ ├── Nomber.java │ │ │ └── main.java │ └── pom.xml └── Rectangle │ ├── src │ └── main │ │ └── java │ │ └── com │ │ └── mycompany │ │ └── test2 │ │ └── Test2.java │ └── pom.xml └── README.md /AO/Notes.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /AO/TP AO/PGCD.asm: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /AO/TP AO/exxxxx3.asm: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ASD 3/TP2ASD3/structer_liste_double_chane.c: -------------------------------------------------------------------------------- 1 | #include "mylib.h" 2 | 3 | -------------------------------------------------------------------------------- /OPP/person/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khamedtaha/L2-Computer-Science-Students/HEAD/README.md -------------------------------------------------------------------------------- /ASD 3/TP3ASD3/TP3data.csv: -------------------------------------------------------------------------------- 1 | 0;taha;17.5 2 | 1;moh;10 3 | 3;fdff;34.5 4 | 4;glf;9.9 5 | 5;jifi;4.4 6 | 7 | -------------------------------------------------------------------------------- /AO/TP AO/TP3_ex2.asm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khamedtaha/L2-Computer-Science-Students/HEAD/AO/TP AO/TP3_ex2.asm -------------------------------------------------------------------------------- /AO/TP AO/supp_répète.asm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khamedtaha/L2-Computer-Science-Students/HEAD/AO/TP AO/supp_répète.asm -------------------------------------------------------------------------------- /AO/TP AO/tableau_pdf.asm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khamedtaha/L2-Computer-Science-Students/HEAD/AO/TP AO/tableau_pdf.asm -------------------------------------------------------------------------------- /OPP/TP1/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst: -------------------------------------------------------------------------------- 1 | com\mycompany\tp1\TP1.class 2 | -------------------------------------------------------------------------------- /OPP/Pointa/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst: -------------------------------------------------------------------------------- 1 | com\mycompany\pointa\Pointa.class 2 | -------------------------------------------------------------------------------- /OPP/point/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst: -------------------------------------------------------------------------------- 1 | com\mycompany\point\Pointmain.class 2 | -------------------------------------------------------------------------------- /AO/TP AO/affiche_nbr_paire.asm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khamedtaha/L2-Computer-Science-Students/HEAD/AO/TP AO/affiche_nbr_paire.asm -------------------------------------------------------------------------------- /ASD 3/TP2ASD3/obj/Debug/main.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khamedtaha/L2-Computer-Science-Students/HEAD/ASD 3/TP2ASD3/obj/Debug/main.o -------------------------------------------------------------------------------- /ASD 3/TP2ASD3/obj/Debug/Remove.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khamedtaha/L2-Computer-Science-Students/HEAD/ASD 3/TP2ASD3/obj/Debug/Remove.o -------------------------------------------------------------------------------- /ASD 3/TP2ASD3/obj/Debug/insert.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khamedtaha/L2-Computer-Science-Students/HEAD/ASD 3/TP2ASD3/obj/Debug/insert.o -------------------------------------------------------------------------------- /ASD 3/TP2ASD3/bin/Debug/TP2ASD3.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khamedtaha/L2-Computer-Science-Students/HEAD/ASD 3/TP2ASD3/bin/Debug/TP2ASD3.exe -------------------------------------------------------------------------------- /ASD 3/TP2ASD3/obj/Debug/CREET_LIST.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khamedtaha/L2-Computer-Science-Students/HEAD/ASD 3/TP2ASD3/obj/Debug/CREET_LIST.o -------------------------------------------------------------------------------- /ASD 3/TP2ASD3/obj/Debug/printlist.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khamedtaha/L2-Computer-Science-Students/HEAD/ASD 3/TP2ASD3/obj/Debug/printlist.o -------------------------------------------------------------------------------- /OPP/Test/target/classes/Etoile.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khamedtaha/L2-Computer-Science-Students/HEAD/OPP/Test/target/classes/Etoile.class -------------------------------------------------------------------------------- /OPP/TV/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst: -------------------------------------------------------------------------------- 1 | com\mycompany\tv\TestTV.class 2 | com\mycompany\tv\TV.class 3 | -------------------------------------------------------------------------------- /OPP/mainTestTP01/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst: -------------------------------------------------------------------------------- 1 | com\mycompany\maintesttp01\MainTestTP01.class 2 | -------------------------------------------------------------------------------- /OPP/mavenproject1/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst: -------------------------------------------------------------------------------- 1 | com\mycompany\mavenproject1\Mavenproject1.class 2 | -------------------------------------------------------------------------------- /OPP/Carre/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst: -------------------------------------------------------------------------------- 1 | com\mycompany\carre\Carre.class 2 | com\mycompany\carre\main.class 3 | -------------------------------------------------------------------------------- /OPP/Test/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst: -------------------------------------------------------------------------------- 1 | com\mycompany\test\Test.class 2 | com\mycompany\test\Etoile.class 3 | -------------------------------------------------------------------------------- /OPP/Livre/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst: -------------------------------------------------------------------------------- 1 | com\mycompany\livre\TestLivre.class 2 | com\mycompany\livre\Livre.class 3 | -------------------------------------------------------------------------------- /OPP/Article/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst: -------------------------------------------------------------------------------- 1 | com\mycompany\article\Article.class 2 | com\mycompany\article\Test0.class 3 | -------------------------------------------------------------------------------- /OPP/Pr/target/classes/com/mycompany/pr/Em.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khamedtaha/L2-Computer-Science-Students/HEAD/OPP/Pr/target/classes/com/mycompany/pr/Em.class -------------------------------------------------------------------------------- /OPP/Pr/target/classes/com/mycompany/pr/Emh.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khamedtaha/L2-Computer-Science-Students/HEAD/OPP/Pr/target/classes/com/mycompany/pr/Emh.class -------------------------------------------------------------------------------- /OPP/Pr/target/classes/com/mycompany/pr/Pr.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khamedtaha/L2-Computer-Science-Students/HEAD/OPP/Pr/target/classes/com/mycompany/pr/Pr.class -------------------------------------------------------------------------------- /OPP/Pr/target/classes/com/mycompany/pr/main.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khamedtaha/L2-Computer-Science-Students/HEAD/OPP/Pr/target/classes/com/mycompany/pr/main.class -------------------------------------------------------------------------------- /OPP/TV/target/classes/com/mycompany/tv/TV.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khamedtaha/L2-Computer-Science-Students/HEAD/OPP/TV/target/classes/com/mycompany/tv/TV.class -------------------------------------------------------------------------------- /OPP/Etudiant/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst: -------------------------------------------------------------------------------- 1 | com\mycompany\etudiant\Test.class 2 | com\mycompany\etudiant\Etudiant.class 3 | -------------------------------------------------------------------------------- /OPP/TP1/target/classes/com/mycompany/tp1/TP1.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khamedtaha/L2-Computer-Science-Students/HEAD/OPP/TP1/target/classes/com/mycompany/tp1/TP1.class -------------------------------------------------------------------------------- /OPP/TP1/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst: -------------------------------------------------------------------------------- 1 | C:\Users\USER\Documents\NetBeansProjects\TP1\src\main\java\com\mycompany\tp1\TP1.java 2 | -------------------------------------------------------------------------------- /OPP/TV/target/classes/com/mycompany/tv/TestTV.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khamedtaha/L2-Computer-Science-Students/HEAD/OPP/TV/target/classes/com/mycompany/tv/TestTV.class -------------------------------------------------------------------------------- /ASD 3/TP2ASD3/main.c: -------------------------------------------------------------------------------- 1 | #include "mylib.h" 2 | 3 | 4 | 5 | 6 | int main(struct multiboot *nboot_ptr ){ 7 | 8 | printf("Hello World"); 9 | 10 | return 0; 11 | } 12 | -------------------------------------------------------------------------------- /ASD 3/TP2ASD3/obj/Debug/structer_liste_double_chane.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khamedtaha/L2-Computer-Science-Students/HEAD/ASD 3/TP2ASD3/obj/Debug/structer_liste_double_chane.o -------------------------------------------------------------------------------- /OPP/Exprivate/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst: -------------------------------------------------------------------------------- 1 | com\mycompany\exprivate\Exprivate.class 2 | com\mycompany\exprivate\main.class 3 | -------------------------------------------------------------------------------- /OPP/TP1/target/classes/com/mycompany/tp1/heuteur.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khamedtaha/L2-Computer-Science-Students/HEAD/OPP/TP1/target/classes/com/mycompany/tp1/heuteur.class -------------------------------------------------------------------------------- /OPP/Test/target/classes/com/mycompany/test/Test.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khamedtaha/L2-Computer-Science-Students/HEAD/OPP/Test/target/classes/com/mycompany/test/Test.class -------------------------------------------------------------------------------- /OPP/Carre/target/classes/com/mycompany/carre/Carre.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khamedtaha/L2-Computer-Science-Students/HEAD/OPP/Carre/target/classes/com/mycompany/carre/Carre.class -------------------------------------------------------------------------------- /OPP/Carre/target/classes/com/mycompany/carre/main.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khamedtaha/L2-Computer-Science-Students/HEAD/OPP/Carre/target/classes/com/mycompany/carre/main.class -------------------------------------------------------------------------------- /OPP/Livre/target/classes/com/mycompany/livre/Livre.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khamedtaha/L2-Computer-Science-Students/HEAD/OPP/Livre/target/classes/com/mycompany/livre/Livre.class -------------------------------------------------------------------------------- /OPP/Test/target/classes/com/mycompany/test/Etoile.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khamedtaha/L2-Computer-Science-Students/HEAD/OPP/Test/target/classes/com/mycompany/test/Etoile.class -------------------------------------------------------------------------------- /OPP/person/target/classes/com/mycompany/person/etd.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khamedtaha/L2-Computer-Science-Students/HEAD/OPP/person/target/classes/com/mycompany/person/etd.class -------------------------------------------------------------------------------- /OPP/point/target/classes/com/mycompany/point/Point.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khamedtaha/L2-Computer-Science-Students/HEAD/OPP/point/target/classes/com/mycompany/point/Point.class -------------------------------------------------------------------------------- /OPP/point/target/classes/com/mycompany/point/main.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khamedtaha/L2-Computer-Science-Students/HEAD/OPP/point/target/classes/com/mycompany/point/main.class -------------------------------------------------------------------------------- /OPP/Article/target/classes/com/mycompany/article/Test.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khamedtaha/L2-Computer-Science-Students/HEAD/OPP/Article/target/classes/com/mycompany/article/Test.class -------------------------------------------------------------------------------- /OPP/Nomber/target/classes/com/mycompany/nomber/Nomber.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khamedtaha/L2-Computer-Science-Students/HEAD/OPP/Nomber/target/classes/com/mycompany/nomber/Nomber.class -------------------------------------------------------------------------------- /OPP/Nomber/target/classes/com/mycompany/nomber/main.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khamedtaha/L2-Computer-Science-Students/HEAD/OPP/Nomber/target/classes/com/mycompany/nomber/main.class -------------------------------------------------------------------------------- /OPP/Pointa/target/classes/com/mycompany/pointa/Pointa.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khamedtaha/L2-Computer-Science-Students/HEAD/OPP/Pointa/target/classes/com/mycompany/pointa/Pointa.class -------------------------------------------------------------------------------- /OPP/person/target/classes/com/mycompany/person/Person.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khamedtaha/L2-Computer-Science-Students/HEAD/OPP/person/target/classes/com/mycompany/person/Person.class -------------------------------------------------------------------------------- /OPP/person/target/classes/com/mycompany/person/main.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khamedtaha/L2-Computer-Science-Students/HEAD/OPP/person/target/classes/com/mycompany/person/main.class -------------------------------------------------------------------------------- /OPP/Article/target/classes/com/mycompany/article/Test0.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khamedtaha/L2-Computer-Science-Students/HEAD/OPP/Article/target/classes/com/mycompany/article/Test0.class -------------------------------------------------------------------------------- /OPP/Carre/target/classes/com/mycompany/carre/Rectangle.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khamedtaha/L2-Computer-Science-Students/HEAD/OPP/Carre/target/classes/com/mycompany/carre/Rectangle.class -------------------------------------------------------------------------------- /OPP/Etudiant/target/classes/com/mycompany/etudiant/Test.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khamedtaha/L2-Computer-Science-Students/HEAD/OPP/Etudiant/target/classes/com/mycompany/etudiant/Test.class -------------------------------------------------------------------------------- /OPP/Livre/target/classes/com/mycompany/livre/TestLivre.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khamedtaha/L2-Computer-Science-Students/HEAD/OPP/Livre/target/classes/com/mycompany/livre/TestLivre.class -------------------------------------------------------------------------------- /OPP/Pointa/target/classes/com/mycompany/pointa/Program.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khamedtaha/L2-Computer-Science-Students/HEAD/OPP/Pointa/target/classes/com/mycompany/pointa/Program.class -------------------------------------------------------------------------------- /OPP/point/target/classes/com/mycompany/point/Pointmain.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khamedtaha/L2-Computer-Science-Students/HEAD/OPP/point/target/classes/com/mycompany/point/Pointmain.class -------------------------------------------------------------------------------- /OPP/Article/target/classes/com/mycompany/article/Article.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khamedtaha/L2-Computer-Science-Students/HEAD/OPP/Article/target/classes/com/mycompany/article/Article.class -------------------------------------------------------------------------------- /OPP/Article/target/classes/com/mycompany/article/TabArticle.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khamedtaha/L2-Computer-Science-Students/HEAD/OPP/Article/target/classes/com/mycompany/article/TabArticle.class -------------------------------------------------------------------------------- /OPP/Carre/target/classes/com/mycompany/carre/Parallélépipède.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khamedtaha/L2-Computer-Science-Students/HEAD/OPP/Carre/target/classes/com/mycompany/carre/Parallélépipède.class -------------------------------------------------------------------------------- /OPP/Etudiant/target/classes/com/mycompany/etudiant/Etudiant.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khamedtaha/L2-Computer-Science-Students/HEAD/OPP/Etudiant/target/classes/com/mycompany/etudiant/Etudiant.class -------------------------------------------------------------------------------- /OPP/Nomber/target/classes/com/mycompany/nomber/ExmpleStatic.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khamedtaha/L2-Computer-Science-Students/HEAD/OPP/Nomber/target/classes/com/mycompany/nomber/ExmpleStatic.class -------------------------------------------------------------------------------- /OPP/Exprivate/target/classes/com/mycompany/exprivate/Exprivate.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khamedtaha/L2-Computer-Science-Students/HEAD/OPP/Exprivate/target/classes/com/mycompany/exprivate/Exprivate.class -------------------------------------------------------------------------------- /OPP/Nomber/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst: -------------------------------------------------------------------------------- 1 | com\mycompany\nomber\main.class 2 | com\mycompany\nomber\ExmpleStatic.class 3 | com\mycompany\nomber\Nomber.class 4 | -------------------------------------------------------------------------------- /OPP/Pr/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst: -------------------------------------------------------------------------------- 1 | com\mycompany\pr\Pr.class 2 | com\mycompany\pr\main.class 3 | com\mycompany\pr\Em.class 4 | com\mycompany\pr\Emh.class 5 | -------------------------------------------------------------------------------- /OPP/Exprivate/target/classes/com/mycompany/exprivate/TestPrivate.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khamedtaha/L2-Computer-Science-Students/HEAD/OPP/Exprivate/target/classes/com/mycompany/exprivate/TestPrivate.class -------------------------------------------------------------------------------- /OPP/mainTestTP01/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst: -------------------------------------------------------------------------------- 1 | C:\Users\USER\Documents\NetBeansProjects\mainTestTP01\src\main\java\com\mycompany\maintesttp01\MainTestTP01.java 2 | -------------------------------------------------------------------------------- /OPP/mavenproject1/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst: -------------------------------------------------------------------------------- 1 | C:\Users\USER\Documents\NetBeansProjects\mavenproject1\src\main\java\com\mycompany\mavenproject1\Mavenproject1.java 2 | -------------------------------------------------------------------------------- /OPP/mainTestTP01/target/classes/com/mycompany/maintesttp01/MainTestTP01.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khamedtaha/L2-Computer-Science-Students/HEAD/OPP/mainTestTP01/target/classes/com/mycompany/maintesttp01/MainTestTP01.class -------------------------------------------------------------------------------- /OPP/Livre/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst: -------------------------------------------------------------------------------- 1 | K:\javaProject\Livre\src\main\java\com\mycompany\livre\TestLivre.java 2 | K:\javaProject\Livre\src\main\java\com\mycompany\livre\Livre.java 3 | -------------------------------------------------------------------------------- /OPP/Pointa/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst: -------------------------------------------------------------------------------- 1 | K:\javaProject\Pointa\src\main\java\com\mycompany\pointa\Pointa.java 2 | K:\javaProject\Pointa\src\main\java\com\mycompany\pointa\Program.java 3 | -------------------------------------------------------------------------------- /OPP/mavenproject1/target/classes/com/mycompany/mavenproject1/Mavenproject1.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khamedtaha/L2-Computer-Science-Students/HEAD/OPP/mavenproject1/target/classes/com/mycompany/mavenproject1/Mavenproject1.class -------------------------------------------------------------------------------- /OPP/point/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst: -------------------------------------------------------------------------------- 1 | K:\javaProject\point\src\main\java\com\mycompany\point\Point.java 2 | K:\javaProject\point\src\main\java\com\mycompany\point\Pointmain.java 3 | -------------------------------------------------------------------------------- /OPP/Article/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst: -------------------------------------------------------------------------------- 1 | K:\javaProject\Article\src\main\java\com\mycompany\article\Article.java 2 | K:\javaProject\Article\src\main\java\com\mycompany\article\Test0.java 3 | -------------------------------------------------------------------------------- /OPP/TV/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst: -------------------------------------------------------------------------------- 1 | C:\Users\USER\Documents\NetBeansProjects\TV\src\main\java\com\mycompany\tv\TV.java 2 | C:\Users\USER\Documents\NetBeansProjects\TV\src\main\java\com\mycompany\tv\TestTV.java 3 | -------------------------------------------------------------------------------- /OPP/Test/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst: -------------------------------------------------------------------------------- 1 | C:\Users\USER\Documents\NetBeansProjects\Test\src\main\java\com\mycompany\test\Test.java 2 | C:\Users\USER\Documents\NetBeansProjects\Test\src\main\java\com\mycompany\test\Etoile.java 3 | -------------------------------------------------------------------------------- /OPP/Carre/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst: -------------------------------------------------------------------------------- 1 | C:\Users\USER\Documents\NetBeansProjects\Carre\src\main\java\com\mycompany\carre\Carre.java 2 | C:\Users\USER\Documents\NetBeansProjects\Carre\src\main\java\com\mycompany\carre\main.java 3 | -------------------------------------------------------------------------------- /OPP/Etudiant/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst: -------------------------------------------------------------------------------- 1 | C:\Users\USER\Documents\NetBeansProjects\Etudiant\src\main\java\com\mycompany\etudiant\Test.java 2 | C:\Users\USER\Documents\NetBeansProjects\Etudiant\src\main\java\com\mycompany\etudiant\Etudiant.java 3 | -------------------------------------------------------------------------------- /OPP/Exprivate/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst: -------------------------------------------------------------------------------- 1 | C:\Users\USER\Documents\NetBeansProjects\Exprivate\src\main\java\com\mycompany\exprivate\main.java 2 | C:\Users\USER\Documents\NetBeansProjects\Exprivate\src\main\java\com\mycompany\exprivate\Exprivate.java 3 | -------------------------------------------------------------------------------- /ASD 3/TP2ASD3/fill.c: -------------------------------------------------------------------------------- 1 | #include "mylib.h" 2 | 3 | struct mylist * fillR(struct mylist **head,int N){ 4 | 5 | for(int i=1;i<=N;i++){ 6 | 7 | srand(time(NULL)); 8 | 9 | int r = rand(); 10 | 11 | insert(&head,r); 12 | } 13 | 14 | 15 | return (*head); 16 | } 17 | -------------------------------------------------------------------------------- /OPP/person/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst: -------------------------------------------------------------------------------- 1 | C:\Users\USER\Documents\NetBeansProjects\person\src\main\java\com\mycompany\person\main.java 2 | C:\Users\USER\Documents\NetBeansProjects\person\src\main\java\com\mycompany\person\etd.java 3 | C:\Users\USER\Documents\NetBeansProjects\person\src\main\java\com\mycompany\person\Person.java 4 | -------------------------------------------------------------------------------- /AO/TP AO/TP3_ex1.asm: -------------------------------------------------------------------------------- 1 | .data 2 | as: .word 10 3 | bs: .word 1 4 | 5 | .text 6 | main: 7 | 8 | lw $t0, as 9 | lw $t1, bs 10 | 11 | boucle: 12 | mul $t2, $t1, $t1 13 | add $t3, $t3, $t2 14 | beq $t1, $t0, fin 15 | addi $t1, $t1, 1 16 | j boucle 17 | fin: 18 | 19 | li $v0, 1 20 | move $a0, $t3 21 | syscall 22 | 23 | li $v0, 10 24 | syscall 25 | .end main -------------------------------------------------------------------------------- /OPP/Nomber/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst: -------------------------------------------------------------------------------- 1 | C:\Users\USER\Documents\NetBeansProjects\Nomber\src\main\java\com\mycompany\nomber\Nomber.java 2 | C:\Users\USER\Documents\NetBeansProjects\Nomber\src\main\java\com\mycompany\nomber\ExmpleStatic.java 3 | C:\Users\USER\Documents\NetBeansProjects\Nomber\src\main\java\com\mycompany\nomber\main.java 4 | -------------------------------------------------------------------------------- /OPP/Rectangle/src/main/java/com/mycompany/test2/Test2.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license 3 | */ 4 | 5 | package com.mycompany.test2; 6 | 7 | /** 8 | * 9 | * @author USER 10 | */ 11 | public class Test2 { 12 | 13 | public static void main(String[] args) { 14 | System.out.println("Hello World!"); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /OPP/Pr/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst: -------------------------------------------------------------------------------- 1 | C:\Users\USER\Documents\NetBeansProjects\Pr\src\main\java\com\mycompany\pr\main.java 2 | C:\Users\USER\Documents\NetBeansProjects\Pr\src\main\java\com\mycompany\pr\Emh.java 3 | C:\Users\USER\Documents\NetBeansProjects\Pr\src\main\java\com\mycompany\pr\Pr.java 4 | C:\Users\USER\Documents\NetBeansProjects\Pr\src\main\java\com\mycompany\pr\Em.java 5 | -------------------------------------------------------------------------------- /OPP/mainTestTP01/src/main/java/com/mycompany/maintesttp01/MainTestTP01.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license 3 | */ 4 | 5 | package com.mycompany.maintesttp01; 6 | 7 | /** 8 | * 9 | * @author USER 10 | */ 11 | public class MainTestTP01 { 12 | 13 | public static void main(String[] args) { 14 | System.out.println("Hello World!"); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /OPP/mavenproject1/src/main/java/com/mycompany/mavenproject1/Mavenproject1.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license 3 | */ 4 | 5 | package com.mycompany.mavenproject1; 6 | 7 | /** 8 | * 9 | * @author USER 10 | */ 11 | public class Mavenproject1 { 12 | 13 | public static void main(String[] args) { 14 | System.out.println("Hello Mohammed taha "); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /ASD 3/TP2ASD3/CREET_LIST.c: -------------------------------------------------------------------------------- 1 | #include "mylib.h" 2 | 3 | 4 | 5 | struct mylist* creatE(){ 6 | 7 | struct mylist* head=(struct mylist *)malloc(sizeof(struct mylist)); //creet new ned and val in new ned = 0 8 | head->next=NULL; // ================= 9 | head->prv=NULL; // = NU = 0 = NU = <---- new ned in function creat. 10 | head->val=0; // = LL = = LL = 11 | return head; // ============= 12 | } 13 | -------------------------------------------------------------------------------- /ASD 3/TP2ASD3/printlist.c: -------------------------------------------------------------------------------- 1 | #include "mylib.h" 2 | 3 | 4 | void printlist(struct mylist* head){ // this function affiche all noeds in mylist . 5 | 6 | int k=1; 7 | 8 | while(head != NULL){ // Condition for continuation head not equval NULL . 9 | 10 | printf("Noed %d : %d \n",k,head->val); // affiche(noed) 11 | k++; 12 | head=head->next; // head Step forward . 13 | 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /AO/TP AO/exxx1.asm: -------------------------------------------------------------------------------- 1 | .data 2 | nombre : .word 100 3 | msg : .asciiz "\n" 4 | 5 | 6 | .text 7 | main: 8 | lw $t0, nombre 9 | lw $t1, 1 10 | lw $t2,0 11 | 12 | bcl: 13 | div $t0, $t1 14 | mfhi $t4 15 | bnez $t4, vrai 16 | la $a0, msg 17 | li $v0, 4 18 | syscall 19 | move $a0, $t1 20 | li $v0,1 21 | vrai: 22 | addi $t1, $t1, 1 23 | ble $t1, $t0, bcl 24 | 25 | 26 | 27 | 28 | 29 | 30 | #=================== 31 | li $a0, 10 32 | syscall 33 | .end main -------------------------------------------------------------------------------- /AO/TP AO/conditionnel.asm: -------------------------------------------------------------------------------- 1 | .data 2 | msg1: .asciiz "\n as sup bs " 3 | msg2: .asciiz "\n as inf bs " 4 | as: .word 4 5 | bs: .word 45 6 | 7 | 8 | .text 9 | main : 10 | 11 | 12 | lw $t1, as 13 | lw $t2, bs 14 | 15 | ble $t1, $t2, else # if ($t1 <= $t2 ) affiche msg2 else ffiche msg1 16 | li $v0, 4 17 | la $a0, msg1 18 | syscall 19 | 20 | j fin 21 | 22 | else : 23 | 24 | li $v0, 4 25 | la $a0, msg2 26 | syscall 27 | 28 | fin: 29 | 30 | li $v0, 10 31 | syscall 32 | 33 | .end main -------------------------------------------------------------------------------- /OPP/Exprivate/src/main/java/com/mycompany/exprivate/Exprivate.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license 3 | */ 4 | 5 | package com.mycompany.exprivate; 6 | 7 | /** 8 | * 9 | * @author USER 10 | */ 11 | public class Exprivate { 12 | 13 | private String name ; 14 | 15 | Exprivate(String til){ 16 | name = til ; 17 | } 18 | public void getName(){ 19 | System.out.println(name); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /AO/TP AO/boucle.asm: -------------------------------------------------------------------------------- 1 | .data 2 | msg1: .asciiz "\n\n enter votre nbr svp! : " 3 | msg2: .asciiz "................." 4 | nbr: .word 1 5 | 6 | .text 7 | main: 8 | 9 | lw $t0, nbr 10 | lw $t1, nbr 11 | 12 | li $v0, 4 13 | la $a0, msg1 14 | syscall 15 | 16 | li $v0, 5 17 | syscall 18 | move $t2, $v0 19 | 20 | boucle: 21 | mul $t0,$t0,$t1 22 | beq $t2, $t1, fin 23 | addi $t1,$t1, 1 24 | 25 | j boucle 26 | fin: 27 | 28 | li $v0, 4 29 | la $a0, msg2 30 | syscall 31 | 32 | li $v0, 1 33 | move $a0, $t0 34 | syscall 35 | 36 | li $v0, 10 37 | syscall 38 | .end main -------------------------------------------------------------------------------- /OPP/Nomber/src/main/java/com/mycompany/nomber/ExmpleStatic.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license 3 | * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template 4 | */ 5 | package com.mycompany.nomber; 6 | 7 | /** 8 | * 9 | * @author USER 10 | */ 11 | public class ExmpleStatic { 12 | static int mystatic = 1; 13 | int num ; 14 | 15 | public ExmpleStatic(int num) { 16 | this.num = num; 17 | mystatic = mystatic+1; 18 | } 19 | 20 | 21 | } 22 | -------------------------------------------------------------------------------- /AO/TP AO/tableau_test.asm: -------------------------------------------------------------------------------- 1 | .data 2 | tab: .word -21, 3, 0, -6, 0, 54 3 | msg1: .asciiz " " 4 | .text 5 | main: 6 | li $t0, 0 7 | li $t1, 6 8 | la $t2, tab 9 | 10 | affichge: 11 | lw $t3 ($t2) 12 | 13 | li $v0, 1 14 | move $a0, $t3 15 | syscall 16 | 17 | li $v0, 4 18 | la $a0, msg1 # somme avec 0 19 | syscall 20 | 21 | addi $t2, $t2, 4 22 | addi $t1, $t1, -1 23 | 24 | bne $t1, $t0, affichge 25 | 26 | 27 | #================= fin 28 | li $v0, 10 29 | syscall 30 | .end main -------------------------------------------------------------------------------- /OPP/TP1/src/main/java/com/mycompany/tp1/TP1.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license 3 | */ 4 | 5 | package com.mycompany.tp1; 6 | 7 | /** 8 | * 9 | * @author USER 10 | */ 11 | import java.util.Scanner; 12 | public class TP1 { 13 | public static void main(String[] args) { 14 | System.out.println("Tp1"); 15 | Scanner input = new Scanner(System.in); 16 | System.out.print("Gev me h : "); 17 | int h=input.nextInt(); 18 | heuteur H = new heuteur(h); 19 | H.work(); 20 | 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /AO/TP AO/fpu.asm: -------------------------------------------------------------------------------- 1 | .data 2 | msg : .asciiz"la somme de tableau :" 3 | msg1 : .asciiz"\nla moyen de tableau :" 4 | tab : .word 1,2,3,4,5,6,7,8,9 5 | .text 6 | main: 7 | li $a1,9 8 | la $a2,tab 9 | li $t0,0 10 | li $t1,0 11 | loop: 12 | lw $a3, ($a2) 13 | add $t0, $t0, $a3 14 | addi $a2, 4 15 | addi $a1, -1 16 | bne $a1, $zero,loop 17 | 18 | la $a0,msg 19 | li $v0,4 20 | syscall 21 | 22 | move $a0,$t0 23 | li $v0,1 24 | syscall 25 | 26 | div $t0,$a1 27 | mflo $t1 28 | 29 | la $a0,msg1 30 | li $v0,4 31 | syscall 32 | 33 | move $a0,$t1 34 | li $v0,1 35 | syscall 36 | 37 | li $v0,10 38 | syscall 39 | .end main 40 | 41 | -------------------------------------------------------------------------------- /OPP/Test/src/main/java/com/mycompany/test/Test.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license 3 | */ 4 | 5 | package com.mycompany.test; 6 | 7 | /** 8 | * 9 | * @author USER 10 | */ 11 | import java.util.Scanner; 12 | 13 | public class Test { 14 | 15 | public static void main(String[] args) { 16 | System.out.println("Tp1"); 17 | Scanner input = new Scanner(System.in); 18 | System.out.print("Gev me h : "); 19 | int h=input.nextInt(); 20 | Etoile H = new Etoile(h); 21 | H.afficher(); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /AO/TP AO/image miroir.asm: -------------------------------------------------------------------------------- 1 | .data 2 | msg1: .asciiz "\n entre un votre nombre : " 3 | 4 | as: .word 10 5 | ab: .word 0 6 | 7 | .text 8 | main: 9 | lw $t0, as 10 | lw $t1, ab 11 | 12 | li $v0, 4 13 | la $a0, msg1 14 | syscall 15 | 16 | li $v0, 5 17 | syscall 18 | move $t2, $v0 19 | 20 | boucle: 21 | rem $t3, $t2, $t0 22 | beq $t2, $t1, fin 23 | mul $t4, $t4, $t0 24 | add $t4, $t4, $t3 25 | div $t2, $t2, $t0 26 | 27 | j boucle 28 | fin: 29 | 30 | li $v0, 1 31 | move $a0, $t4 32 | syscall 33 | #========================= FIN ======================== 34 | li $v0, 10 35 | syscall 36 | .end main -------------------------------------------------------------------------------- /OPP/Exprivate/src/main/java/com/mycompany/exprivate/TestPrivate.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license 3 | * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template 4 | */ 5 | package com.mycompany.exprivate; 6 | 7 | /** 8 | * 9 | * @author USER 10 | */ 11 | public class TestPrivate { 12 | 13 | public static void main(String[] args) { 14 | System.out.println("Hello World!"); 15 | 16 | Exprivate my = new Exprivate("mohammed"); 17 | // System.out.println("name is "+my.name); error 18 | my.getName(); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /OPP/Carre/src/main/java/com/mycompany/carre/Carre.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license 3 | */ 4 | 5 | package com.mycompany.carre; 6 | 7 | /** 8 | * 9 | * @author USER 10 | */ 11 | public class Carre { 12 | 13 | public float longueur ; 14 | 15 | public Carre(float l) { 16 | longueur = l; 17 | } 18 | 19 | public float surface(){ 20 | 21 | return longueur*longueur; 22 | 23 | } 24 | 25 | public void affiche(){ 26 | System.out.println("surface d’un carre " +surface() + "cm2") ; 27 | } 28 | 29 | 30 | } 31 | -------------------------------------------------------------------------------- /OPP/person/src/main/java/com/mycompany/person/main.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license 3 | * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template 4 | */ 5 | package com.mycompany.person; 6 | 7 | /** 8 | * 9 | * @author USER 10 | */ 11 | public class main { 12 | public static void main(String[] args) { 13 | 14 | etd my = new etd("khamed mohammed taha",22,"alg cite alg",39011111,2019); 15 | 16 | my.exp(); 17 | 18 | System.out.println("----------------"); 19 | 20 | 21 | 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /OPP/point/src/main/java/com/mycompany/point/Point.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license 3 | */ 4 | 5 | package com.mycompany.point; 6 | 7 | /** 8 | * 9 | * @author USER 10 | */ 11 | class Point { 12 | int x; 13 | int y; 14 | Point(){ 15 | this.x=0; 16 | this.y=0; 17 | } 18 | Point(int x,int y){ 19 | this.x=x; 20 | this.y=y; 21 | } 22 | void deplace(int x, int y) { 23 | this. x= this. x+ x ; 24 | this. y= this. y+ y ; 25 | } 26 | void afficher() { 27 | System.out.println(" ["+x +","+y+"]") ; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /OPP/Nomber/src/main/java/com/mycompany/nomber/Nomber.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license 3 | */ 4 | 5 | package com.mycompany.nomber; 6 | 7 | /** 8 | * 9 | * @author USER 10 | */ 11 | public class Nomber { 12 | float a; 13 | float b ; 14 | float c; 15 | float d; 16 | 17 | public Nomber(float x,float y , float w, float z) { 18 | a = x; 19 | b = y; 20 | c = w; 21 | d = z; 22 | } 23 | 24 | public float somme(){ 25 | return a+b+c+d; 26 | } 27 | 28 | public float mult(){ 29 | return a*b*c*d; 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /AO/TP AO/boucle 2.asm: -------------------------------------------------------------------------------- 1 | .data 2 | msg1: .asciiz "\n\n enter votre nbr svp! : " 3 | msg2: .asciiz "................." 4 | nbr: .word 1 5 | 6 | .text 7 | main: 8 | 9 | lw $t0, nbr 10 | lw $t1, nbr 11 | 12 | li $v0, 4 13 | la $a0, msg1 14 | syscall 15 | 16 | li $v0, 5 17 | syscall 18 | move $t2, $v0 19 | #======================== boucle ================== 20 | boucle: 21 | mul $t0,$t0,$t1 22 | beq $t2, $t1, fin # condition... 23 | addi $t1,$t1, 1 24 | 25 | j boucle 26 | fin: 27 | #==================================================== 28 | li $v0, 4 29 | la $a0, msg2 30 | syscall 31 | 32 | li $v0, 1 33 | move $a0, $t0 34 | syscall 35 | 36 | li $v0, 10 37 | syscall 38 | .end main -------------------------------------------------------------------------------- /AO/TP AO/mips1.asm: -------------------------------------------------------------------------------- 1 | .data 2 | msg1: .asciiz "\n\n enter votre nbr svp! : " 3 | msg2: .asciiz "................." 4 | nbr: .word 1 5 | 6 | .text 7 | main: 8 | 9 | lw $t0, nbr 10 | lw $t1, nbr 11 | 12 | li $v0, 4 13 | la $a0, msg1 14 | syscall 15 | 16 | li $v0, 5 17 | syscall 18 | move $t2, $v0 19 | #======================== boucle ================== 20 | boucle: 21 | mul $t0,$t0,$t1 22 | beq $t2, $t1, fin # condition... 23 | addi $t1,$t1, 1 24 | 25 | j boucle 26 | fin: 27 | #==================================================== 28 | li $v0, 4 29 | la $a0, msg2 30 | syscall 31 | 32 | li $v0, 1 33 | move $a0, $t0 34 | syscall 35 | 36 | li $v0, 10 37 | syscall 38 | .end main -------------------------------------------------------------------------------- /OPP/Carre/src/main/java/com/mycompany/carre/main.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license 3 | * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template 4 | */ 5 | package com.mycompany.carre; 6 | 7 | /** 8 | * 9 | * @author USER 10 | */ 11 | public class main { 12 | public static void main(String[] args) { 13 | 14 | Carre C = new Carre(4); 15 | 16 | System.out.println("surface d’un carre " +C.surface() + "cm2") ; 17 | 18 | Parallélépipède M = new Parallélépipède(3,10,2); 19 | 20 | M.affiche(); 21 | 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /OPP/Pr/src/main/java/com/mycompany/pr/main.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license 3 | * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template 4 | */ 5 | package com.mycompany.pr; 6 | 7 | /** 8 | * 9 | * @author USER 10 | */ 11 | public class main { 12 | public static void main(String[] args) { 13 | 14 | 15 | Pr p1 = new Pr("khamed yahya",18,"Gardaia"); 16 | p1.info(); 17 | System.out.println("-----------------------------------------------"); 18 | Emh emh1 = new Emh(4,302019,"Data S",250,"karim",27,"Ouargla"); 19 | emh1.info(); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /ASD 3/TP2ASD3/insert.c: -------------------------------------------------------------------------------- 1 | #include "mylib.h" 2 | 3 | struct mylist * insertR(struct mylist** head,int v){ 4 | 5 | struct mylist *temp=(struct mylist*)malloc(sizeof(struct mylist)); // this line cret new noed . 6 | 7 | temp->val= v; // We put value in new noed 8 | 9 | temp->prv=NULL; // .... and prvese ==>NULL because adding in bigen . 10 | 11 | temp->next=(*head); 12 | 13 | if((*head)!= NULL){ //This is a process that does in addition to bidirectonal linked list (mylist ==> head) . 14 | 15 | (*head)->prv = temp; 16 | } 17 | else{ 18 | 19 | (*head)=temp; // This is a case ===> head==NULL 20 | 21 | } 22 | 23 | return (*head); 24 | } 25 | -------------------------------------------------------------------------------- /OPP/Livre/src/main/java/com/mycompany/livre/Livre.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license 3 | */ 4 | 5 | package com.mycompany.livre; 6 | 7 | /** 8 | * 9 | * @author USER 10 | */ 11 | public class Livre { 12 | String Titre; 13 | String Auteur; 14 | float Prix; 15 | Livre(){ 16 | 17 | } 18 | Livre(String t,String a,float p){ 19 | Titre=t; 20 | Auteur=a; 21 | Prix=p; 22 | } 23 | public void Afficher(){ 24 | System.out.println("Book information"); 25 | System.out.println("Title :"+Titre); 26 | System.out.println("Writer :"+Auteur); 27 | System.out.println("Price :"+Prix); 28 | } 29 | } 30 | 31 | -------------------------------------------------------------------------------- /OPP/Pr/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | com.mycompany 5 | Pr 6 | 1.0-SNAPSHOT 7 | jar 8 | 9 | UTF-8 10 | 19 11 | 19 12 | com.mycompany.pr.Pr 13 | 14 | -------------------------------------------------------------------------------- /OPP/TV/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | com.mycompany 5 | TV 6 | 1.0-SNAPSHOT 7 | jar 8 | 9 | UTF-8 10 | 19 11 | 19 12 | com.mycompany.tv.TV 13 | 14 | -------------------------------------------------------------------------------- /OPP/point/src/main/java/com/mycompany/point/Pointmain.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license 3 | * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template 4 | */ 5 | package com.mycompany.point; 6 | 7 | /** 8 | * 9 | * @author USER 10 | */ 11 | public class Pointmain { 12 | public static void main(String[] args) { 13 | Point P = new Point(3,5); // creation d’un objet P de classe Point 14 | System.out.println( "avant le deplacement") ; 15 | P.afficher(); // appel de la methode afficher 16 | P.deplace(2,1) ; // appel de la methodedeplace 17 | System.out.println( "apres le deplacement" ) ; 18 | P.afficher(); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /OPP/TP1/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | com.mycompany 5 | TP1 6 | 1.0-SNAPSHOT 7 | jar 8 | 9 | UTF-8 10 | 19 11 | 19 12 | com.mycompany.tp1.TP1 13 | 14 | -------------------------------------------------------------------------------- /OPP/Carre/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | com.mycompany 5 | Carre 6 | 1.0-SNAPSHOT 7 | jar 8 | 9 | UTF-8 10 | 19 11 | 19 12 | com.mycompany.carre.Carre 13 | 14 | -------------------------------------------------------------------------------- /OPP/Livre/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | com.mycompany 5 | Livre 6 | 1.0-SNAPSHOT 7 | jar 8 | 9 | UTF-8 10 | 19 11 | 19 12 | com.mycompany.livre.Livre 13 | 14 | -------------------------------------------------------------------------------- /OPP/Test/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | com.mycompany 5 | Test 6 | 1.0-SNAPSHOT 7 | jar 8 | 9 | UTF-8 10 | 19 11 | 19 12 | com.mycompany.test.Test 13 | 14 | -------------------------------------------------------------------------------- /OPP/point/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | com.mycompany 5 | point 6 | 1.0-SNAPSHOT 7 | jar 8 | 9 | UTF-8 10 | 19 11 | 19 12 | com.mycompany.point.Point 13 | 14 | -------------------------------------------------------------------------------- /OPP/Nomber/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | com.mycompany 5 | Nomber 6 | 1.0-SNAPSHOT 7 | jar 8 | 9 | UTF-8 10 | 19 11 | 19 12 | com.mycompany.nomber.Nomber 13 | 14 | -------------------------------------------------------------------------------- /OPP/Pointa/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | com.mycompany 5 | Pointa 6 | 1.0-SNAPSHOT 7 | jar 8 | 9 | UTF-8 10 | 19 11 | 19 12 | com.mycompany.pointa.Pointa 13 | 14 | -------------------------------------------------------------------------------- /OPP/person/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | com.mycompany 5 | person 6 | 1.0-SNAPSHOT 7 | jar 8 | 9 | UTF-8 10 | 19 11 | 19 12 | com.mycompany.person.Person 13 | 14 | -------------------------------------------------------------------------------- /OPP/Article/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | com.mycompany 5 | Article 6 | 1.0-SNAPSHOT 7 | jar 8 | 9 | UTF-8 10 | 19 11 | 19 12 | com.mycompany.article.Article 13 | 14 | -------------------------------------------------------------------------------- /OPP/Etudiant/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | com.mycompany 5 | Etudiant 6 | 1.0-SNAPSHOT 7 | jar 8 | 9 | UTF-8 10 | 19 11 | 19 12 | com.mycompany.etudiant.Etudiant 13 | 14 | -------------------------------------------------------------------------------- /OPP/Exprivate/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | com.mycompany 5 | Exprivate 6 | 1.0-SNAPSHOT 7 | jar 8 | 9 | UTF-8 10 | 19 11 | 19 12 | com.mycompany.exprivate.Exprivate 13 | 14 | -------------------------------------------------------------------------------- /OPP/Carre/src/main/java/com/mycompany/carre/Parallélépipède.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license 3 | * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template 4 | */ 5 | package com.mycompany.carre; 6 | 7 | /** 8 | * 9 | * @author USER 10 | */ 11 | public class Parallélépipède extends Rectangle { 12 | public float h ; 13 | 14 | public Parallélépipède(float h, float largeur, float l) { 15 | super(largeur,l); 16 | this.h = h; 17 | } 18 | 19 | public float volume(){ 20 | return super.surface()*h; 21 | } 22 | public void affiche(){ 23 | System.out.println("volume d’un Parallélépipède " +volume() + "cm3") ; 24 | } 25 | 26 | 27 | } 28 | -------------------------------------------------------------------------------- /OPP/mainTestTP01/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | com.mycompany 5 | mainTestTP01 6 | 1.0-SNAPSHOT 7 | jar 8 | 9 | UTF-8 10 | 19 11 | 19 12 | com.mycompany.maintesttp01.MainTestTP01 13 | 14 | -------------------------------------------------------------------------------- /OPP/mavenproject1/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | com.mycompany 5 | mavenproject1 6 | 1.0-SNAPSHOT 7 | jar 8 | 9 | UTF-8 10 | 19 11 | 19 12 | com.mycompany.mavenproject1.Mavenproject1 13 | 14 | -------------------------------------------------------------------------------- /AO/TP AO/nbr_paire.asm: -------------------------------------------------------------------------------- 1 | .data 2 | msg1: .asciiz "\n entre un nombre : " 3 | msg2: .asciiz "\n\n les nombres d'entiers paires est = " 4 | 5 | qs: .word 2 6 | .text 7 | main: 8 | lw $t0, qs 9 | 10 | boucle: 11 | li $v0, 4 12 | la $a0, msg1 13 | syscall 14 | 15 | li $v0, 5 16 | syscall 17 | move $t1, $v0 18 | 19 | rem $t3,$t1,$t0 20 | 21 | beq $t3, $t4, label 22 | j fn 23 | label: 24 | addi $t5, $t5, 1 25 | fn: 26 | 27 | beq $t1, $t2, fin 28 | 29 | j boucle 30 | fin: 31 | 32 | li $v0, 4 33 | la $a0, msg2 34 | syscall 35 | 36 | li $v0, 1 37 | move $a0, $t5 38 | syscall 39 | 40 | #===================== fin ================== 41 | li $v0, 10 42 | syscall 43 | .end main -------------------------------------------------------------------------------- /OPP/Rectangle/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | com.mycompany 5 | Rectangle 6 | 1.0-SNAPSHOT 7 | jar 8 | 9 | UTF-8 10 | 19 11 | 19 12 | com.mycompany.test2.Test2 13 | 14 | Rectangle 15 | -------------------------------------------------------------------------------- /AO/TP AO/revision_miroir.asm: -------------------------------------------------------------------------------- 1 | .data 2 | msg1: .asciiz "\n entre un nbr : " 3 | msg2: .asciiz "\n un nbr propres " 4 | 5 | as: .word 1 6 | qs: .word 7 7 | 8 | .text 9 | main: 10 | 11 | lw $t4, as 12 | lw $t5, qs 13 | li $v0, 4 14 | la $a0, msg1 15 | syscall 16 | 17 | li $v0, 5 18 | syscall 19 | move $t0, $v0 20 | 21 | addi $t2, $t0, -1 22 | boucle: 23 | rem $t1, $t0, $t4 24 | beq $t1, $t6, label 25 | 26 | j fn 27 | label : 28 | add $t3, $t3, $t4 29 | fn: 30 | addi $t4, $t4, 1 31 | beq $t4, $t2, fin 32 | 33 | j boucle 34 | fin: 35 | 36 | 37 | 38 | beq $t3, $t5, labe 39 | j fni 40 | labe: 41 | li $v0, 4 42 | la $a0, msg2 43 | syscall 44 | 45 | fni: 46 | 47 | 48 | 49 | 50 | #======================== 51 | li $v0, 10 52 | syscall 53 | .end main 54 | -------------------------------------------------------------------------------- /AO/TP AO/converte vers binaire.asm: -------------------------------------------------------------------------------- 1 | .data 2 | as: .word 2 3 | bs: .word 10 4 | cs: .word 1 5 | gs: .word 0 6 | msg1: .asciiz "entre un nombre : " 7 | msg2: .asciiz "\n la resultat en binaire est : " 8 | 9 | .text 10 | main: 11 | lw $t0, as 12 | lw $t1, bs 13 | lw $t3, cs 14 | lw $t5, gs 15 | 16 | li $v0, 4 17 | la $a0, msg1 18 | syscall 19 | 20 | li $v0, 5 21 | syscall 22 | move $t2, $v0 23 | 24 | boucle: 25 | rem $t4, $t2, $t0 26 | mul $t4, $t4, $t3 27 | mul $t3, $t3, $t1 28 | add $t6, $t6, $t4 29 | beq $t2, $t5, fin 30 | div $t2, $t2, $t0 31 | 32 | j boucle 33 | fin: 34 | 35 | li $v0, 4 36 | la $a0, msg2 37 | syscall 38 | 39 | li $v0, 1 40 | move $a0, $t6 41 | syscall 42 | 43 | #================= FIN ================== 44 | li $v0, 10 45 | syscall 46 | .end main -------------------------------------------------------------------------------- /OPP/Pr/src/main/java/com/mycompany/pr/Pr.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license 3 | */ 4 | 5 | package com.mycompany.pr; 6 | 7 | /** 8 | * 9 | * @author USER 10 | */ 11 | public class Pr { 12 | public String name ; 13 | public int age; 14 | public String adrres; 15 | 16 | public Pr(String name, int age, String adrres) { 17 | this.name = name; 18 | this.age = age; 19 | this.adrres = adrres; 20 | } 21 | 22 | public void info(){ 23 | 24 | System.out.println(" Name :"+name); 25 | System.out.println(" Age :"+age); 26 | System.out.println(" Adrres :"+adrres); 27 | 28 | } 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | } 39 | -------------------------------------------------------------------------------- /AO/TP AO/Fibonacci.asm: -------------------------------------------------------------------------------- 1 | .data 2 | 3 | a: .word 1 4 | b: .word 1 5 | #n: .word 6 6 | c: .word 1 7 | msg1: .asciiz " U" 8 | msg2: .asciiz " = " 9 | msg3: .asciiz "\n calcul un terme n Fibonacci : \n entre un terme n : " 10 | 11 | 12 | .text 13 | main: 14 | lw $t0, a 15 | lw $t1, b 16 | #lw $t2, n 17 | lw $t4, c 18 | 19 | li $v0, 4 20 | la $a0, msg3 21 | syscall 22 | 23 | li $v0, 5 24 | syscall 25 | move $t2, $v0 26 | 27 | boucle: 28 | add $t3, $t1, $t0 29 | move $t0, $t1 30 | move $t1, $t3 31 | addi $t4, $t4, 1 32 | beq $t4, $t2, fin 33 | 34 | j boucle 35 | fin: 36 | li $v0, 4 37 | la $a0, msg1 38 | syscall 39 | 40 | li $v0, 1 41 | move $a0, $t2 42 | syscall 43 | 44 | li $v0, 4 45 | la $a0, msg2 46 | syscall 47 | 48 | li $v0, 1 49 | move $a0, $t3 50 | syscall 51 | #============== fin ========== 52 | li $v0, 10 53 | syscall 54 | .end main -------------------------------------------------------------------------------- /OPP/Carre/src/main/java/com/mycompany/carre/Rectangle.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license 3 | * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template 4 | */ 5 | package com.mycompany.carre; 6 | 7 | /** 8 | * 9 | * @author USER 10 | */ 11 | public class Rectangle extends Carre { // عندما نريد ورثة من كلاص اخر 12 | public float largeur ; 13 | 14 | public Rectangle(float largeur, float l) { 15 | super(l); 16 | this.largeur = largeur; 17 | } 18 | 19 | 20 | public float surface(){ 21 | return largeur*longueur; 22 | } 23 | 24 | public void affiche(){ 25 | System.out.println("surface d’un Rectangle " +surface() + "cm2") ; 26 | } 27 | 28 | 29 | 30 | 31 | } 32 | -------------------------------------------------------------------------------- /OPP/TV/src/main/java/com/mycompany/tv/TestTV.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license 3 | * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template 4 | */ 5 | package com.mycompany.tv; 6 | 7 | /** 8 | * 9 | * @author USER 10 | */ 11 | import java.util.Scanner; 12 | public class TestTV { 13 | public static void main(String[] args) { 14 | TV mytv =new TV(); 15 | System.out.println("volume : "+mytv.volume); 16 | mytv.setChine(22); 17 | mytv.setChine(3); 18 | mytv.setChine(5); 19 | mytv.setChine(66); 20 | mytv.setChine(90); 21 | System.out.println("---chain--- : "+mytv.chaine); 22 | mytv.reCall(); 23 | mytv.volUp(); 24 | mytv.volUp(); 25 | System.out.println("volume : "+mytv.volume); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /AO/TP AO/TP3_ex3.asm: -------------------------------------------------------------------------------- 1 | .data 2 | qs: .word 23 3 | ss: .word 1 4 | ms: .word 2 5 | msg1: .asciiz " est paire !\n" 6 | msg2: .asciiz " \n" 7 | .text 8 | main: 9 | 10 | lw $t0, qs 11 | lw $t1, ss 12 | lw $t2, ms 13 | 14 | boucle: 15 | rem $t3, $t1, $t2 16 | beq $t3, $t4, label 17 | li $v0, 1 18 | move $a0, $t1 19 | syscall 20 | li $v0, 4 21 | la $a0, msg2 22 | syscall 23 | j fn 24 | label: 25 | li $v0, 1 26 | move $a0, $t1 27 | syscall 28 | li $v0, 4 29 | la $a0, msg1 30 | syscall 31 | fn: 32 | beq $t1, $t0, fin 33 | addi $t1, $t1, 1 34 | 35 | j boucle 36 | fin: 37 | 38 | #=============== FIN ============ 39 | li $v0, 10 40 | syscall 41 | .end main -------------------------------------------------------------------------------- /OPP/TP1/src/main/java/com/mycompany/tp1/heuteur.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license 3 | * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template 4 | */ 5 | package com.mycompany.tp1; 6 | 7 | /** 8 | * 9 | * @author USER 10 | */ 11 | public class heuteur { 12 | int h; 13 | heuteur(int h){ 14 | this.h=h; 15 | } 16 | void dep(int x){ 17 | int i; 18 | for(i=1;i<=x;i++){ 19 | System.out.print(" "); 20 | } 21 | } 22 | void work(){ 23 | int i; 24 | int h1=this.h; 25 | for(i=1;i<=this.h;i++){ 26 | dep(h1); 27 | for(int j =1;j<=i;j++){ 28 | System.out.print("*"); 29 | System.out.print(" "); 30 | } 31 | System.out.println(); 32 | h1--; 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /OPP/Test/src/main/java/com/mycompany/test/Etoile.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license 3 | * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template 4 | */ 5 | package com.mycompany.test; 6 | 7 | /** 8 | * 9 | * @author USER 10 | */ 11 | public class Etoile { 12 | int h; 13 | Etoile(int h){ 14 | this.h=h; 15 | } 16 | void dep(int x){ 17 | int i; 18 | for(i=1;i<=x;i++){ 19 | System.out.print(" "); 20 | } 21 | } 22 | void afficher(){ 23 | int i; 24 | int h1=this.h; 25 | for(i=1;i<=this.h;i++){ 26 | dep(h1); 27 | for(int j =1;j<=i;j++){ 28 | System.out.print("*"); 29 | System.out.print(" "); 30 | } 31 | System.out.println(); 32 | h1--; 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /OPP/Article/src/main/java/com/mycompany/article/Test0.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license 3 | * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template 4 | */ 5 | package com.mycompany.article; 6 | 7 | /** 8 | * 9 | * @author USER 10 | */ 11 | public class Test0 { 12 | public static void main(String[] args) { 13 | Article a = new Article(); 14 | 15 | System.out.print(a.toString()); 16 | System.out.println("----------------------"); 17 | 18 | System.out.println(" "+a.getDesing()+"---"+a.getPrix()+"---"+a.getTotal_vente()); 19 | a.vente(15); 20 | 21 | System.out.print(a.toString()); 22 | a.setPrix(70000); 23 | System.out.print(a.toString()); 24 | 25 | 26 | 27 | 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /OPP/Pointa/src/main/java/com/mycompany/pointa/Pointa.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license 3 | */ 4 | 5 | package com.mycompany.pointa; 6 | 7 | /** 8 | * 9 | * @author USER 10 | */ 11 | public class Pointa { 12 | int x; 13 | int y; 14 | static int var_statique=7; 15 | 16 | Pointa(int a,int b){ 17 | var_statique=var_statique+3; 18 | x = a; 19 | y = b ; 20 | afficherCoordonnees(); 21 | 22 | } 23 | static void methode_statique(){ 24 | var_statique++; 25 | } 26 | void afficherCoordonnees(){ //(4,2) var_static = 12 27 | x++; 28 | System.out.println("("+x+","+y+")"); // (4,2) 29 | var_statique++; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /OPP/Pr/src/main/java/com/mycompany/pr/Emh.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license 3 | * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template 4 | */ 5 | package com.mycompany.pr; 6 | 7 | /** 8 | * 9 | * @author USER 10 | */ 11 | public class Emh extends Em{ 12 | 13 | public int h; 14 | 15 | public Emh(int h, int code, String jobe, float salire, String name, int age, String adrres) { 16 | super(code, jobe, salire, name, age, adrres); 17 | this.h = h; 18 | } 19 | 20 | private float salireEMH(){ 21 | 22 | return h*salire; 23 | 24 | } 25 | 26 | public void info(){ 27 | 28 | super.info(); 29 | System.out.println(" salireEMH (h) :"+salireEMH()); 30 | 31 | } 32 | 33 | 34 | 35 | 36 | 37 | } 38 | -------------------------------------------------------------------------------- /AO/TP AO/remplire et affiche tableau.asm: -------------------------------------------------------------------------------- 1 | .data 2 | tab: .space 20 3 | msg1: .asciiz "\n Donnez la dimension du tableau : " 4 | msg2: .asciiz "Insrer l'element svp : " 5 | msg3: .asciiz " " 6 | 7 | .text 8 | main: 9 | la $t0, tab 10 | addi $t1, $zero, 0 11 | 12 | li $v0, 4 13 | la $a0, msg1 14 | syscall 15 | 16 | li $v0, 5 17 | syscall 18 | move $t2, $v0 19 | 20 | remplire: 21 | beq $t1, $t2, suite 22 | 23 | li $v0, 4 24 | la $a0, msg2 25 | syscall 26 | 27 | li $v0, 5 28 | syscall 29 | move $t3, $v0 30 | 31 | sw $t3, ($t0) 32 | addi $t0, $t0, 4 33 | addi $t1, $t1, 1 34 | b remplire 35 | suite: 36 | 37 | la $t0, tab 38 | addi $t1, $zero, 0 39 | 40 | afficher: 41 | beq $t1, $t2, fin 42 | 43 | lw $t3, ($t0) 44 | 45 | li $v0, 1 46 | move $a0, $t3 47 | syscall 48 | 49 | li $v0, 4 50 | la $a0, msg3 51 | syscall 52 | 53 | addi $t0, $t0, 4 54 | addi $t1, $t1, 1 55 | 56 | b afficher 57 | fin: 58 | 59 | 60 | #============= fin ======== 61 | li $v0, 10 62 | syscall 63 | .end main -------------------------------------------------------------------------------- /AO/TP AO/nombre premier.asm: -------------------------------------------------------------------------------- 1 | .data 2 | as: .word 22 3 | bs: .word 2 4 | 5 | 6 | msg1: .asciiz "\n le nombre " 7 | msg2: .asciiz " est premier ! " 8 | msg3: .asciiz " est non premier ! " 9 | 10 | .text 11 | main: 12 | 13 | lw $t0, as 14 | lw $t1, bs 15 | lw $t2, bs 16 | lw $t5, bs 17 | 18 | loop: 19 | 20 | li $v0, 4 21 | la $a0, msg1 22 | syscall 23 | 24 | li $v0, 1 25 | move $a0, $t2 26 | syscall 27 | 28 | boucle: 29 | rem $t3, $t2, $t1 30 | beq $t3, $t4, fin 31 | addi $t1, $t1, 1 32 | j boucle 33 | fin: 34 | # ==================== cond if pre ============ 35 | bne $t2, $t1, label 36 | li $v0, 4 37 | la $a0, msg2 38 | syscall 39 | j exit 40 | label: 41 | li $v0, 4 42 | la $a0, msg3 43 | syscall 44 | exit: 45 | 46 | beq $t2, $t0, fn 47 | addi $t2, $t2, 1 48 | move $t1, $t5 49 | j loop 50 | fn: 51 | #============== FIN ================= 52 | li $v0, 10 53 | syscall 54 | .end main 55 | -------------------------------------------------------------------------------- /OPP/Pr/src/main/java/com/mycompany/pr/Em.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license 3 | * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template 4 | */ 5 | package com.mycompany.pr; 6 | 7 | /** 8 | * 9 | * @author USER 10 | */ 11 | public class Em extends Pr{ 12 | public int code ; 13 | public String jobe; 14 | public float salire ; 15 | 16 | public Em(int code, String jobe, float salire, String name, int age, String adrres) { 17 | super(name, age, adrres); 18 | this.code = code; 19 | this.jobe = jobe; 20 | this.salire = salire; 21 | } 22 | 23 | public void info(){ 24 | 25 | super.info(); 26 | System.out.println(" Code :"+code); 27 | System.out.println(" Name job :"+jobe); 28 | System.out.println(" Dz :"+salire); 29 | 30 | 31 | } 32 | 33 | 34 | 35 | } 36 | -------------------------------------------------------------------------------- /OPP/Pointa/src/main/java/com/mycompany/pointa/Program.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license 3 | * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template 4 | */ 5 | package com.mycompany.pointa; 6 | 7 | /** 8 | * 9 | * @author USER 10 | */ 11 | public class Program { 12 | public static void main(String[] args) { 13 | 14 | Pointa p2 = new Pointa(2,2); 15 | p2.afficherCoordonnees(); 16 | Pointa.methode_statique(); // p2.methode_statique(); 17 | p2.methode_statique(); 18 | //Pointa.afficherCoordonnees(); 19 | System.out.println(Pointa.var_statique); 20 | } 21 | } 22 | 23 | /* 24 | x y var_statique 25 | Pointa p2 = new Pointa(2,2); | 3 | 2 | 11 26 | p2.afficherCoordonnees(); | 4 | 2 | 12 27 | Pointa.methode_statique(); | 4 | 2 | 13 28 | System.out.println(Pointa.var_statique); == > var_static 14 29 | 30 | 31 | 32 | */ -------------------------------------------------------------------------------- /AO/TP AO/intero.asm: -------------------------------------------------------------------------------- 1 | .data 2 | msg1: .asciiz "\n Donnez une liste de nombres :\n" 3 | msg2: .asciiz "La liste contient: " 4 | msg3: .asciiz " nombres\n" 5 | msg4: .asciiz "Le maximum est: " 6 | msg5: .asciiz "\nSa position est: " 7 | 8 | .text 9 | main: 10 | 11 | li $v0, 4 12 | la $a0, msg1 13 | syscall 14 | 15 | boucle: 16 | 17 | li $v0, 5 18 | syscall 19 | move $t0, $v0 20 | addi $t1, $t1, 1 21 | bgt $t0, $t3,label 22 | j fn 23 | label: 24 | move $t3, $t0 25 | move $t4, $t1 26 | fn: 27 | 28 | 29 | beq $t0, $t7, fin 30 | j boucle 31 | fin: 32 | 33 | li $v0, 4 34 | la $a0, msg2 35 | syscall 36 | 37 | li $v0, 1 38 | move $a0, $t1 39 | syscall 40 | 41 | li $v0, 4 42 | la $a0, msg3 43 | syscall 44 | 45 | li $v0, 4 46 | la $a0, msg4 47 | syscall 48 | 49 | li $v0, 1 50 | move $a0, $t3 51 | syscall 52 | 53 | li $v0, 4 54 | la $a0, msg5 55 | syscall 56 | 57 | li $v0, 1 58 | move $a0, $t4 59 | syscall 60 | 61 | #=========================================== 62 | li $v0,10 63 | syscall 64 | .end main -------------------------------------------------------------------------------- /OPP/person/src/main/java/com/mycompany/person/Person.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license 3 | */ 4 | 5 | package com.mycompany.person; 6 | 7 | /** 8 | * 9 | * @author USER 10 | */ 11 | public class Person { 12 | private String Fullname; 13 | private int age; 14 | private String adress; 15 | 16 | public Person() { 17 | 18 | System.out.println("vid constrecter"); 19 | 20 | } 21 | 22 | 23 | 24 | public Person( String Fullname ,int age,String adress){ 25 | this.Fullname=Fullname; 26 | this.adress=adress; 27 | this.age=age; 28 | } 29 | public String getName(){ 30 | return Fullname; 31 | } 32 | public int getAge(){ 33 | return age; 34 | } 35 | public String getAdress(){ 36 | return adress; 37 | } 38 | public void exp(){ 39 | System.out.println("Full name : "+getName()); 40 | System.out.println("Age : "+getAge()); 41 | System.out.println("Adress : "+getAdress()); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /OPP/Nomber/src/main/java/com/mycompany/nomber/main.java: -------------------------------------------------------------------------------- 1 | /*; 2 | * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license 3 | * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template 4 | */ 5 | package com.mycompany.nomber; 6 | 7 | /** 8 | * 9 | * @author USER 10 | */ 11 | import java.util.Scanner; 12 | public class main { 13 | public static void main(String[] args) { 14 | float x,y,w,z; 15 | Scanner input = new Scanner(System.in); 16 | 17 | System.out.println("Donne nomber 1 :"); 18 | x = input.nextFloat(); 19 | 20 | System.out.println("Donne nomber 2 :"); 21 | y = input.nextFloat(); 22 | 23 | System.out.println("Donne nomber 3 :"); 24 | w = input.nextFloat(); 25 | 26 | System.out.println("Donne nomber 4 :"); 27 | z = input.nextFloat(); 28 | 29 | Nomber M1 = new Nomber(x,y,w,z); 30 | 31 | System.out.println("somme :"+M1.somme()); 32 | System.out.println("multple : "+M1.mult()); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /AO/TP AO/TP3_ex4.asm: -------------------------------------------------------------------------------- 1 | .data 2 | msg: .asciiz " entre votre valeur : " 3 | msg1: .asciiz "\n la table multiplication est : \n\n " 4 | msg3: .asciiz " x " 5 | msg4: .asciiz " = " 6 | msg5: .asciiz "\n " 7 | as: .word 0 8 | cs: .word 10 9 | 10 | .text 11 | main: 12 | lw $t0, as 13 | lw $t4, cs 14 | 15 | li $v0, 4 16 | la $a0, msg 17 | syscall 18 | 19 | li $v0, 5 20 | syscall 21 | move $t1, $v0 22 | 23 | li $v0, 4 24 | la $a0, msg1 25 | syscall 26 | 27 | boucle: 28 | li $v0, 1 29 | move $a0, $t1 30 | syscall 31 | li $v0, 4 32 | la $a0, msg3 33 | syscall 34 | li $v0, 1 35 | move $a0, $t0 36 | syscall 37 | li $v0, 4 38 | la $a0, msg4 39 | syscall 40 | mul $t2,$t1,$t0 41 | li $v0, 1 42 | move $a0, $t2 43 | syscall 44 | li $v0, 4 45 | la $a0, msg5 46 | syscall 47 | beq $t0, $t4, fin 48 | addi $t0, $t0, 1 49 | j boucle 50 | fin: 51 | 52 | 53 | #==================== fin ================ 54 | li $v0, 10 55 | syscall 56 | .end main 57 | -------------------------------------------------------------------------------- /OPP/Livre/src/main/java/com/mycompany/livre/TestLivre.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license 3 | * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template 4 | */ 5 | package com.mycompany.livre; 6 | 7 | /** 8 | * 9 | * @author USER 10 | */ 11 | import java.util.Scanner; 12 | public class TestLivre { 13 | public static void main(String[] args) { 14 | 15 | Scanner input =new Scanner(System.in); 16 | System.out.print("GEV ME Title :"); 17 | String t=input.nextLine(); 18 | System.out.println(); 19 | System.out.print("GEV ME Writer :"); 20 | String w=input.nextLine(); 21 | System.out.println(); 22 | System.out.print("GEV ME Price :"); 23 | float p=input.nextFloat(); 24 | System.out.println("- - - - - - - - - - - - "); 25 | 26 | Livre L1 =new Livre(t,w,p); 27 | L1.Afficher(); 28 | System.out.println("- - - - - - - - - - - - "); 29 | Livre L2 =new Livre("Programmee en langage C","Claude Delannoy",1200); 30 | L2.Afficher(); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /AO/TP AO/nombre parfait.asm: -------------------------------------------------------------------------------- 1 | .data 2 | msg1: .asciiz "\n detacte nombre parfait \n enter votre nombre : " 3 | msg2: .asciiz " est parfait" 4 | msg3: .asciiz " non parfait" 5 | msg4: .asciiz "\n le nombre " 6 | w: .word 1 7 | k: .word 8128 8 | 9 | .text 10 | main: 11 | lw $t1, w 12 | lw $t0, k 13 | #lw $t7, k 14 | #============================== 15 | li $v0, 4 16 | la $a0, msg1 17 | syscall 18 | li $v0, 5 19 | syscall 20 | move $t7, $v0 21 | move $t8, $v0 22 | #============================== 23 | addi $t7, $t7, -1 24 | 25 | li $v0, 4 26 | la $a0, msg4 27 | syscall 28 | 29 | li $v0, 1 30 | move $a0, $t8 31 | syscall 32 | 33 | boucle: 34 | rem $t2, $t0, $t1 35 | beq $t2, $t3, label 36 | 37 | j fin 38 | label: 39 | add $t4, $t4, $t1 40 | fin: 41 | beq $t1, $t7, fn 42 | addi $t1, $t1, 1 43 | j boucle 44 | fn: 45 | 46 | bne $t0, $t4, loop 47 | li $v0, 4 48 | la $a0, msg2 49 | syscall 50 | j exit 51 | loop: 52 | li $v0, 4 53 | la $a0, msg3 54 | syscall 55 | exit: 56 | # ================ FIN =============== 57 | li $v0, 10 58 | syscall 59 | .end main 60 | -------------------------------------------------------------------------------- /OPP/person/src/main/java/com/mycompany/person/etd.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license 3 | * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template 4 | */ 5 | package com.mycompany.person; 6 | 7 | /** 8 | * 9 | * @author USER 10 | */ 11 | 12 | import java.util.Scanner; 13 | public class etd extends Person{ 14 | private int idBac; 15 | private int anne; 16 | 17 | public etd() { 18 | } 19 | 20 | 21 | 22 | 23 | 24 | public etd(String Fullname, int age, String adress,int idBac,int anne ) { 25 | 26 | super(Fullname, age, adress); 27 | 28 | this.idBac =idBac; 29 | this.anne=anne; 30 | } 31 | 32 | 33 | 34 | public String getId(){ 35 | return ""+anne+""+idBac; 36 | } 37 | /* 38 | public void exp(){ 39 | System.out.println("ID : "+getId()); 40 | System.out.println("Full name : "+getName()); 41 | System.out.println("Age : "+getAge()); 42 | System.out.println("Adress : "+getAdress()); 43 | } 44 | */ 45 | public void exp(){ 46 | System.out.println("ID : "+getId()); 47 | super.exp(); 48 | 49 | 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /ASD 3/TP2ASD3/mylib.h: -------------------------------------------------------------------------------- 1 | #ifndef MYLIB_H_INCLUDED 2 | #define MYLIB_H_INCLUDED 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | 10 | /* 11 | 12 | This is library in which we define our own function . 13 | #include "mylib.h" 14 | */ 15 | 16 | //------------------------------------------------------- 17 | struct mylist{ // DECLARACTION BIDIRECTIONAL LINKED LIST . 18 | int val; 19 | struct mylist *next; 20 | struct mylist *prv; 21 | }; 22 | 23 | //-------------------------------------------------------- 24 | 25 | struct mylist* creatE();// This function creat bidirectonal linked list , file name :CREET_LIST.c . 26 | 27 | //-------------------------------------------------------- 28 | 29 | struct mylist* RemoveR(struct mylist **l,int v);//This function Remove ned in bidirectonal linked list , file name :Remove.c . 30 | 31 | //-------------------------------------------------------- 32 | 33 | struct mylist * insertR(struct mylist** head,int v); //this function adding neod in bidirectonal linked list , file name :insert.c . 34 | 35 | //-------------------------------------------------------- 36 | 37 | void printlist(struct mylist* head); // this function affichage all noeds in idirectonal linked list , file name : printlist.c . 38 | 39 | //-------------------------------------------------------- 40 | 41 | struct mylist * fillR(struct mylist *head,int N) 42 | 43 | //-------------------------------------------------------- 44 | #endif // MYLIB_H_INCLUDED 45 | -------------------------------------------------------------------------------- /ASD 3/TP2ASD3/Remove.c: -------------------------------------------------------------------------------- 1 | #include "mylib.h" 2 | 3 | /* 4 | this function Remove linked list but with the following specification (knowledge in library mylib.h) : 5 | 1-bidirectonal linked list. 6 | 2-remove in all posiction. 7 | */ 8 | 9 | struct mylist * RemoveR(struct mylist **l,int v){ 10 | int error=0; 11 | if((*l)==NULL) return NULL; 12 | struct mylist* temp=(*l); // temp pontier in linked list l . 13 | struct mulist* k; 14 | //delt in begin linked list . 15 | if(temp->prv == NULL && temp->val==v){ 16 | k=temp; 17 | temp=temp->next; 18 | temp->prv=NULL; 19 | free(k); 20 | (*l)=temp; 21 | return *l; 22 | }else{ //this else ==> temp->prv != NULL . 23 | 24 | while(temp->val!=v){ 25 | temp=temp->next; 26 | if(temp->next==NULL) break; // cas value v n'est pas in linked list. 27 | } 28 | 29 | 30 | if(temp->next!=NULL){ // this if ==> temp->prv != NULL and temp->next!=NULL , delt in milieu linked list . 31 | 32 | k=temp; 33 | temp->prv->next=temp->next; 34 | temp->next->prv=temp->prv; 35 | while(temp->prv!=NULL){ 36 | temp=temp->prv; 37 | } 38 | free(k); 39 | (*l)=temp; 40 | return *l; 41 | 42 | }else{ //this else ==> temp->prv != NULL and temp->next==NULL donc delt valuer v in fin linked list . 43 | 44 | k=temp; 45 | temp=temp->prv; 46 | temp->next=NULL; 47 | free(k); 48 | (*l)=temp; 49 | return *l; 50 | 51 | 52 | } 53 | 54 | } 55 | 56 | 57 | } 58 | -------------------------------------------------------------------------------- /AO/TP AO/anniversaire.asm: -------------------------------------------------------------------------------- 1 | .data 2 | msg1: .asciiz "\n Bienvenue " 3 | msg2: .asciiz "\n Joyeux anniversaire " 4 | msg3: .asciiz "\n Au revoir ! " 5 | msg4: .asciiz "\n entre la dete d'aujourd'hui : " 6 | msg5: .asciiz " / " 7 | msg6: .asciiz "\n entre la dete de naissance : " 8 | msg7: .asciiz "\n entre votre nom : " 9 | msg8: .asciiz "" 10 | 11 | .text 12 | main: 13 | #=================== date aujourd'hui 14 | li $v0, 4 15 | la $a0, msg4 16 | syscall 17 | 18 | li $v0, 5 19 | syscall 20 | move $t0, $v0 21 | 22 | li $v0, 4 23 | la $a0, msg5 24 | syscall 25 | 26 | li $v0, 5 27 | syscall 28 | move $t1, $v0 29 | 30 | li $v0, 4 31 | la $a0, msg5 32 | syscall 33 | 34 | li $v0, 5 35 | syscall 36 | move $t2, $v0 37 | #===================== nom 38 | li $v0, 4 39 | la $a0, msg7 40 | syscall 41 | 42 | li $v0, 8 43 | la $a0, msg8 44 | li $a1, 40 45 | syscall 46 | 47 | li $v0, 4 48 | la $a0, msg1 49 | syscall 50 | 51 | li $v0, 4 52 | la $a0, msg8 53 | syscall 54 | #===================== date de naissance 55 | li $v0, 4 56 | la $a0, msg6 57 | syscall 58 | 59 | li $v0, 5 60 | syscall 61 | move $t3, $v0 62 | 63 | li $v0, 4 64 | la $a0, msg5 65 | syscall 66 | 67 | li $v0, 5 68 | syscall 69 | move $t4, $v0 70 | 71 | li $v0, 4 72 | la $a0, msg5 73 | syscall 74 | 75 | li $v0, 5 76 | syscall 77 | move $t5, $v0 78 | #========================= calcul 79 | sub $t6, $t0, $t3 80 | sub $t7, $t1, $t4 81 | sub $t8, $t6, $t7 82 | #========================= connditionnel 83 | beq $t8, $t9, label 84 | li $v0, 4 85 | la $a0, msg3 86 | syscall 87 | 88 | j fin 89 | label: 90 | 91 | li $v0, 4 92 | la $a0, msg2 93 | syscall 94 | 95 | li $v0, 4 96 | la $a0, msg8 97 | syscall 98 | fin: 99 | #===================== FIN ================ 100 | li $v0, 10 101 | syscall 102 | .end main -------------------------------------------------------------------------------- /OPP/point/src/main/java/com/mycompany/point/main.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license 3 | * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template 4 | */ 5 | package com.mycompany.point; 6 | 7 | /** 8 | * 9 | * @author USER 10 | */ 11 | import java.util.Scanner; 12 | public class main { 13 | public static void main(String[] args) { 14 | System.out.println("Tp1"); 15 | Scanner input = new Scanner(System.in); 16 | String s="m"; 17 | String s1="m1"; 18 | 19 | 20 | System.out.print("Donne x de point :"); 21 | float x=input.nextFloat(); 22 | System.out.print("Donne y de point :"); 23 | float y=input.nextFloat(); 24 | 25 | System.out.print("Donne x de point 2 :"); 26 | float x1=input.nextFloat(); 27 | System.out.print("Donne y de point 2:"); 28 | float y1=input.nextFloat(); 29 | 30 | Point p =new Point(x,y,s); 31 | Point p1 =new Point(x1,y1,s1); 32 | 33 | p.afficher(); 34 | p1.afficher(); 35 | System.out.println("Choisis une option 1==>deplace point 2==>distance deux point "); 36 | System.out.print("yes ou no :"); 37 | int ga =input.nextInt(); 38 | if(ga ==1){ 39 | System.out.print("Donne dx :"); 40 | float dx=input.nextFloat(); 41 | System.out.print("Donne dy :"); 42 | float dy=input.nextFloat(); 43 | p.deplace(dx, dy); 44 | System.out.println("point apré deplce"); 45 | p.afficher(); 46 | } 47 | if(ga ==2){ 48 | System.out.println("distant deux point m et m2"); 49 | System.out.println("distant:"+p.distance(p1)); 50 | 51 | } 52 | else{ 53 | System.out.println("fin program //"); 54 | } 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /OPP/Etudiant/src/main/java/com/mycompany/etudiant/Etudiant.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license 3 | */ 4 | 5 | package com.mycompany.etudiant; 6 | 7 | /** 8 | * 9 | * @author USER 10 | */ 11 | import java.util.ArrayList; 12 | import java.util.Scanner; 13 | public class Etudiant { 14 | 15 | private String name ; 16 | private ArrayList listNotes ; 17 | private double moyenne; 18 | 19 | /* 20 | public Etudiant(String name){ 21 | this.name =name; 22 | } 23 | */ 24 | //--------constructeur------------ 25 | public Etudiant(String name,ArrayList list){ 26 | this.name = name ; 27 | listNotes = list ; 28 | } 29 | //----------getter---------------- 30 | public String getName(){ 31 | return name; 32 | } 33 | public ArrayList getListeNotes(){ 34 | return listNotes; 35 | } 36 | public double getMoyenne(){ 37 | moyenne = calcul_moy(); 38 | return moyenne; 39 | } 40 | //--------------------------------- 41 | 42 | //----function private------------- 43 | 44 | private double calcul_moy(){ 45 | double somme=0; 46 | int longueur = listNotes.size(); 47 | for(int i=0;i 20){ 57 | listNotes.add(20.0); 58 | }else{ 59 | listNotes.add(note); 60 | } 61 | moyenne = calcul_moy(); 62 | } 63 | 64 | public void Modifier_Note(int index ,double note ){ 65 | while ( note > 20.0 || note < 0.0){ 66 | Scanner input = new Scanner(System.in); 67 | System.out.print("Give me a grade belongs to a domain [0 ; 20] "); 68 | note = input.nextFloat(); 69 | } 70 | listNotes.set(index, note); 71 | moyenne = calcul_moy(); 72 | } 73 | 74 | } 75 | -------------------------------------------------------------------------------- /OPP/TV/src/main/java/com/mycompany/tv/TV.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license 3 | */ 4 | 5 | package com.mycompany.tv; 6 | 7 | /** 8 | * 9 | * @author USER 10 | */ 11 | public class TV { 12 | boolean On; 13 | int chaine ; 14 | int volume=0; 15 | 16 | int ch1=0,ch2=0,ch3=0,ch4=0; 17 | //----------------- 18 | public TV(){ 19 | On =true; 20 | } 21 | public TV(boolean O,int ch){ 22 | On=O; 23 | chaine=ch ; 24 | volume=0; 25 | } 26 | //------------------ 27 | public void allumer(){ 28 | On=true; 29 | } 30 | public void eteindre(){ 31 | On=false; 32 | } 33 | //------------------- 34 | public void setChine(int ch){ 35 | if(On == true){ 36 | if( ch>=0 && ch<=9999 ){ 37 | chaine=ch; 38 | ch1=ch2; 39 | ch2=ch3; 40 | ch3=ch4; 41 | ch4=chaine; 42 | }else{ 43 | chaine=0; 44 | On=false; 45 | } 46 | }else{ 47 | System.out.println(" error 404 "); 48 | } 49 | } 50 | //--------------------- 51 | public void chaineUp(){ 52 | setChine(chaine+1); 53 | } 54 | //-------------------- 55 | public void chaineDown(){ 56 | setChine(chaine-1); 57 | } 58 | //-------------------- 59 | public void volUp(){ 60 | if(volume <=9){ 61 | volume ++; 62 | System.out.println("-volume "+volume+"-"); 63 | }else{ 64 | System.out.println("-volume MAX-"); 65 | } 66 | } 67 | public void volDown(){ 68 | if(volume > 0){ 69 | volume --; 70 | System.out.println("-volume "+volume+"-"); 71 | }else{ 72 | System.out.println("-volume MIN-"); 73 | } 74 | } 75 | //-------------------- 76 | public void reCall(){ 77 | System.out.println("Historiy chaine"); 78 | System.out.println("--"+ch1+"--"); 79 | System.out.println("--"+ch2+"--"); 80 | System.out.println("--"+ch3+"--"); 81 | System.out.println("--"+ch4+"--"); 82 | 83 | 84 | } 85 | } 86 | -------------------------------------------------------------------------------- /OPP/Article/src/main/java/com/mycompany/article/Article.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license 3 | */ 4 | 5 | package com.mycompany.article; 6 | 7 | /** 8 | * 9 | * @author USER 10 | */ 11 | import java.util.Scanner; 12 | public class Article { 13 | 14 | private String design; 15 | private float prix; 16 | private int total_vente; 17 | private int quantite; 18 | 19 | // -------Constructeur------- 20 | public Article(){ 21 | Scanner sc = new Scanner(System.in); 22 | System.out.println("-----------------------------------------------------------------"); 23 | System.out.print(" Donne la designatio de l'article : "); 24 | design = sc.nextLine(); 25 | 26 | do{ 27 | System.out.print(" Donne le prix (prix > 0) de l'article : "); 28 | prix =sc.nextFloat(); 29 | }while(prix <= 0.0); 30 | 31 | do{ 32 | System.out.print(" Donne le quantite (quantite > 0) de l'article : "); 33 | quantite =sc.nextInt(); 34 | }while(quantite <= 0); 35 | System.out.println("-----------------------------------------------------------------"); 36 | total_vente = 0 ; 37 | } 38 | 39 | 40 | // -------Méthodes-------- 41 | 42 | //--getter et setteur-- 43 | 44 | public float getPrix(){ 45 | return prix; 46 | } 47 | public void setPrix(float prix){ 48 | this.prix = prix; 49 | } 50 | 51 | public String getDesing(){ 52 | return design; 53 | } 54 | 55 | public int getTotal_vente(){ 56 | return total_vente; 57 | } 58 | //--fonctions----- 59 | 60 | public void vente(int q){ 61 | if(q > 0){ 62 | if(q == quantite){ 63 | quantite = 0 ; 64 | total_vente += q ; 65 | System.out.println("* Opération effectuée"); 66 | }else if(quantite > q){ 67 | quantite = quantite - q ; 68 | total_vente += q ; 69 | System.out.println("* Opération effectuée"); 70 | }else{ 71 | System.out.print("* vente sera impossible "); 72 | System.out.println(" 'Quantité non disponible' "); 73 | } 74 | }else{ 75 | System.out.print("* vente sera impossible "); 76 | System.out.println(" 'Entrée invalide, veuillez ré-entrer' "); 77 | } 78 | } 79 | 80 | public String toString(){ 81 | return " La désignaction : "+design+"|"+" prix : "+prix+"|"+" Quantite :"+quantite+"|"+" Total Vente : "+total_vente+"\n"; 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /OPP/Article/src/main/java/com/mycompany/article/TabArticle.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license 3 | * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template 4 | */ 5 | package com.mycompany.article; 6 | 7 | /** 8 | * 9 | * @author USER 10 | */ 11 | import java.util.Scanner; 12 | import java.util.ArrayList; 13 | public class TabArticle { 14 | private ArrayList
tab = new ArrayList(); 15 | 16 | public void Lire_Article(){ 17 | int an; 18 | do{ 19 | System.out.println(" Lire Article .. .. .. !"); 20 | Article MyArticle = new Article(); 21 | tab.add(MyArticle); 22 | System.out.print(" Do want buy Article in Array List 1 ==> yes : "); 23 | Scanner input = new Scanner(System.in); 24 | an = input.nextInt(); 25 | }while( an == 1 ); 26 | } 27 | 28 | public void Affiche_Article(){ 29 | for(Article MyArticle :tab){ 30 | System.out.println(MyArticle.toString()); 31 | } 32 | } 33 | private int existe(String d){ 34 | int i=0; 35 | for(Article MyArticle :tab){ 36 | if(MyArticle.getDesing().equals(d)){ 37 | return i; 38 | } 39 | i += 1 ; 40 | } 41 | 42 | return -1; 43 | 44 | } 45 | //-------------------------- 46 | private String Sreturn(){ 47 | Scanner input = new Scanner(System.in); 48 | System.out.print(" Enter Designtion de l'article : "); 49 | String d = input.nextLine(); 50 | return d; 51 | } 52 | private int Qreturn(){ 53 | Scanner input = new Scanner(System.in); 54 | System.out.print(" Enter quantite : "); 55 | int qn = input.nextInt(); 56 | return qn; 57 | } 58 | //-------------------------- 59 | public void Saisie_ventes(int n){ 60 | int N=0; 61 | while(N < n){ 62 | System.out.println(); 63 | String d =Sreturn(); // raed String "desinge" 64 | int eq = existe(d); 65 | if(eq != -1){ 66 | int qn =Qreturn(); // lier quntite vent 67 | tab.get(eq).vente(qn); 68 | } 69 | N++; 70 | //d=""; 71 | } 72 | 73 | } 74 | 75 | private float TES(float p,int n){ 76 | return (p*n)/100; 77 | } 78 | 79 | public void Reduire_prix(){ 80 | for(Article MyArticle :tab){ 81 | if(MyArticle.getTotal_vente() < 5){ 82 | float newPrix = MyArticle.getPrix() - TES(MyArticle.getPrix(),10); 83 | MyArticle.setPrix(newPrix); 84 | } 85 | } 86 | } 87 | public void Reduire_prix(int n){ 88 | for(Article MyArticle :tab){ 89 | if(MyArticle.getTotal_vente() < 5){ 90 | float newPrix = MyArticle.getPrix() - TES(MyArticle.getPrix(),n); 91 | MyArticle.setPrix(newPrix); 92 | } 93 | } 94 | } 95 | 96 | public int Max_Total_Vente(){ 97 | int max=0; 98 | for(Article MyArticle :tab){ 99 | if(MyArticle.getTotal_vente() > max ){ 100 | max = MyArticle.getTotal_vente(); 101 | } 102 | } 103 | return max; 104 | } 105 | 106 | } 107 | -------------------------------------------------------------------------------- /OPP/Article/src/main/java/com/mycompany/article/Test.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license 3 | * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template 4 | */ 5 | package com.mycompany.article; 6 | 7 | /** 8 | * 9 | * @author USER 10 | */ 11 | import java.util.Scanner; 12 | public class Test { 13 | public static void main(String[] args) { 14 | TabArticle T = new TabArticle(); 15 | /* 16 | System.out.println("-------------------------------------------"); 17 | T.Lire_Article(); 18 | System.out.println("-------------------------------------------"); 19 | System.out.println("------------------Affichege----------------"); 20 | T.Affiche_Article(); 21 | System.out.println("-------------------------------------------"); 22 | T.Saisie_ventes(2); 23 | System.out.println("------------------Affichege----------------"); 24 | T.Affiche_Article(); 25 | System.out.println("-------------------------------------------"); 26 | System.out.println("-----------------Reduire-------------------"); 27 | T.Reduire_prix(50); 28 | System.out.println("-------------------------------------------"); 29 | System.out.println("------------------Affichege----------------"); 30 | T.Affiche_Article(); 31 | System.out.println("-------------------------------------------"); 32 | System.out.println("max ventes :"+T.Max_Total_Vente()); 33 | */ 34 | 35 | Scanner sc = new Scanner(System.in); 36 | int ga; 37 | int ga1; 38 | do{ 39 | System.out.println("-------------------------------------------"); 40 | System.out.println("---------chose un operation--------"); 41 | System.out.println("1 ==> affiche les article "); 42 | System.out.println("2 ==> vent un article "); 43 | System.out.println("3 ==> reduite les prix des articles "); 44 | System.out.println("4 ==> insert article"); 45 | System.out.println("5 ==> Max vents"); 46 | System.out.println("------------------------------------"); 47 | System.out.print(" | Lire operation | Enter : "); 48 | ga1 = sc.nextInt(); 49 | System.out.println("------------------------------------"); 50 | switch (ga1){ 51 | case 1 : 52 | T.Affiche_Article(); 53 | break; 54 | case 2 : 55 | System.out.println("-----------------------------------------------------------------"); 56 | System.out.print(" |lier nomber ventes | Enter : "); 57 | int ve = sc.nextInt(); 58 | T.Saisie_ventes(ve); 59 | System.out.println("-----------------------------------------------------------------"); 60 | break; 61 | case 3 : 62 | T.Reduire_prix(10); 63 | break; 64 | case 4 : 65 | System.out.println("----------------------------Article|stock------------------------"); 66 | T.Lire_Article(); 67 | System.out.println("-----------------------------------------------------------------"); 68 | break; 69 | case 5 : 70 | System.out.println("-----------------------------------------------------------------"); 71 | System.out.println( "-------- MAx vents "+T.Max_Total_Vente()+"------------------------"); 72 | System.out.println("-----------------------------------------------------------------"); 73 | break; 74 | default : 75 | System.out.println("------------------------------------"); 76 | System.out.println("----------------ERROR---------------"); 77 | System.out.println("------------------------------------"); 78 | } 79 | 80 | 81 | System.out.println("-------------------------------------------"); 82 | System.out.print(" | Exit oui ==> 1 , non ==> 0 | Enter : "); 83 | ga = sc.nextInt(); 84 | System.out.println("-------------------------------------------"); 85 | if(ga == 1){ 86 | break; 87 | } 88 | }while(true); 89 | 90 | } 91 | } 92 | -------------------------------------------------------------------------------- /OPP/Etudiant/src/main/java/com/mycompany/etudiant/Test.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license 3 | * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template 4 | */ 5 | package com.mycompany.etudiant; 6 | 7 | /** 8 | * 9 | * @author USER 10 | */ 11 | import java.util.ArrayList; 12 | import java.util.Scanner; 13 | public class Test { 14 | 15 | static void print_obj(Etudiant E){ 16 | System.out.println("-------------------------------------"); 17 | System.out.println("Name: "+E.getName()); 18 | System.out.println("Average: "+E.getMoyenne()); 19 | System.out.println("-------------------------------------"); 20 | 21 | } 22 | 23 | public static void main(String[] args) { 24 | //Etudiant my = new Etudiant ("mohammed"); 25 | //System.out.println(my.getName()); 26 | 27 | ArrayList liste = new ArrayList(); 28 | Scanner input =new Scanner(System.in); 29 | 30 | System.out.print(" Gev me name student : "); 31 | String name =input.nextLine(); 32 | 33 | System.out.println( "Input a Grade Group :"); 34 | boolean an = true; 35 | int i=1; 36 | do{ 37 | System.out.println("- - - - - - - -"); 38 | System.out.print("Grade "+i+" : "); 39 | double x = input.nextFloat(); 40 | System.out.println("- - - - - - - -"); 41 | liste.add(x); 42 | i += 1; 43 | System.out.println("- - - - - - - - - - - - - - - - - - - -"); 44 | System.out.println("Do you want to stop Enter a value of 0 "); 45 | System.out.print("Input :"); 46 | int in = input.nextInt(); 47 | System.out.println("- - - - - - - - - - - - - - - - - - - -"); 48 | if( in ==0){ 49 | an =false; 50 | } 51 | }while( an == true); 52 | 53 | System.out.println(liste.get(0)); 54 | 55 | 56 | Etudiant E = new Etudiant(name,liste); 57 | 58 | /* 59 | System.out.println("Name: "+E.getName()); 60 | System.out.println("Average: "+E.getMoyenne()); 61 | */ 62 | 63 | //--my function 64 | print_obj(E); // display properties object E . 65 | //-------- 66 | 67 | System.out.println("Operations on Class Etudiant or object E"); 68 | 69 | an =true ; 70 | do{ 71 | System.out.println("- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -"); 72 | System.out.println("Choose one of the operations :"); 73 | System.out.println(" 0 - Exit."); 74 | System.out.println(" 1 - Add Grade function ==> ajouterNote()."); 75 | System.out.println(" 2 - Make a change to the signs function ==> Modifier_Note(). "); 76 | System.out.println(" 3 - View all contents."); 77 | System.out.print("Input :"); 78 | int in2 = input.nextInt(); 79 | System.out.println("- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -"); 80 | if(in2 == 0){ 81 | break; 82 | } 83 | if(in2 == 1){ 84 | System.out.println("- - - - - - - - -"); 85 | System.out.print("Input add :"); 86 | double in_add =input.nextFloat(); 87 | E.ajouterNote(in_add); 88 | System.out.println("- - - - - - - - -"); 89 | System.out.println(); 90 | } 91 | if(in2 == 2){ 92 | System.out.println("- - - - - - - - -"); 93 | System.out.print("Input Edit :"); 94 | double in_edit =input.nextFloat(); 95 | System.out.print("Input index :"); 96 | int index =input.nextInt(); 97 | E.Modifier_Note(index, in_edit); 98 | System.out.println("- - - - - - - - -"); 99 | System.out.println(); 100 | } 101 | if(in2 == 3){ 102 | print_obj(E); 103 | } 104 | 105 | System.out.println("- - - - - - - - - - - - - - - - - - - -"); 106 | System.out.println("Do you want to stop Enter a value of 0 "); 107 | System.out.print("Input :"); 108 | int in1 = input.nextInt(); 109 | System.out.println("- - - - - - - - - - - - - - - - - - - -"); 110 | if( in1 ==0){ 111 | an =false; 112 | } 113 | }while( an == true); 114 | } 115 | } 116 | -------------------------------------------------------------------------------- /ASD 3/TP1ASD3/TPFINALASD3.txt: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | struct player{ //declraction structer 6 | char Name[20]; 7 | char place; 8 | int Nb; 9 | struct player *next; 10 | }; 11 | struct player *New_player(char Name[],char place , int nb){ 12 | 13 | struct player *p=(struct player *)malloc(sizeof(struct player )); 14 | strcpy(p->Name,Name); 15 | p->Nb =nb ; 16 | p->place =place ; 17 | // p->next=NULL; 18 | return p; 19 | } 20 | 21 | // facnction add player 22 | struct player *Add_player(char name[],int nb,char place,struct player *team0){ 23 | struct player *p = New_player(name,place,nb); 24 | p->next=team0; 25 | return p; 26 | 27 | 28 | } 29 | 30 | 31 | 32 | // create teame 33 | struct player * create_teame(char name[],char place , int nb){ 34 | 35 | 36 | struct player *team0=(struct player* )malloc(sizeof(struct player )); 37 | 38 | if(place!='G'){ 39 | printf("Please enter a goalkeeper to create a team .. !"); 40 | } 41 | strcpy(team0->Name,name); 42 | team0->place='G'; 43 | team0->Nb=nb; 44 | team0->next=NULL; 45 | 46 | return team0; // return team and goalkeeper in team 47 | } 48 | // delt player <> Exlude() 49 | 50 | int Exlude(int nb,struct player **team){ 51 | if ((*team)->Nb == nb) { 52 | struct player *temp = *team; 53 | *team = (*team)->next; 54 | free(temp); 55 | return 1; 56 | } 57 | else { 58 | 59 | struct player *temp = *team; 60 | struct player *p; 61 | while (temp->next != NULL) 62 | { 63 | if (temp->next->Nb == nb) { 64 | p = temp; 65 | temp->next = temp->next->next; 66 | free(p); 67 | 68 | return 1; 69 | } 70 | 71 | else temp = temp->next; 72 | } 73 | 74 | } 75 | 76 | return 0; 77 | 78 | 79 | } 80 | // change player1 by player2 81 | int Exchange(struct player *p1,int nb,struct player **team){ 82 | 83 | if ((*team)->Nb == nb) { 84 | struct player *p2 = *team; 85 | p2 = *team; 86 | p1->next = (*team)->next; 87 | *team = p1; 88 | free(p2); 89 | 90 | return 1; 91 | } 92 | else { 93 | struct player *temp = *team; 94 | 95 | while (temp->next != NULL) 96 | { 97 | if (temp->next->Nb ==nb) { 98 | struct player *p2 = temp->next; 99 | p1->next = temp->next->next; 100 | temp->next = p1; 101 | free(p2); 102 | 103 | return 1; 104 | } 105 | 106 | else temp = temp->next; 107 | } 108 | 109 | } 110 | 111 | return 0; 112 | 113 | 114 | /* 115 | struct player *temp = team; 116 | if(temp==p1){//f begin 117 | p2=temp->next; 118 | free(p1); 119 | return 1; 120 | } 121 | while(temp->next != p1){ 122 | temp=temp->next; 123 | } 124 | if(p1->next!=NULL){ //if mid 125 | p2=p1->next; 126 | temp->next=p2; 127 | free(p1); 128 | return 1; 129 | }else{ //if end 130 | temp->next=p2; 131 | free(p1); 132 | p2->next=NULL; 133 | return 1; 134 | } 135 | */ 136 | } 137 | void affiche_team(struct player *team ){ 138 | 139 | struct player *tmp=team; 140 | int i=1; 141 | while(team!=NULL){ 142 | printf("P%d\n",i); 143 | //affiche_team(team->next); 144 | printf("name player -- %s\n",team->Name); 145 | printf("numb player -- %d\n",team->Nb); 146 | printf("plac player -- %c\n",team->place); 147 | printf("------------------\n"); 148 | i++; 149 | team=team->next; 150 | } 151 | 152 | 153 | } 154 | 155 | 156 | 157 | 158 | 159 | int main(){ 160 | char name[20]; 161 | char place1='G'; 162 | //char temp; 163 | int nb; 164 | char temp; 165 | char temp1; 166 | struct player *p=NULL; 167 | struct player *team; 168 | printf("==================== FootBall Team ====================\n"); 169 | printf("-Football Team\n"); 170 | printf(" Enter the name of a goalkeeper for the new team :"); 171 | gets(name); 172 | //gets(name); 173 | printf(" Player number : "); 174 | scanf("%d",&nb); 175 | team=create_teame(name,place1,nb); // create new teame 176 | 177 | char repns='y'; 178 | do{ 179 | // char repns; 180 | int ga; 181 | int bo1; 182 | do{ 183 | printf("-Choose from the following goods :\n"); 184 | printf("-add player--->1\n"); 185 | printf("*Enter :"); 186 | scanf("%d",&ga); 187 | if(ga==1){ // ADD PLAYER 188 | char name0[20]; 189 | int nb0; 190 | char pu; 191 | printf(" *Gev me name add player : .."); 192 | gets(name0); 193 | gets(name0); 194 | printf(" *Gev me number add player: .."); 195 | scanf("%d",&nb0); 196 | printf(" *Gev me place add player : .."); 197 | scanf("%c",&pu); 198 | scanf("%c",&pu); 199 | team=Add_player(name0,nb0,pu,team); 200 | } 201 | 202 | printf("-Do you want add PLAYER ---->1/yes or 0/no "); 203 | scanf("%d",&bo1); 204 | }while(bo1==1); //add 205 | 206 | 207 | affiche_team(team); 208 | 209 | struct player* e; 210 | struct player*p0; 211 | int ga1; 212 | int bo2; 213 | do{ 214 | printf("-Choose from the following goods :\n"); 215 | printf("-New player--->1\n-Change player to player--->2:\n-Delete the player--->3\n"); 216 | printf("*Enter :"); 217 | scanf("%d",&ga1); 218 | if(ga1==1){ //NEW PLAYER 219 | char name1[20]; 220 | int nb1; 221 | char pm; 222 | printf(" *Gev me new name player : .."); 223 | gets(name1); 224 | gets(name1); 225 | printf(" *Gev me new number player: .."); 226 | scanf("%d",&nb1); 227 | //scanf("%d",&nb1); 228 | printf(" *Gev me new place player : .."); 229 | scanf("%c",&pm); 230 | scanf("%c",&pm); 231 | p0=New_player(name1,pm,nb1); 232 | e=p0; 233 | } 234 | if(ga1==2){ //CHANGE PLAYER 235 | int re; //reselte operaction in change 236 | struct player *c1=team; 237 | struct player *ch=NULL; 238 | printf(" *Gev me number player you want change: .."); 239 | int nb2; 240 | scanf("%d",&nb2); 241 | 242 | 243 | //e ---> player change 244 | if(Exchange(e,nb2,&team)==1){ 245 | printf(" -Operation completed\n"); 246 | }else{ 247 | printf(" -Operation non completed\n"); 248 | } 249 | } 250 | 251 | if(ga1==3){ // DELT PLAYER 252 | 253 | struct player *c2=team;// c2 et c1 contor in liste sort 254 | //struct player *ch1; 255 | printf(" *Gev me number player(delt) : .."); 256 | char name3[20]; 257 | int nb3; 258 | scanf("%d",&nb3); 259 | if(Exlude(nb3,&team)==1){ 260 | printf(" -Operation completed\n"); 261 | }else{ 262 | printf(" -Operation non completed\n"); 263 | } 264 | } 265 | printf("-Do you want to change player to player or Do you want to delete the player---->1/yes or 0/no "); 266 | scanf("%d",&bo2); 267 | }while(bo2==1); 268 | 269 | affiche_team(team); 270 | 271 | printf("- Do repeat operations ..! (Y/N) :"); 272 | 273 | scanf("%c",&repns); 274 | scanf("%c",&repns); 275 | 276 | }while(repns=='y' || repns=='Y'); 277 | 278 | printf("===================Team Footboll==================\n"); 279 | printf("------------------\n"); 280 | affiche_team(team); 281 | 282 | 283 | printf("==================================================\n"); 284 | printf("\n\n\n\n===============\nEnd of Program\n===============\n\n "); 285 | 286 | return 0; 287 | } -------------------------------------------------------------------------------- /ASD 3/TP1ASD3/main.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | struct player{ //declraction structer 6 | char Name[20]; 7 | char place; 8 | int Nb; 9 | struct player *next; 10 | }; 11 | struct player *New_player(char Name[],char place , int nb){ 12 | 13 | struct player *p=(struct player *)malloc(sizeof(struct player )); 14 | strcpy(p->Name,Name); 15 | p->Nb =nb ; 16 | p->place =place ; 17 | // p->next=NULL; 18 | return p; 19 | } 20 | 21 | // facnction add player 22 | struct player *Add_player(char name[],int nb,char place,struct player *team0){ 23 | struct player *p = New_player(name,place,nb); 24 | p->next=team0; 25 | return p; 26 | 27 | 28 | } 29 | 30 | 31 | 32 | // create teame 33 | struct player * create_teame(char name[],char place , int nb){ 34 | 35 | 36 | struct player *team0=(struct player* )malloc(sizeof(struct player )); 37 | 38 | if(place!='G'){ 39 | printf("Please enter a goalkeeper to create a team .. !"); 40 | } 41 | strcpy(team0->Name,name); 42 | team0->place='G'; 43 | team0->Nb=nb; 44 | team0->next=NULL; 45 | 46 | return team0; // return team and goalkeeper in team 47 | } 48 | // delt player <> Exlude() 49 | 50 | int Exlude(int nb,struct player **team){ 51 | if ((*team)->Nb == nb) { 52 | struct player *temp = *team; 53 | *team = (*team)->next; 54 | free(temp); 55 | return 1; 56 | } 57 | else { 58 | 59 | struct player *temp = *team; 60 | struct player *p; 61 | while (temp->next != NULL) 62 | { 63 | if (temp->next->Nb == nb) { 64 | p = temp; 65 | temp->next = temp->next->next; 66 | free(p); 67 | 68 | return 1; 69 | } 70 | 71 | else temp = temp->next; 72 | } 73 | 74 | } 75 | 76 | return 0; 77 | 78 | 79 | } 80 | // change player1 by player2 81 | int Exchange(struct player *p1,int nb,struct player **team){ 82 | 83 | if ((*team)->Nb == nb) { 84 | struct player *p2 = *team; 85 | p2 = *team; 86 | p1->next = (*team)->next; 87 | *team = p1; 88 | free(p2); 89 | 90 | return 1; 91 | } 92 | else { 93 | struct player *temp = *team; 94 | 95 | while (temp->next != NULL) 96 | { 97 | if (temp->next->Nb ==nb) { 98 | struct player *p2 = temp->next; 99 | p1->next = temp->next->next; 100 | temp->next = p1; 101 | free(p2); 102 | 103 | return 1; 104 | } 105 | 106 | else temp = temp->next; 107 | } 108 | 109 | } 110 | 111 | return 0; 112 | 113 | 114 | /* 115 | struct player *temp = team; 116 | if(temp==p1){//f begin 117 | p2=temp->next; 118 | free(p1); 119 | return 1; 120 | } 121 | while(temp->next != p1){ 122 | temp=temp->next; 123 | } 124 | if(p1->next!=NULL){ //if mid 125 | p2=p1->next; 126 | temp->next=p2; 127 | free(p1); 128 | return 1; 129 | }else{ //if end 130 | temp->next=p2; 131 | free(p1); 132 | p2->next=NULL; 133 | return 1; 134 | } 135 | */ 136 | } 137 | void affiche_team(struct player *team ){ 138 | 139 | struct player *tmp=team; 140 | int i=1; 141 | while(team!=NULL){ 142 | printf("P%d\n",i); 143 | //affiche_team(team->next); 144 | printf("name player -- %s\n",team->Name); 145 | printf("numb player -- %d\n",team->Nb); 146 | printf("plac player -- %c\n",team->place); 147 | printf("------------------\n"); 148 | i++; 149 | team=team->next; 150 | } 151 | 152 | 153 | } 154 | 155 | 156 | 157 | 158 | 159 | int main(){ 160 | char name[20]; 161 | char place1='G'; 162 | //char temp; 163 | int nb; 164 | char temp; 165 | char temp1; 166 | struct player *p=NULL; 167 | struct player *team; 168 | printf("==================== FootBall Team ====================\n"); 169 | printf("-Football Team\n"); 170 | printf(" Enter the name of a goalkeeper for the new team :"); 171 | gets(name); 172 | //gets(name); 173 | printf(" Player number : "); 174 | scanf("%d",&nb); 175 | team=create_teame(name,place1,nb); // create new teame 176 | 177 | char repns='y'; 178 | do{ 179 | // char repns; 180 | int ga; 181 | int bo1; 182 | do{ 183 | printf("-Choose from the following goods :\n"); 184 | printf("-add player--->1\n"); 185 | printf("*Enter :"); 186 | scanf("%d",&ga); 187 | if(ga==1){ // ADD PLAYER 188 | char name0[20]; 189 | int nb0; 190 | char pu; 191 | printf(" *Gev me name add player : .."); 192 | gets(name0); 193 | gets(name0); 194 | printf(" *Gev me number add player: .."); 195 | scanf("%d",&nb0); 196 | printf(" *Gev me place add player : .."); 197 | scanf("%c",&pu); 198 | scanf("%c",&pu); 199 | team=Add_player(name0,nb0,pu,team); 200 | } 201 | 202 | printf("-Do you want add PLAYER ---->1/yes or 0/no "); 203 | scanf("%d",&bo1); 204 | }while(bo1==1); //add 205 | 206 | 207 | affiche_team(team); 208 | 209 | struct player* e; 210 | struct player*p0; 211 | int ga1; 212 | int bo2; 213 | do{ 214 | printf("-Choose from the following goods :\n"); 215 | printf("-New player--->1\n-Change player to player--->2:\n-Delete the player--->3\n"); 216 | printf("*Enter :"); 217 | scanf("%d",&ga1); 218 | if(ga1==1){ //NEW PLAYER 219 | char name1[20]; 220 | int nb1; 221 | char pm; 222 | printf(" *Gev me new name player : .."); 223 | gets(name1); 224 | gets(name1); 225 | printf(" *Gev me new number player: .."); 226 | scanf("%d",&nb1); 227 | //scanf("%d",&nb1); 228 | printf(" *Gev me new place player : .."); 229 | scanf("%c",&pm); 230 | scanf("%c",&pm); 231 | p0=New_player(name1,pm,nb1); 232 | e=p0; 233 | } 234 | if(ga1==2){ //CHANGE PLAYER 235 | int re; //reselte operaction in change 236 | struct player *c1=team; 237 | struct player *ch=NULL; 238 | printf(" *Gev me number player you want change: .."); 239 | int nb2; 240 | scanf("%d",&nb2); 241 | 242 | 243 | //e ---> player change 244 | if(Exchange(e,nb2,&team)==1){ 245 | printf(" -Operation completed\n"); 246 | }else{ 247 | printf(" -Operation non completed\n"); 248 | } 249 | } 250 | 251 | if(ga1==3){ // DELT PLAYER 252 | 253 | struct player *c2=team;// c2 et c1 contor in liste sort 254 | //struct player *ch1; 255 | printf(" *Gev me number player(delt) : .."); 256 | char name3[20]; 257 | int nb3; 258 | scanf("%d",&nb3); 259 | if(Exlude(nb3,&team)==1){ 260 | printf(" -Operation completed\n"); 261 | }else{ 262 | printf(" -Operation non completed\n"); 263 | } 264 | } 265 | printf("-Do you want to change player to player or Do you want to delete the player---->1/yes or 0/no "); 266 | scanf("%d",&bo2); 267 | }while(bo2==1); 268 | 269 | affiche_team(team); 270 | 271 | printf("- Do repeat operations ..! (Y/N) :"); 272 | 273 | scanf("%c",&repns); 274 | scanf("%c",&repns); 275 | 276 | }while(repns=='y' || repns=='Y'); 277 | 278 | printf("===================Team Footboll==================\n"); 279 | printf("------------------\n"); 280 | affiche_team(team); 281 | 282 | 283 | printf("==================================================\n"); 284 | printf("\n\n\n\n===============\nEnd of Program\n===============\n\n "); 285 | 286 | return 0; 287 | } 288 | -------------------------------------------------------------------------------- /ASD 3/TP3ASD3/TP3ASD3 (1).c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | //----------------------------------------data structer Graph--------------------------- 6 | 7 | struct graph{ 8 | 9 | float key; 10 | struct s_tree *be; 11 | struct s_tree *g; 12 | struct s_tree *d; 13 | 14 | } ; 15 | //------------------ 16 | 17 | 18 | //--------------------------------------data structer BST----------------------------------- 19 | struct s_tree{ 20 | float key; // moyen (racine) 21 | 22 | struct s_tree *g; // left tree 23 | struct s_tree *d; // rigth tree 24 | 25 | }; 26 | //__________________ 27 | typedef struct{ 28 | // structer student contins code_s and name_s and moyen . Exmple ---> |code_s - name_s - moyen | 29 | int code_s; 30 | char name_s[50]; 31 | float moyen; 32 | 33 | }student; 34 | //------------------ 35 | 36 | struct s_tree* newNode(float item) // cret new node type tree 37 | { 38 | struct s_tree* temp 39 | = (struct s_tree*)malloc(sizeof(struct s_tree)); // creat pointer type tree -temp- 40 | temp->key = item; // contin temp item 41 | temp->g = temp->d = NULL; // left and rigth in temp <=> NULL 42 | return temp; 43 | } 44 | 45 | //--------------------------------------- 46 | 47 | struct s_tree* insert(struct s_tree* node, float key) 48 | { 49 | // If the tree is empty, return a new node 50 | if (node == NULL) 51 | return newNode(key); 52 | 53 | // Otherwise, recur down the tree 54 | if (key < node->key) 55 | node->g = insert(node->g, key); 56 | else if (key > node->key) 57 | node->d = insert(node->d, key); 58 | 59 | // return the (unchanged) node pointer 60 | return node; 61 | } 62 | //---------------------------------------- 63 | void print_tree(struct s_tree* root ) 64 | { 65 | // root pointer input 66 | 67 | if (root!= NULL) { // recsuve tel que adress n'pas NULL 68 | print_tree(root->g); // apale recsuve 69 | printf(" Node bst : %.2f \n",root->key); // affiche contins pointer 70 | print_tree(root->d);// apale recsuve 71 | } 72 | } 73 | //---------------------------------------- 74 | struct s_tree *minNode(struct s_tree *bst){ 75 | 76 | struct s_tree * temp =bst; // copie adres BST (creat pointer temp tel que temp = input tree bst ) 77 | 78 | while(temp && temp->g != NULL){ // lops scerch in tree bst bucose scerch the end node in left (min node) 79 | temp=temp->g; 80 | } 81 | 82 | return temp; 83 | 84 | } 85 | //---------------------------------------- 86 | struct s_tree *maxNode(struct s_tree *bst){ 87 | 88 | struct s_tree * temp =bst; // copie adres BST (creat pointer temp tel que temp = input tree bst ) 89 | 90 | while(temp && temp->d != NULL){ // lops scerch in tree bst bucose scerch the end node in rigth (max node) 91 | temp=temp->d; 92 | } 93 | 94 | return temp; 95 | 96 | } 97 | //----------------------------------------- 98 | struct s_tree* deleteNode(struct s_tree* root, float key){ 99 | // base case 100 | if (root == NULL) 101 | return root; 102 | // If the key to be deleted 103 | // is smaller than the root's 104 | // key, then it lies in left subtree 105 | if (key < root->key) 106 | root->g = deleteNode(root->g, key); 107 | // If the key to be deleted 108 | // is greater than the root's 109 | // key, then it lies in right subtree 110 | else if (key > root->key) 111 | root->g = deleteNode(root->g, key); 112 | // if key is same as root's key, 113 | // then This is the node 114 | // to be deleted 115 | else { 116 | // node with only one child or no child 117 | if (root->g == NULL) { 118 | struct s_tree* temp = root->d; 119 | free(root); 120 | return temp; 121 | }else if (root->d == NULL) { 122 | struct s_tree* temp = root->g; 123 | free(root); 124 | return temp; 125 | } 126 | // node with two children: 127 | // Get the inorder successor 128 | // (smallest in the right subtree) 129 | struct s_tree* temp = minNode(root->d); 130 | 131 | // Copy the inorder 132 | // successor's content to this node 133 | root->key = temp->key; 134 | 135 | // Delete the inorder successor 136 | root->d = deleteNode(root->d, temp->key); 137 | } 138 | return root; 139 | } 140 | //----------------------------------------- 141 | 142 | //----------------------------------------- 143 | int iterativeSearch(struct s_tree* root, float key) 144 | { 145 | // Traverse until root reaches to dead end 146 | while (root != NULL) { 147 | // pass right subtree as new tree 148 | if (key > root->key) 149 | root = root->d; 150 | 151 | // pass left subtree as new tree 152 | else if (key < root->key) 153 | root = root->g; 154 | else 155 | return 1; // if the key is found return 1 156 | } 157 | return 0; 158 | } 159 | //----------------------------------------- 160 | void BinaryTree2GRAPH(struct s_tree* root, struct s_tree** head) 161 | { 162 | // Base case 163 | if (root == NULL) 164 | return; 165 | 166 | // Initialize previously visited node as NULL. This is 167 | // static so that the same value is accessible in all 168 | // recursive calls 169 | static struct s_tree* prev = NULL; 170 | 171 | // Recursively convert left subtree 172 | BinaryTree2GRAPH(root->g, head); 173 | 174 | // Now convert this node 175 | if (prev == NULL) 176 | *head = root; 177 | else { 178 | root->g = prev; 179 | prev->d = root; 180 | } 181 | prev = root; 182 | 183 | // Finally convert right subtree 184 | BinaryTree2GRAPH(root->d, head); 185 | } 186 | //-------------- 187 | struct graph* creat_graph(float key){ 188 | 189 | struct graph* temp = (struct graph*)malloc(sizeof(struct graph)); // new node (graph) 190 | 191 | temp->key=key; // new node (graph) value graph ( one sommet == key input) 192 | 193 | temp->be=NULL; // adrre befuer NULL 194 | 195 | temp->g=NULL; // adress left NULL 196 | 197 | temp->d=NULL; // adress rigth NULL 198 | 199 | return temp; 200 | } 201 | //-------------- 202 | struct graph *new_node_graph(float key, struct s_tree* befuer){ 203 | 204 | struct graph* temp = (struct graph*)malloc(sizeof(struct graph)); // temp is new node in graph 205 | 206 | temp->key=key; // key temp <=> key input 207 | 208 | temp->be=befuer; // adress temp (be) <=> poniter befuer 209 | 210 | temp->g=temp->d=NULL; // temp left and rigth == NULL 211 | 212 | return temp; // return temp 213 | 214 | } 215 | //-------------- 216 | void print_graph(struct s_tree *root1,struct s_tree *root2,struct graph *graph ) 217 | { 218 | if(graph->be ==NULL) printf(" Node graph : %.2f \n",graph->key); 219 | 220 | else{ 221 | if(root1!= NULL) { // recsuve tel que adress n'pas NULL 222 | print_graph(root1->g,root1->g->d,graph); // apale recsuve 223 | printf(" Node graph : %.2f \n",root1->key); // affiche contins pointer 224 | print_graph(root1->d,root1->d->d,graph);// apale recsuve 225 | } 226 | 227 | if(root2!= NULL) { // recsuve tel que adress n'pas NULL 228 | print_graph(root2->g,root2->g->d,graph); // apale recsuve 229 | printf(" Node graph : %.2f \n",root2->key); // affiche contins pointer 230 | print_graph(root2->d,root2->d->d,graph);// apale recsuve 231 | } 232 | 233 | } 234 | } 235 | //-------------- 236 | 237 | /*/-------------- 238 | void trv(struct s_tree *tree,struct graph *ga){ 239 | if(tree != NULL){ 240 | trv(tree->g,ga->be); 241 | ga->key=tree->key; 242 | trv(tree->d,ga->be); 243 | 244 | } 245 | } 246 | 247 | //-------------------------------------------------*/ 248 | int main() 249 | { 250 | 251 | 252 | printf("------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------"); 253 | printf(" TP ASD3 \n\n -The objective of this work :\n\n Operations on BST and Graphe (Data structures) .\n\n -General explanation :\n\n In this final work, we aim to use the binary trees seen in the course to store the information about our students. The information are stored firstly in a CSV file like this: \n\n Code;L_Name;Mark\n\n 0001;Abdelhakim;14.5\n\n 0004;Farid;10.4\n\n …… \n\n -Additional operations in a project :\n\n creat tree BST Without reading from\n\n insert in BST and Remove serche in max and min \n\n"); 254 | 255 | printf("------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------"); 256 | 257 | printf("\n\n\n"); 258 | printf(" Do want read in CSV or cret Tree BST Dynamic \n\n yes --> y (read CSV)\n No --> n (creat BST)\n [Input] : "); 259 | char increat; // this is varible increat related to the answer to a question (read csv or creat bst ). 260 | scanf("%c",&increat); // lire varible increat 261 | printf("\n\n"); 262 | if(increat == 'n'){ 263 | 264 | struct s_tree * mytree =NULL; // arbar bst 265 | 266 | printf(" Gev me number nodes in tree : "); 267 | int ele; // this is a varible number elemant in bst 268 | scanf("%d",&ele); //lire varible ele 269 | printf("\n\n"); 270 | printf(" Reding element BST ... \n"); 271 | 272 | while(ele > 0){ // lops as long as ele != 0 (ele = 0 ==> read all node ) 273 | printf(" Node : "); 274 | float eleread; // this is a varible number read and insert in bst 275 | scanf("%f",&eleread); 276 | mytree=insert(mytree,eleread); // aple function insert in tree 277 | ele--; 278 | } 279 | printf("\n\n"); 280 | printf("operaction completed ..!\n"); 281 | printf("\n------------TREE BST-----------\n"); 282 | print_tree(mytree); 283 | printf("-------------------------------\n"); 284 | 285 | int ga = 1; // this is a varible ga related to the answer to a question (repter or no ) 286 | do{ 287 | printf("\n\n"); 288 | printf(" Chose an operction :\n 1-insert in BST\n 2-print BST \n 3-MIN NODE in BST \n 4-MAX NODE in BST\n 5-Delet item in BST\n 6-Seaech item in BST [input] : "); 289 | int op; // varible choose an option 290 | scanf("%d",&op); 291 | if(op==1){ // op = 1 so insert in BST 292 | 293 | printf("\n Enter item insert in BST : "); 294 | float inele; // varible read item 295 | scanf("%f",&inele); 296 | mytree=insert(mytree,inele); // call up function insert and inesrt item reading (inele) in bst 297 | } 298 | if(op==2){ // op = 2 so print tree BST 299 | 300 | printf("\n------------TREE BST-----------\n"); 301 | print_tree(mytree); 302 | printf("-------------------------------\n"); 303 | printf("operaction completed ..!\n"); 304 | 305 | } 306 | if(op==3){ // op = 3 so serch in min node in bst 307 | struct s_tree *min=minNode(mytree); // call up function minnode scerching min and return 308 | printf("\nMIN Node in BST --> %.2f \n\n",min->key); // affiche min in bst 309 | printf("operaction completed ..!\n"); 310 | } 311 | if(op==4){// op = 4 so serch in MAX node in bst 312 | struct s_tree *max=maxNode(mytree); // call up function minnode scerching MAX and return 313 | printf("\nMAX Node in BST --> %.2f \n\n",max->key);// affiche MAX in bst 314 | printf("operaction completed ..!\n"); 315 | } 316 | 317 | if(op==5){ // op =5 so delat node in bst 318 | printf("\n Enter item Remove in BST : "); 319 | float REele; // this is a varible REele related 320 | scanf("%f",&REele); 321 | mytree=deleteNode(mytree,REele); // call up function deletNode in bst . 322 | printf("\noperaction completed ..!\n"); 323 | 324 | } 325 | if(op==6){ // op = 6 so serching in node in bst 326 | printf("\n Enter item Seraching in BST : "); 327 | float SEele; // this is a varible SEele related 328 | scanf("%f",&SEele);// read SEele 329 | 330 | 331 | 332 | if(iterativeSearch(mytree,SEele)==1){ // call up function iterativeSearch for searching and return boollen 333 | printf("\n Item exist in BST \n"); 334 | }else{ 335 | printf("\n Item not exist in BST \n"); 336 | } 337 | 338 | 339 | 340 | printf("\noperaction completed ..!\n"); 341 | } 342 | 343 | 344 | printf("\n Do you want repeter operction : \n Yes --> 1\n No --> 0\n [input] : "); 345 | scanf("%d",&ga); 346 | if(ga != 1){ 347 | ga =0; 348 | } 349 | 350 | }while( ga == 1); 351 | 352 | 353 | 354 | }// increat == n <=> creat tree bst dynamic 355 | 356 | 357 | 358 | 359 | 360 | 361 | 362 | if(increat =='y'){ 363 | 364 | FILE *fp; 365 | fp=fopen("data.csv","r"); 366 | if(fp==NULL){ 367 | printf("error\n"); 368 | exit(0); 369 | } 370 | 371 | 372 | 373 | student stu[100]; 374 | 375 | int read = 0; 376 | int recods = 0; 377 | do{ 378 | 379 | read =fscanf(fp, 380 | "%d;%49[^;];%f\n", 381 | &stu[recods].code_s, 382 | &stu[recods].name_s, 383 | &stu[recods].moyen ); 384 | if(read == 3){ recods ++ ;} 385 | if(read != 3 && !feof(fp)){ 386 | printf("file format .. \n"); 387 | return 1; 388 | } 389 | if(ferror(fp)){ 390 | printf("error2 \n"); 391 | return 1; 392 | } 393 | }while(!feof(fp)); 394 | 395 | fclose(fp); 396 | printf("---------------------------------------"); 397 | printf("\nNumbers item in file data.CSV : %d . \n",recods); 398 | printf("---------------------------------------\n\n"); 399 | printf("---------------File CSV----------------\n\n"); 400 | printf("\ncode L_name Mark \n"); 401 | printf("-------------------------------\n"); 402 | for(int i = 0;ig,bst->d,bst->key); 440 | 441 | struct graph *G=creat_graph( copiebst->key); 442 | 443 | printf("test003graph\n"); 444 | print_graph(G->g,G->d,G); 445 | 446 | 447 | 448 | 449 | 450 | 451 | 452 | 453 | 454 | 455 | 456 | 457 | 458 | 459 | }// fin (oprection read in csv ) 460 | 461 | 462 | 463 | 464 | 465 | 466 | 467 | 468 | 469 | 470 | if(increat != 'n' && increat != 'y'){ 471 | printf(" Error input ");} 472 | 473 | // || 474 | return 0; 475 | } 476 | 477 | --------------------------------------------------------------------------------