From 54b7ccef3fa1ddedbe4f6954c6a8fd25c72a4a02 Mon Sep 17 00:00:00 2001 From: "antoine.perederii" Date: Fri, 27 Oct 2023 12:02:15 +0200 Subject: [PATCH] add java's tp --- 2A/Java/tp/1_tp/TP1.mdj | 19 +++++++-- 2A/Java/tp/1_tp/TP1/src/models/Patient.java | 2 +- 2A/Java/tp/2_tp/.idea/.gitignore | 0 2A/Java/tp/2_tp/.idea/2_tp.iml | 9 +++++ 2A/Java/tp/2_tp/.idea/misc.xml | 6 +++ 2A/Java/tp/2_tp/.idea/modules.xml | 8 ++++ 2A/Java/tp/2_tp/.idea/vcs.xml | 6 +++ 2A/Java/tp/2_tp/.idea/workspace.xml | 38 ++++++++++++++++++ 2A/Java/tp/2_tp/Sujet.txt | 2 + 2A/Java/tp/2_tp/TP2.mdj | 26 ++++++++++++ 2A/Java/tp/2_tp/TP2/.idea/.gitignore | 3 ++ 2A/Java/tp/2_tp/TP2/.idea/misc.xml | 6 +++ 2A/Java/tp/2_tp/TP2/.idea/modules.xml | 8 ++++ 2A/Java/tp/2_tp/TP2/.idea/vcs.xml | 6 +++ 2A/Java/tp/2_tp/TP2/TP2.iml | 11 +++++ .../out/production/TP2/models/Animal.class | Bin 0 -> 705 bytes .../TP2/models/AnimalFourrure.class | Bin 0 -> 704 bytes .../production/TP2/models/AnimalTheque.class | Bin 0 -> 426 bytes .../out/production/TP2/models/Oiseau.class | Bin 0 -> 525 bytes .../TP2/utilitaires/Afficheur.class | Bin 0 -> 276 bytes .../out/production/TP2/utilitaires/Menu.class | Bin 0 -> 261 bytes .../TP2/utilitaires/Saisisseur.class | Bin 0 -> 279 bytes .../TP2/utilitaires/Suppresseur.class | Bin 0 -> 282 bytes 2A/Java/tp/2_tp/TP2/src/main/Main.java | 26 ++++++++++++ 2A/Java/tp/2_tp/TP2/src/models/Animal.java | 26 ++++++++++++ .../2_tp/TP2/src/models/AnimalFourrure.java | 23 +++++++++++ .../tp/2_tp/TP2/src/models/AnimalTheque.java | 9 +++++ 2A/Java/tp/2_tp/TP2/src/models/Oiseau.java | 17 ++++++++ .../2_tp/TP2/src/utilitaires/Afficheur.java | 4 ++ 2A/Java/tp/2_tp/TP2/src/utilitaires/Menu.java | 4 ++ .../2_tp/TP2/src/utilitaires/Saisisseur.java | 4 ++ .../2_tp/TP2/src/utilitaires/Suppresseur.java | 4 ++ 32 files changed, 263 insertions(+), 4 deletions(-) create mode 100644 2A/Java/tp/2_tp/.idea/.gitignore create mode 100644 2A/Java/tp/2_tp/.idea/2_tp.iml create mode 100644 2A/Java/tp/2_tp/.idea/misc.xml create mode 100644 2A/Java/tp/2_tp/.idea/modules.xml create mode 100644 2A/Java/tp/2_tp/.idea/vcs.xml create mode 100644 2A/Java/tp/2_tp/.idea/workspace.xml create mode 100644 2A/Java/tp/2_tp/Sujet.txt create mode 100644 2A/Java/tp/2_tp/TP2.mdj create mode 100644 2A/Java/tp/2_tp/TP2/.idea/.gitignore create mode 100644 2A/Java/tp/2_tp/TP2/.idea/misc.xml create mode 100644 2A/Java/tp/2_tp/TP2/.idea/modules.xml create mode 100644 2A/Java/tp/2_tp/TP2/.idea/vcs.xml create mode 100644 2A/Java/tp/2_tp/TP2/TP2.iml create mode 100644 2A/Java/tp/2_tp/TP2/out/production/TP2/models/Animal.class create mode 100644 2A/Java/tp/2_tp/TP2/out/production/TP2/models/AnimalFourrure.class create mode 100644 2A/Java/tp/2_tp/TP2/out/production/TP2/models/AnimalTheque.class create mode 100644 2A/Java/tp/2_tp/TP2/out/production/TP2/models/Oiseau.class create mode 100644 2A/Java/tp/2_tp/TP2/out/production/TP2/utilitaires/Afficheur.class create mode 100644 2A/Java/tp/2_tp/TP2/out/production/TP2/utilitaires/Menu.class create mode 100644 2A/Java/tp/2_tp/TP2/out/production/TP2/utilitaires/Saisisseur.class create mode 100644 2A/Java/tp/2_tp/TP2/out/production/TP2/utilitaires/Suppresseur.class create mode 100644 2A/Java/tp/2_tp/TP2/src/main/Main.java create mode 100644 2A/Java/tp/2_tp/TP2/src/models/Animal.java create mode 100644 2A/Java/tp/2_tp/TP2/src/models/AnimalFourrure.java create mode 100644 2A/Java/tp/2_tp/TP2/src/models/AnimalTheque.java create mode 100644 2A/Java/tp/2_tp/TP2/src/models/Oiseau.java create mode 100644 2A/Java/tp/2_tp/TP2/src/utilitaires/Afficheur.java create mode 100644 2A/Java/tp/2_tp/TP2/src/utilitaires/Menu.java create mode 100644 2A/Java/tp/2_tp/TP2/src/utilitaires/Saisisseur.java create mode 100644 2A/Java/tp/2_tp/TP2/src/utilitaires/Suppresseur.java diff --git a/2A/Java/tp/1_tp/TP1.mdj b/2A/Java/tp/1_tp/TP1.mdj index 5eb805d..8a0fdf6 100755 --- a/2A/Java/tp/1_tp/TP1.mdj +++ b/2A/Java/tp/1_tp/TP1.mdj @@ -1011,7 +1011,7 @@ "top": 423, "width": 164.41064453125, "height": 13, - "text": "+toString()", + "text": "+toString(p: Patient)", "horizontalAlignment": 0 } ], @@ -1369,7 +1369,7 @@ "font": "Arial;13;0", "left": 503, "top": 240, - "width": 12.65087890625, + "width": 13.83154296875, "height": 13, "alpha": 0.12306859015170946, "distance": 88.61715409558128, @@ -2331,7 +2331,20 @@ "_parent": { "$ref": "AAAAAAGLW6+k0yIUSUI=" }, - "name": "toString" + "name": "toString", + "parameters": [ + { + "_type": "UMLParameter", + "_id": "AAAAAAGLW8r4g0Atc1M=", + "_parent": { + "$ref": "AAAAAAGLW7PN2SzOuyo=" + }, + "name": "p", + "type": { + "$ref": "AAAAAAGLW588ex/TTbE=" + } + } + ] } ] }, diff --git a/2A/Java/tp/1_tp/TP1/src/models/Patient.java b/2A/Java/tp/1_tp/TP1/src/models/Patient.java index 0c13707..17e8d42 100755 --- a/2A/Java/tp/1_tp/TP1/src/models/Patient.java +++ b/2A/Java/tp/1_tp/TP1/src/models/Patient.java @@ -1,3 +1,3 @@ package models; -public record Patient(String nom, String prenom, int age) {} +public record Patient(String nom, String prenom, int age) {} \ No newline at end of file diff --git a/2A/Java/tp/2_tp/.idea/.gitignore b/2A/Java/tp/2_tp/.idea/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/2A/Java/tp/2_tp/.idea/2_tp.iml b/2A/Java/tp/2_tp/.idea/2_tp.iml new file mode 100644 index 0000000..d6ebd48 --- /dev/null +++ b/2A/Java/tp/2_tp/.idea/2_tp.iml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/2A/Java/tp/2_tp/.idea/misc.xml b/2A/Java/tp/2_tp/.idea/misc.xml new file mode 100644 index 0000000..639900d --- /dev/null +++ b/2A/Java/tp/2_tp/.idea/misc.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/2A/Java/tp/2_tp/.idea/modules.xml b/2A/Java/tp/2_tp/.idea/modules.xml new file mode 100644 index 0000000..5be316b --- /dev/null +++ b/2A/Java/tp/2_tp/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/2A/Java/tp/2_tp/.idea/vcs.xml b/2A/Java/tp/2_tp/.idea/vcs.xml new file mode 100644 index 0000000..4fce1d8 --- /dev/null +++ b/2A/Java/tp/2_tp/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/2A/Java/tp/2_tp/.idea/workspace.xml b/2A/Java/tp/2_tp/.idea/workspace.xml new file mode 100644 index 0000000..e339c70 --- /dev/null +++ b/2A/Java/tp/2_tp/.idea/workspace.xml @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + 1698394730221 + + + + \ No newline at end of file diff --git a/2A/Java/tp/2_tp/Sujet.txt b/2A/Java/tp/2_tp/Sujet.txt new file mode 100644 index 0000000..0f7ce53 --- /dev/null +++ b/2A/Java/tp/2_tp/Sujet.txt @@ -0,0 +1,2 @@ +developper une app permettant a un gestionnaire de zoo de gerer les entrées sorties d'animaux dans son zoo. Il pourra a tout moment afficher l'etat (les infos) des animaux. En hiver, les animaux hiverne. + les oiseaux (cigogne, peroquet, ...) migrent du nord au sud du zoo. Les animaux à fourrure (ours, loups, ...) augmentent la densité de leur pelage. diff --git a/2A/Java/tp/2_tp/TP2.mdj b/2A/Java/tp/2_tp/TP2.mdj new file mode 100644 index 0000000..65e8560 --- /dev/null +++ b/2A/Java/tp/2_tp/TP2.mdj @@ -0,0 +1,26 @@ +{ + "_type": "Project", + "_id": "AAAAAAFF+h6SjaM2Hec=", + "name": "Untitled", + "ownedElements": [ + { + "_type": "UMLModel", + "_id": "AAAAAAFF+qBWK6M3Z8Y=", + "_parent": { + "$ref": "AAAAAAFF+h6SjaM2Hec=" + }, + "name": "Model", + "ownedElements": [ + { + "_type": "UMLClassDiagram", + "_id": "AAAAAAFF+qBtyKM79qY=", + "_parent": { + "$ref": "AAAAAAFF+qBWK6M3Z8Y=" + }, + "name": "Main", + "defaultDiagram": true + } + ] + } + ] +} \ No newline at end of file diff --git a/2A/Java/tp/2_tp/TP2/.idea/.gitignore b/2A/Java/tp/2_tp/TP2/.idea/.gitignore new file mode 100644 index 0000000..26d3352 --- /dev/null +++ b/2A/Java/tp/2_tp/TP2/.idea/.gitignore @@ -0,0 +1,3 @@ +# Default ignored files +/shelf/ +/workspace.xml diff --git a/2A/Java/tp/2_tp/TP2/.idea/misc.xml b/2A/Java/tp/2_tp/TP2/.idea/misc.xml new file mode 100644 index 0000000..5295b2c --- /dev/null +++ b/2A/Java/tp/2_tp/TP2/.idea/misc.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/2A/Java/tp/2_tp/TP2/.idea/modules.xml b/2A/Java/tp/2_tp/TP2/.idea/modules.xml new file mode 100644 index 0000000..8fa7630 --- /dev/null +++ b/2A/Java/tp/2_tp/TP2/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/2A/Java/tp/2_tp/TP2/.idea/vcs.xml b/2A/Java/tp/2_tp/TP2/.idea/vcs.xml new file mode 100644 index 0000000..bc59970 --- /dev/null +++ b/2A/Java/tp/2_tp/TP2/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/2A/Java/tp/2_tp/TP2/TP2.iml b/2A/Java/tp/2_tp/TP2/TP2.iml new file mode 100644 index 0000000..c90834f --- /dev/null +++ b/2A/Java/tp/2_tp/TP2/TP2.iml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/2A/Java/tp/2_tp/TP2/out/production/TP2/models/Animal.class b/2A/Java/tp/2_tp/TP2/out/production/TP2/models/Animal.class new file mode 100644 index 0000000000000000000000000000000000000000..dd5ec02991971ce6e67308a5c6537129e0ca3034 GIT binary patch literal 705 zcmZuv%TC)s6g@ZiL5%ajg|xgMtHem;189*@rAkN5^-#f_3(JQMN6@^EZli7-C8O@?;93oH zf%91>IzJT5wLASP=23Ow`B;E2sEyN06;HZHi5^EWAxSzG1igPMXL+WR(ShOBeKgP% zSa)fn1ad5BwckRIJAGolQdrRF=|r8}j0Y+^j|MR_K`$LfaX-qmiKj^`ztR(fer4xC zP^F)lH_w!v1@1`Y7ljRWMI#R56XSiU-Fa(C;7(?Et6dnJztXoVOH?NC&eEG~sJ?0A zZ=tNPZzf>vu9+|4(1HS>` zpqPa!9}jiPEitoQ(y)vcBMRUn%Sf^N#6qU<3Rb6Ox?Ihf9X_FU&rK=r6v=uaSd#6j zpkNK_?~vVx|H#3+wsqE(<8bKH^wx7F zpi&P!Kp(2=tmA+X9Cr8notf{m|Ni@P2jCs{B6#pa$QU&Q0H+Z%jQSE`>Xd(j^jxv>`qCvQd#)X@kL#b_cHSbx-hoXzrlmTQ6Kb8V-l&<_!D z60vnD#xmLh&8aRPaF$<7VJU-Uh!@?K&V z2oVsai3Zl_CG&c$qf3vS*uW;yob`govBh}FK;ERu>?`Juw7w|SmPMG$u&ax1I@(0Me8T(iRA0_`=$O)skKe@E7Y-8V!9dPd3VLJ P!-#~}mW;ll?P2#nit&DQ literal 0 HcmV?d00001 diff --git a/2A/Java/tp/2_tp/TP2/out/production/TP2/models/AnimalTheque.class b/2A/Java/tp/2_tp/TP2/out/production/TP2/models/AnimalTheque.class new file mode 100644 index 0000000000000000000000000000000000000000..d755abe24efd6e6c8ed6684563ff9007fb57d26a GIT binary patch literal 426 zcmZ8dO-sW-5Ph4(#>8mT*7|YmO?xmupfykgPeBhY1&^D!v|Ba_ZW7U-ZldAylhu04{Or!hmVR^00#zgTLaBJWxDa1h?@@Bqc*@EHhb#4CdMS z+{P|LuOU^XRKY}R{v64obYa7Eum{h^zJ~*}iI?X0LKVRzlPOoTrFf_WgR4Z*Ak`Di zi+;6gnGu6Cm5Yp*l_u`sUwa&FNsdC|TURuNp&iLg+*D~S^o+-fkZzPGT+O+bb^QZc zkURsWQ-M5VDZ|E+HXI$^d`3 n1{=P^zFWh2h5OR5dlYNqL41phJEY9p@X^N+RSd@z4V-)felT9s literal 0 HcmV?d00001 diff --git a/2A/Java/tp/2_tp/TP2/out/production/TP2/models/Oiseau.class b/2A/Java/tp/2_tp/TP2/out/production/TP2/models/Oiseau.class new file mode 100644 index 0000000000000000000000000000000000000000..3c947cd2470b57e1443d17cbbe444458f07772f6 GIT binary patch literal 525 zcmZWl%Syvg5Ir}EO`D_-qphzhx~mcF2UGTVQQ zsp>+f2bkVba}M^N0bGh|dl0Mu6Kj<1FJM?lohlkY0~fQ&; xSJ<90NBIp!Pp4mr=ujdq42l*}*mUO#k=HUYCnK)sVmpK}pj8d(HYwMz`wO>}US4qX5S-12(bTF4;@MmEV19sYK?*$uJt*E^;b_V@r2u{)-BUf)C)M5PKF9 z4ZG6p&a5;$U*8{}0Cvbz1PBvEOT?HF@}qiHMW_0w;-NX}))8hm+_SqSgcp}}f;nL` zI_}shHrf`IV$0U*(Ga4$;ZYN^l6!qWzBJk#RMUyFE{9fiwKDAauNb*!wuH0tf4gf! zS`DLV^`5;)_V;P)Q{o(ng!e_#5?}B{STS)RzIq3}i4Y(a^k*Q%LU1|lvCNe)!l__@ F><3rTJTL$N literal 0 HcmV?d00001 diff --git a/2A/Java/tp/2_tp/TP2/out/production/TP2/utilitaires/Suppresseur.class b/2A/Java/tp/2_tp/TP2/out/production/TP2/utilitaires/Suppresseur.class new file mode 100644 index 0000000000000000000000000000000000000000..8e41266a73b50e96d28b60087791eec6965720de GIT binary patch literal 282 zcmZ`!yH3ME5S;ZR29ppg4Wgt=Qs55&(jZY;P$Wu!HYeD~v7_@H|3!tAA|H^CLfNxY z(6B4b?9590IR5Sr0G^Pg2oNTShKMmBWE=IR@>(??`CGZsl_d-wxna8?gwxqN!3E*Q zS+3bCHoD7~ZnqQev@?Y0xqa7!alws#b=y*#l`3m-CPiDRdaVq5eKsTe$sOUg_-Eb& zAzil4RQiSeknGQ{dw(eIkjVW$NK!r!ycCu98i?mVpl>k(q=LQ;gt!tM_H`^g5=FQc H3@| lesAnimaux = new ArrayList<>(); + +} diff --git a/2A/Java/tp/2_tp/TP2/src/models/Oiseau.java b/2A/Java/tp/2_tp/TP2/src/models/Oiseau.java new file mode 100644 index 0000000..21ddaab --- /dev/null +++ b/2A/Java/tp/2_tp/TP2/src/models/Oiseau.java @@ -0,0 +1,17 @@ +package models; + +public class Oiseau extends Animal{ + + public Oiseau(String nomAnimal, int zoneAnimal){ + super(nomAnimal, zoneAnimal); + } + + public void hiverner() { + if(this.zone == 0) { + super.setZone(1); + } + else { + super.setZone(0); + } + } +} diff --git a/2A/Java/tp/2_tp/TP2/src/utilitaires/Afficheur.java b/2A/Java/tp/2_tp/TP2/src/utilitaires/Afficheur.java new file mode 100644 index 0000000..912eca9 --- /dev/null +++ b/2A/Java/tp/2_tp/TP2/src/utilitaires/Afficheur.java @@ -0,0 +1,4 @@ +package utilitaires; + +public class Afficheur { +} diff --git a/2A/Java/tp/2_tp/TP2/src/utilitaires/Menu.java b/2A/Java/tp/2_tp/TP2/src/utilitaires/Menu.java new file mode 100644 index 0000000..f306a3d --- /dev/null +++ b/2A/Java/tp/2_tp/TP2/src/utilitaires/Menu.java @@ -0,0 +1,4 @@ +package utilitaires; + +public class Menu { +} diff --git a/2A/Java/tp/2_tp/TP2/src/utilitaires/Saisisseur.java b/2A/Java/tp/2_tp/TP2/src/utilitaires/Saisisseur.java new file mode 100644 index 0000000..a415c05 --- /dev/null +++ b/2A/Java/tp/2_tp/TP2/src/utilitaires/Saisisseur.java @@ -0,0 +1,4 @@ +package utilitaires; + +public class Saisisseur { +} diff --git a/2A/Java/tp/2_tp/TP2/src/utilitaires/Suppresseur.java b/2A/Java/tp/2_tp/TP2/src/utilitaires/Suppresseur.java new file mode 100644 index 0000000..ccccdde --- /dev/null +++ b/2A/Java/tp/2_tp/TP2/src/utilitaires/Suppresseur.java @@ -0,0 +1,4 @@ +package utilitaires; + +public class Suppresseur { +}