From a5665f3b231d4904f4ba135a483ba436c4f37cfe Mon Sep 17 00:00:00 2001 From: HORVILLE Ewen Date: Mon, 7 Mar 2022 17:26:31 +0100 Subject: [PATCH] =?UTF-8?q?TP06=20-=20TP07=20d=C3=A9but?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- APL2.1/TP04/Segment/Segment.class | Bin 1039 -> 1079 bytes APL2.1/TP04/Segment/Segment.java | 2 +- APL2.1/TP04/Segment/TestSegment.java | 2 +- APL2.1/TP06/Documentation/Documentation.class | Bin 0 -> 577 bytes APL2.1/TP06/Documentation/Documentation.java | 9 +++++ APL2.1/TP06/Documentation/ToBase8.class | Bin 0 -> 698 bytes APL2.1/TP06/Documentation/ToBase8.java | 8 +++++ APL2.1/TP06/Documentation/reponses.txt | 4 +++ APL2.1/TP06/Gris/Gris.class | Bin 0 -> 197 bytes APL2.1/TP06/Gris/Gris.java | 7 ++++ APL2.1/TP06/Gris/TestGris.class | Bin 0 -> 1088 bytes APL2.1/TP06/Gris/TestGris.java | 24 +++++++++++++ APL2.1/TP06/Metrique/MetricPaper.class | Bin 0 -> 876 bytes APL2.1/TP06/Metrique/MetricPaper.java | 33 ++++++++++++++++++ APL2.1/TP06/Metrique/MetricTest.class | Bin 0 -> 461 bytes APL2.1/TP06/Metrique/MetricTest.java | 8 +++++ APL2.1/TP06/Nuancier/Nuance.class | Bin 0 -> 1000 bytes APL2.1/TP06/Nuancier/Nuance.java | 30 ++++++++++++++++ APL2.1/TP06/Nuancier/TestNuance.class | Bin 0 -> 837 bytes APL2.1/TP06/Nuancier/TestNuance.java | 18 ++++++++++ APL2.1/TP07/Formes/Formes.class | Bin 0 -> 502 bytes APL2.1/TP07/Formes/Formes.java | 32 +++++++++++++++++ APL2.1/TP07/Formes/NewJFrame.class | Bin 0 -> 661 bytes APL2.1/TP07/Formes/cercles.png | Bin 0 -> 1917 bytes 24 files changed, 175 insertions(+), 2 deletions(-) create mode 100644 APL2.1/TP06/Documentation/Documentation.class create mode 100644 APL2.1/TP06/Documentation/Documentation.java create mode 100644 APL2.1/TP06/Documentation/ToBase8.class create mode 100644 APL2.1/TP06/Documentation/ToBase8.java create mode 100644 APL2.1/TP06/Documentation/reponses.txt create mode 100644 APL2.1/TP06/Gris/Gris.class create mode 100644 APL2.1/TP06/Gris/Gris.java create mode 100644 APL2.1/TP06/Gris/TestGris.class create mode 100644 APL2.1/TP06/Gris/TestGris.java create mode 100644 APL2.1/TP06/Metrique/MetricPaper.class create mode 100644 APL2.1/TP06/Metrique/MetricPaper.java create mode 100644 APL2.1/TP06/Metrique/MetricTest.class create mode 100644 APL2.1/TP06/Metrique/MetricTest.java create mode 100644 APL2.1/TP06/Nuancier/Nuance.class create mode 100644 APL2.1/TP06/Nuancier/Nuance.java create mode 100644 APL2.1/TP06/Nuancier/TestNuance.class create mode 100644 APL2.1/TP06/Nuancier/TestNuance.java create mode 100644 APL2.1/TP07/Formes/Formes.class create mode 100644 APL2.1/TP07/Formes/Formes.java create mode 100644 APL2.1/TP07/Formes/NewJFrame.class create mode 100644 APL2.1/TP07/Formes/cercles.png diff --git a/APL2.1/TP04/Segment/Segment.class b/APL2.1/TP04/Segment/Segment.class index 2af77ee0abaacbdf90bcc8c2d8b09ee046a701d4..4b76ea684600343cf6fb56302f4813f32f85176a 100644 GIT binary patch delta 521 zcmZusOG^S#7(Fwij>^r;%y;j1&iT%F=GOb>-T3@^{{T?KvL6B1J`5l$OU^{z4;RLLEEApv zHS+PJfTDy-@>Z6LNfT2hrtj8!t07bb1`!k(LQq4X-MVO1T9@6*&e?IND-c3LU2#|6dD86LCYg8XCiXMJ^y}bk2LB~NH#S*`Wn<;`_;WXfRfPnS3NuJrNDTT{{h)t63{Ec3FNO*!xC(0sY^*D^ zv7xYuKw%5p;~VR=jxuM)IY96w#$+V%ABDy4G~?{p6D2D%-V=E{g*l^~i8hrHl`Q6s z@+c0DGVF`+1k;y8UOPPbhEK2AdVzSNVnNqB)PXF*hLMA7NFC|-w3~orbh$}^xAW)~ z{wK=6#3G3$Q$Ho%Nq_K5tdLkGvBnAy3wkE!?EmcOHJ>3`{3b{^uNyquauA7}DldqbqJjr6-(DrKtv%)2VvGSW}7i z&5`K)e2y$br0I?ZZFy*U`s9Jz9@)}SLRqe}<#`z32y-kO$RW?MVqg_(9P0)OD3arZ zf?@7&?n$dF+lpcSpD+`|=G{<9o0fA&L{I%jx7^Ap`IE am?JEZb&NVO1jgVTvy6QqOB3S0WbOyr_fgc5PcKd+0=DtN}51R1En8eCy+=S08!|HN>w8TsFc!6Pn)oc91`1d90YfM z374MBp;R3D1Ns~KLpT*?U8E{%_OSbQG;e0!oAb-xX8>NHZX<`HjRlluP{tjN?%G(y zl8t*<7N`i^CuCpyfuC#<4A(m#nA_neMVM>(fqFk4c2vACI|GiGL+J;EvU}L-%P+Dq zkU_7}PGUdkZE9k^oyhLzcQQ)z1s)LWb~ui^YRA`nXFq%^N9tu=vmMO97Fcoc5UT=f z4%V^Z;1M1RxDGs21!@kS;3+};ClU(RjX!kys+$msQ>G!zUne$$MDo>`FLhM(K*+hmAcJoUm*qhns}iB-~YBuUz0Px9Q!iJXtn1EG2%7 zA{B45C4>ccDzBKzm~6^^M0$h)@1itChj+l13f{av8IU%b?^*s;_$7X=>MzhS16~T> z*)*sV^SH%Wr}mke<+o97)z01+Tb1P>*r-*Wy)qZgLhclq=hjacCF>OC39J)jzZ-P) p_d*xVq(#fH7#o;}i6zD^<2uhZ$I(18mkQ|bZlv)&$n3Mw);R?<#ElN&x%LH*a-HS4d^|BJn5_uR{7md>|qH#PSk- z=lq=fBB1dao}NH+859|qfVP4FBM`DMumVXoAWsFzW&+Y2TGGp2sNiMKB RD+4=F9U}t=P=twr6951NAmRW3 literal 0 HcmV?d00001 diff --git a/APL2.1/TP06/Gris/Gris.java b/APL2.1/TP06/Gris/Gris.java new file mode 100644 index 0000000..371408f --- /dev/null +++ b/APL2.1/TP06/Gris/Gris.java @@ -0,0 +1,7 @@ +import java.awt.Color; + +public class Gris extends Color { + public Gris(int l) { + super(l, l, l); + } +} \ No newline at end of file diff --git a/APL2.1/TP06/Gris/TestGris.class b/APL2.1/TP06/Gris/TestGris.class new file mode 100644 index 0000000000000000000000000000000000000000..a404698cccec1736862f95ef7bc93ab4d447f419 GIT binary patch literal 1088 zcmZ`&OH&g;5dMbjX2@oNBp4n>6d!0315refhoFR4FafKepwQDm7FbMnQ=5(WxM-EX z!GlLHob`}cQsv2$|Hp$>me`YkpoLqtz0+TR-P7|;@3&u{zW^A*0}WwxYq*F@9G4q$ zMS}-D(p;71nlw?4m(z(u&(4eE6qgO*S`lOTe;RbHXaKALSI0iUwGkC{L%XG&X zJki(+gOajy21856w2XyvVcl?+#d@9)r65d;p)LA2vm>60WL{WX$tBk@t*ud+*tFz| zjVD=AtnoPp8MGz4>}(h_rp#|zHcIZSW0v}4x{fxqa}4RYgJFh{#GWNfyHqVXKjVl3 zWq7AV!89C69nmq0F&%fM8OH=eYpn^f>n5pYE+d}XWmhsOeh>Hmt@uz_MxM?f_m`{* z9g|3LOzD`$jE-5%=}2Rqq4B6qhQRST7uR=;4VQL3400L5 z(Nh#l{|6@}dC72>%on798cnCAwthk~_J(jxo35aPyeVT-l=E&XZe^3DHLtXu-wtuN%|2;b3#q5m?g75XVFKo6`J)kH1zUm01X}5$##&} zMPEi=HC_e#KnsRWvfdh~&<}7H5n4;?cPNAduj8KnPiPq1hi5IMRH0@QkwE{pd@JxK z0=Yo00-o?z(6|rZS|n11wvgzp!0#DU!b&8v{T?Ix(ATPH8d1ZFT6~9ar@D{kwIJSB z(NaNR5B^T|BZ9O{bgC7ER^KRW@8D}fsi0N1*-&e994)nGIT{h9X1k!F2Y$rq{~SOQ zhABRU0J0R_L?Czx)TKN_%cCR#l9o3TLPkW0N`Qd!T)OEcy@ke+xdn+88}|GO zuqhD>K7e209}s73uuA34x$`(P_sq=C-`{@#xPohL=sf)Ou{L~E#eOUboEE4HGz6Me z%;Ah1ZiXxXBy`pdlTW#K&JA0s12=s6A+_9a@FmZ;JhVM5DU@w|Pus+F6`Xpf(cyC| zUe^kfcTHd4-`-l&$>V74H6yN#SNh!zrh3|DMR&C6ZCHiTx>Qc&@n>e;k~otGR<@#^ zmNw4|qc7O~y6GExBklE6p}HDxCtZEp$j?*RZx5n@PFkDM+sMZJ8R+fLgmR4De}JZ0K{XBelsTm64Nb$f5L zT{Z8ivQ+PM8k9c8NM3O>(Gf{ZNfHaZ)LeQ6k5{99C>)|+gM$&i?qUG->N72c!{YM= zO5}2+B5u5wTOsQx`(=IS*;P7}n>!dC!r99nXZBbjyHvoQCVRe+?G~_S$zCXAdj)Kn zj<+MqKAu440G6BIs69Ysh_L`ZaR(FhCsRMe>C~P{bF*Jrl&x+bR|>Aep@e`#E>XI| JNybKS>JLsijp+aY literal 0 HcmV?d00001 diff --git a/APL2.1/TP06/Metrique/MetricPaper.java b/APL2.1/TP06/Metrique/MetricPaper.java new file mode 100644 index 0000000..95ff617 --- /dev/null +++ b/APL2.1/TP06/Metrique/MetricPaper.java @@ -0,0 +1,33 @@ +import java.awt.print.Paper; + +public class MetricPaper extends Paper { + private static double toMetric(double inch) { + return inch * 2.54d; + } + + private static double toInch(double metric) { + return metric / 2.54d; + } + + public double getMetricHeight() { + return toMetric(this.getHeight()); + } + + public double getMetricWidth() { + return toMetric(this.getWidth()); + } + + public double getMetricImageableX() { + return toMetric(this.getImageableX()); + } + + public double getMetricImageableY() { + return toMetric(this.getImageableY()); + } + + public MetricPaper() { + super(); + this.setSize(toInch(210d), toInch(297d)); + this.setImageableArea(toInch(15), toInch(15), toInch(180), toInch(267)); + } +} \ No newline at end of file diff --git a/APL2.1/TP06/Metrique/MetricTest.class b/APL2.1/TP06/Metrique/MetricTest.class new file mode 100644 index 0000000000000000000000000000000000000000..b08e4590f3802f19decb9162c1106534f99138cb GIT binary patch literal 461 zcmY*V%TB^T6g|_Hj+Dw%@QI2m&_ot4TwvTtj0;o}2#Iku;G_&e4zq{QuVnt6mOzF5`kCm#E}ZTh9)|la2gHdt#bn5?Ha+%-auBbTI`5NM z`XoG@Qlq$(rNVlfG{vM$3co>8JQ*)%-bv-X5|R#WG87iG*WnC&tjQxf)T%aXJygKy z5A`#^^burJl$FUd@`=+q*arm+E?Ij~GzqwgG{qWv0h7o;;Ty)&9A@hi*4Ye+8SE7? SO(2>^yKLlXC+Vi#K=vOVZd<$n literal 0 HcmV?d00001 diff --git a/APL2.1/TP06/Metrique/MetricTest.java b/APL2.1/TP06/Metrique/MetricTest.java new file mode 100644 index 0000000..c3e7d73 --- /dev/null +++ b/APL2.1/TP06/Metrique/MetricTest.java @@ -0,0 +1,8 @@ +import java.awt.print.Paper; + +public class MetricTest { + public static void main(String[] args) { + MetricPaper p = new MetricPaper(); + System.out.println(p.getMetricHeight()); + } +} \ No newline at end of file diff --git a/APL2.1/TP06/Nuancier/Nuance.class b/APL2.1/TP06/Nuancier/Nuance.class new file mode 100644 index 0000000000000000000000000000000000000000..304d5b274fcd0bc5a6414a434de078bfc4756206 GIT binary patch literal 1000 zcmZuvZBNr+6g|&gTGo|O_l77SDB#v96Wa6Vnw6OZ4C-4 zoT+M5GZ|Im!ZL?D9PV;hS2;hwlW4Z-?3|gEduZ@3>!S$B`A> zc&<0LQL$w=Hgf3_x2hM%Iy#-CWs?wdOi2Hu?@2FgjKN1qI%ATt7s$6V2&Bz=ut+yZ z(49;o!Pe4O0!5VKH~BTJkX3}bMt?_069Qm7<0$JtgRmnND*y;Vv%Br4!j&w%?)?iB`QX&Tt>yrvvV=8@gHxQ X`aptG4%bcGH&GEtZ)smgF9niru_a(^2c8m`ZD?QZ4SGi^ zJdj6SLX4i&zQBU}vC)yAWwk5)<7zVswST{kEzw+rbsg z3*WnL zo>Fr>M8I6D*K2gRxZ&U#o-JToahPoQ+6dpqcz1itd4&0;K^KRE$uVH(@geI37~`=QuE0eSk7_#`0s zdB`qMwn|=*PnAXxKPV7bB%2A=!(FF+^^nrv!Vf%7#heEv%5T Z0$~+6c!g=a!wfuRp^+oC*NB_I@;@yquU!BD literal 0 HcmV?d00001 diff --git a/APL2.1/TP06/Nuancier/TestNuance.java b/APL2.1/TP06/Nuancier/TestNuance.java new file mode 100644 index 0000000..a8e98fb --- /dev/null +++ b/APL2.1/TP06/Nuancier/TestNuance.java @@ -0,0 +1,18 @@ +import javax.swing.*; +import java.awt.*; + +public class TestNuance { + public static void main(String[] args) { + JFrame fenetre = new JFrame("Damier"); + fenetre.setSize(500, 300); + fenetre.setLocation(100, 100); + fenetre.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + fenetre.setLayout(new GridLayout(1, 3)); + + fenetre.add(new Nuance("#FF0000", 100, 100)); + fenetre.add(new Nuance("#00FF00", 100, 100)); + fenetre.add(new Nuance("#0000FF", 100, 100)); + + fenetre.setVisible(true); + } +} \ No newline at end of file diff --git a/APL2.1/TP07/Formes/Formes.class b/APL2.1/TP07/Formes/Formes.class new file mode 100644 index 0000000000000000000000000000000000000000..652357d5448d4d672c7cc90d144e3e319ab07c64 GIT binary patch literal 502 zcmZut%TB^T6g>l_#Zu)V@0X%RizKpip>cyD!4O$sNYqtv_*}7`~bhl zweb#^uyJN`?(5vg+^?VaPXMPl(4k{nLo$q%jsVgUG7_>9auV_yQW^>j>bbCmf58wm zt33v#;S4!Lv@L9YJ)8Eqdt>z{h<_>sM zNOGjwd70@^0b|S7gEe6UnfRS zcw+To^RC)M1sk+Xc>n$H8<_? zmi2DCxZ`3+p!&qbrg$pg1kKk1k!kXV*z z;I70y+?RNOJ&6EKi5A)t9cvz9Un0bwz|yIn9`!OcCQaSqKZp6$#Dnl?p|I6|%3_yM zrd2`IX3+dk*#e%)&r8vSbqX1=bdU-DH$x2SnwXlF%1eUy$SS z+G^pE<&EhV!#V9CJ7D02HiID*^xm1#=%tS6y1^m8xq3{XK>G4s>~K~!ju$9FSg~kV zc-rMIxK~==AimP!%xHb40acXYa$Uvh-*k-%9Nx6sGn7tRGdN$c)!|;Aq0(_2dQ~oW s2G2&97`3FOIq5bD!73_zUGnt}MjKe;gf?ga58@XZE`Ke-h(&Gw0V^_vbN~PV literal 0 HcmV?d00001 diff --git a/APL2.1/TP07/Formes/cercles.png b/APL2.1/TP07/Formes/cercles.png new file mode 100644 index 0000000000000000000000000000000000000000..4713bcc6cc12c4aa22f8f79fdbb2b2d94ec4f5e6 GIT binary patch literal 1917 zcmV-@2ZH#CP)F#sGzjX$GsfD3h{4xO}W^n(IEzHJQ8H-XR#e3mjQTYvYt%l(#!W$%E z?9=Bs4G!wL1yLz52z6xX;?*tj%XnHz+25Tg%##DMnHO5gK7qJPpW^`9e))oG- zG9n|H!uLH=wCTt78&Lw*XG1!;PIk@)963-{IK!dEeqpl6AdCq+>o2v?8v0=jnE-%> zbss$HJGfr7(2W@S)+<@`(P}tu7?iF3>Z}O=P<5WOhZ7r zS0Dc{$^Q9ki?zK|Z9^PtU|fKCyDBuN1dHe4AVkzTRLYzL@8c(W%^6!h zHJ8XZG5NPhL@KQFewXu{?!H!uhhqH_Hdx@81VB!ULnhQeT%@VDLER&E9C`{^{C)}V zbXPE789g4aS%S$a#5&p~9*F!sVq$^!sJ?k!1R2{{PWkaJlW*c;!TL-F9DLvn2hG7{ zqnJq`4Vx69l^{HSj%V`BF)&D`yl)>ib~Pre()C_~rPf?fvu z{Am=4%m{&>+B33(F1cpbYNu|&fK3HnE|MlRcs&tXb(Y(POs#YO!eG6oj>Z*j=1Kj= zm?4GTZyv4I+=E-{;RoT+gP&x9J?*XQg4B*HO~0{4&QMsQ0KNFLgyF!hu-T=Nzaf+ za}Btd(!#^jo+~l4>e-tEx9ml6V;<#;_Thak<7m(Ej;i^zj>G6DLS+?jy0mfSN3 zTncVP7?$3Q*Y`GP>L3S!0})e_)BEm3_<8mAl40S_*bAcwAr#8}Ii&}Zk%@HIn>pX6 z=DVVH8&4G{oCc!@ZB!k6W&%i(%8ZvzJl>$wf*{>e9lfER*f(h~>dW!-1fEI-26G7l zL)Ppy@Zue+`t#l0ZOXL;7$b!{8l_WBFOxqgQ8ohgODm9tN8&xmDKAnAn})jPfgKw( zDI<8(b-*MF-8tJsg*u_&CtIAHV>>UxbKCBFdlx%_iG6KTgBj8IT#u01n8Um?rj%sK zI%r}7FZK!0T(-!FEhg=#KIMnuGswA^XYMn77dh&j5EK_c4}o=BHpUMz9s`ocNlq$M zZxa>94#I@s4OfK1*v>mbLU&@B=(ORMh{9eo$=&aLPTf=+%+Axq3BL#0}XT7lp^6cjoDp0Gs;e4fJAiR7EJebLXdyWWvfEu