From a75ff44f14ebe7ab368e482ea46f20c9822a8b92 Mon Sep 17 00:00:00 2001 From: stiti Date: Sat, 9 Mar 2024 14:19:25 +0100 Subject: [PATCH] Ajout --- BUT1/.DS_Store | Bin 6148 -> 6148 bytes .../Entrainement/SUJETB/EXO1/Decapite.class | Bin 1338 -> 0 bytes .../Entrainement/SUJETB/EXO1/Decapite.java | 7 +-- .../DEV2.1/Entrainement/SUJETB/EXO1/Test.java | 6 ++ .../Entrainement/SUJETB/EXO2/Deduction.class | Bin 0 -> 1087 bytes .../Entrainement/SUJETB/EXO2/Deduction.java | 46 +++++++++++++++ .../Entrainement/SUJETB/EXO2/Yescard.java | 13 +++++ .../Entrainement/SUJETB/EXO3/Direction.class | Bin 0 -> 1423 bytes .../Entrainement/SUJETB/EXO3/Direction.java | 55 ++++++++++++++++++ BUT1/DEV2.1/TP5-Heritage/EXO4/Nuancier.class | Bin 651 -> 898 bytes BUT1/DEV2.1/TP5-Heritage/EXO4/Nuancier.java | 5 +- .../Calculatrice/Calculatrice.class | Bin 0 -> 1474 bytes .../MiniProjet/Calculatrice/Calculatrice.java | 38 ++++++++++++ BUT1/MiniProjet/Calculatrice/Operation.java | 29 +++++++++ 14 files changed, 192 insertions(+), 7 deletions(-) delete mode 100644 BUT1/CONTROLE/DEV2.1/Entrainement/SUJETB/EXO1/Decapite.class create mode 100644 BUT1/CONTROLE/DEV2.1/Entrainement/SUJETB/EXO1/Test.java create mode 100644 BUT1/CONTROLE/DEV2.1/Entrainement/SUJETB/EXO2/Deduction.class create mode 100644 BUT1/CONTROLE/DEV2.1/Entrainement/SUJETB/EXO2/Deduction.java create mode 100644 BUT1/CONTROLE/DEV2.1/Entrainement/SUJETB/EXO2/Yescard.java create mode 100644 BUT1/CONTROLE/DEV2.1/Entrainement/SUJETB/EXO3/Direction.class create mode 100644 BUT1/CONTROLE/DEV2.1/Entrainement/SUJETB/EXO3/Direction.java create mode 100644 BUT1/MiniProjet/Calculatrice/Calculatrice.class create mode 100644 BUT1/MiniProjet/Calculatrice/Calculatrice.java create mode 100644 BUT1/MiniProjet/Calculatrice/Operation.java diff --git a/BUT1/.DS_Store b/BUT1/.DS_Store index 50c1f947f30e708f9e8e8a60eb348b7547c5f75c..cf5febe71ce58c291d3f4f893db4c410e49d7c86 100644 GIT binary patch delta 67 zcmZoMXfc=|#>B`mu~2NHo+2aj#DLw5%#(STx;H;#R%F@yf!UvFGdl-A2T;l8hs@uZ VC-aL~axee^BLf4|<^Yi`%m8jW5Z3?z delta 349 zcmZoMXfc=|#>B)qu~2NHo+2ar#DLw4H!w0XvQOq=?4E4T$RlX%nUkNKl#`#tz`!8D zzyK6AU=$ZMV$fqSLX-IklBoyFB$XEzK=tfMD#*z!E-^5;#>m9X!pg?Z!Op?W5gVM5 zUmjeNSW;T-lvorE;)Uer=On?{iAiCZspatkBF_1FC5f4NsYPH7nJKA2B{AWdc`5nj zPWh#IDaByD!4L@!PL4Frcmav(YC{Wi9R(v(gIXPhYD*&n9R(9(v)Wot4pC)&>!A4T zoZP(pE}(~ifRPbGGw?!b7}X7AuratWxH5z>fIU?fT$GoSpO+34XWYDyQJZBmI|n}p ZFz|q!@640=MJzdhW`T{{93ZlV82}XhR;~a5 diff --git a/BUT1/CONTROLE/DEV2.1/Entrainement/SUJETB/EXO1/Decapite.class b/BUT1/CONTROLE/DEV2.1/Entrainement/SUJETB/EXO1/Decapite.class deleted file mode 100644 index 0800153ca711926482c2baa3172bdde0bb3af638..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1338 zcmaJ>>rN9v6#j++Tk4iVK?-uQTrCBuctwgAC?dq7KOhh>{us6sSZHT!cZ%Un^a=c{ ziClt-58yKyXOVhAP=|FMah(g`)bP5S0$-VbVkr zQ$&n%{CtM)DyQ`c49yuQN9;thwiIv6gjwz`&pzFPeYhT+Q5P)_Zh=jO|7;(at=kx@7U*ig-hr>Mg7zMslWRr(Yf+xEJ5qb%R(1jUVb<(4?Xdv|$CXL#n!n3$v zDK$f>de7~@(Ek1mcd}EbNNm^I^&w-_a4*8dMF0=Hau4x{<{+WW(f=`?(<(&P3wkXx G==%@nQb&FO diff --git a/BUT1/CONTROLE/DEV2.1/Entrainement/SUJETB/EXO1/Decapite.java b/BUT1/CONTROLE/DEV2.1/Entrainement/SUJETB/EXO1/Decapite.java index 6541b09..2657053 100644 --- a/BUT1/CONTROLE/DEV2.1/Entrainement/SUJETB/EXO1/Decapite.java +++ b/BUT1/CONTROLE/DEV2.1/Entrainement/SUJETB/EXO1/Decapite.java @@ -16,11 +16,6 @@ public class Decapite{ String isHeadlessString = this.isHeadless ? "oui" : "non"; String isHeadlessInstanceString = this.isHeadlessInstance ? "oui" : "non"; - return "isHeadless dit : " + isHeadlessString + "\nisHeadlessInstance dit :" + isHeadlessInstanceString; + return "isHeadless dit : " + isHeadlessString + "\nisHeadlessInstance dit : " + isHeadlessInstanceString; } - - public static void main(String[] args){ - Decapite test = new Decapite(); - test.toString(); - } } \ No newline at end of file diff --git a/BUT1/CONTROLE/DEV2.1/Entrainement/SUJETB/EXO1/Test.java b/BUT1/CONTROLE/DEV2.1/Entrainement/SUJETB/EXO1/Test.java new file mode 100644 index 0000000..f67443a --- /dev/null +++ b/BUT1/CONTROLE/DEV2.1/Entrainement/SUJETB/EXO1/Test.java @@ -0,0 +1,6 @@ +public class Test{ + public static void main(String[] args){ + Decapite test = new Decapite(); + System.out.println(test.toString()); + } +} \ No newline at end of file diff --git a/BUT1/CONTROLE/DEV2.1/Entrainement/SUJETB/EXO2/Deduction.class b/BUT1/CONTROLE/DEV2.1/Entrainement/SUJETB/EXO2/Deduction.class new file mode 100644 index 0000000000000000000000000000000000000000..0a95e8a6b3b46d67ccd74ea7ff289e8111e6d52e GIT binary patch literal 1087 zcmaJ=&rcIU7=6>0Zo4cL3JQqAilA*(s#h^4SVP=|ABPf*@#1tlfu-A-W_L=$f8yC2 zi3d$2CLFwQ^N%uqvu(<%=wW8QneV-C-n{+x$IpxJ0540O^# z$>7RTbz6~WM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Ff9B(m#_jDnApdtPnWB7-T z@F$#Mahzp?bcD}gf@P6n3v?)#G0BQ_9JesVenXCx=^$FTKv937IKe#NJk5uklUNf4 X>Ta>nl`HRCV3velB;!rOeYo{6)jB_< literal 0 HcmV?d00001 diff --git a/BUT1/CONTROLE/DEV2.1/Entrainement/SUJETB/EXO3/Direction.java b/BUT1/CONTROLE/DEV2.1/Entrainement/SUJETB/EXO3/Direction.java new file mode 100644 index 0000000..634164f --- /dev/null +++ b/BUT1/CONTROLE/DEV2.1/Entrainement/SUJETB/EXO3/Direction.java @@ -0,0 +1,55 @@ +import javax.swing.*; +import java.awt.*; + +public class Direction { + + public Direction() { + JFrame fenetre = new JFrame("Boutons aux Coins"); + fenetre.setSize(400, 400); + fenetre.setMinimumSize(new Dimension(150,150)); + fenetre.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + + JPanel panneau = new JPanel(new BorderLayout()); + + JButton hautGauche = new JButton("◤"); + JButton hautDroit = new JButton("◥"); + JButton basGauche = new JButton("◣"); + JButton basDroit = new JButton("◢"); + + hautGauche.setPreferredSize(new Dimension(50, 50)); + hautDroit.setPreferredSize(new Dimension(50, 50)); + basGauche.setPreferredSize(new Dimension(50, 50)); + basDroit.setPreferredSize(new Dimension(50, 50)); + + JPanel panneauHautGauche = new JPanel(new FlowLayout(FlowLayout.LEFT)); + panneauHautGauche.add(hautGauche); + + JPanel panneauHautDroit = new JPanel(new FlowLayout(FlowLayout.RIGHT)); + panneauHautDroit.add(hautDroit); + + JPanel panneauHaut = new JPanel(new BorderLayout()); + panneauHaut.add(panneauHautGauche, BorderLayout.WEST); + panneauHaut.add(panneauHautDroit, BorderLayout.EAST); + + JPanel panneauBasGauche = new JPanel(new FlowLayout(FlowLayout.LEFT)); + panneauBasGauche.add(basGauche); + + JPanel panneauBasDroit = new JPanel(new FlowLayout(FlowLayout.RIGHT)); + panneauBasDroit.add(basDroit); + + JPanel panneauBas = new JPanel(new BorderLayout()); + panneauBas.add(panneauBasGauche, BorderLayout.WEST); + panneauBas.add(panneauBasDroit, BorderLayout.EAST); + + panneau.add(panneauHaut, BorderLayout.NORTH); + panneau.add(panneauBas, BorderLayout.SOUTH); + + fenetre.add(panneau); + fenetre.setVisible(true); + } + + public static void main(String[] args) { + Direction test = new Direction(); + }; + } + diff --git a/BUT1/DEV2.1/TP5-Heritage/EXO4/Nuancier.class b/BUT1/DEV2.1/TP5-Heritage/EXO4/Nuancier.class index 56d97b1af29aa39add8383ff4e521759c2947166..ceaf340a121ae5f5af8dad2eca2f04cb66643e73 100644 GIT binary patch delta 563 zcmZvYK~ED=6otRn&djsJSV^^3Do9ln+M!la3sPfZVBvzIu|`95Gn5ITmQGVgi7OK0 z&XwsuaAV?57gGZXaqa)`Ke!Tahs2oZ=G^n{J@1_R-aGS+w!i<{I{@x-`@Q{bH^pgk znllb#K{*%7flkCv1d0-`lR)j5DD*=P*e@ zk&ZRqPFPtA+CfiYZTQV#!&gkr9Nj;14#i@#R+QE=N&BN0y9->@OgUWQvf|`_A{Dwj zT%g^No&GkxzuxkjVXgSsMl<73q|_f*^SN1vGM2*Vdd=saQb*7lxE%Q zKJwPvzUG!>KK*ym{+=rA&XJH`Lr`I230{}egj6NfEDcbfg(z+a4#!}S;wDw$L+K}y zk`Al;=(S90z{rYgMWpx1tPMC-FRhjjsz$PEX3ebefqXe@&MjJB$c|ZGIlB{a{;jD# z9{zA=Bc`9Y5w2@QTp5NY;?NSda4mR@6M{KL|YiqW=y*0x%|qEshmSE&v~kdD!Y);AJ_)aoXU2hvj6g^|FcO7@r*c+VI4gJJv>^P~RK!G?E8ke*#c0$>Z$mMBb59v1cuC+UE z3E~Oy#tV-~ya5stFTjf&WX2@j`LKK$5{ypij%eBZpvjR(#$S zNu(IeD(|%V9WH&RB~mb8s;uJ-*+TswuT5chyHeaxhzS#EWEf5dLf#ag@P0>DJ6<5x zdcx<@@mvP2P>ZmWCSE|6!62;dd?pwYh1xK7%EW0EJ3+C!*9w;!IKwb`i0g7+O3yX$ z;-N|-MoFAwV5KB3(6o@mC7Q}fKOc5mnD6?wgLhPgWqgD+8rot$0+w z6ml@trmvcK4X;ysc)QIoH?m#T>-IcXxUw=_uQ(hy)#5iyyot9MQp9+}37oAC$*L9Z zsZLWzwW`-9$3)$6#cIF1CH!?BLAuGVj;aBh;oSd2>6S-z z;UX64ji5d;&;^4|V}+j1(#&X1%%Cv!o4hO;r^Ot6Ie**(v&(n7}yQw38%E2D7j*Pq7tbaTinAqzK0u z1enI>WPgG4_zD;BEunuP`zPe_Grb|+p=_6-J;yy52HrK)xE%h-o*@OFVfHV?*fYY% caWmxc9_<1oNz)qrZ(%KD#P9(=#5!{S0JCsn@&Et; literal 0 HcmV?d00001 diff --git a/BUT1/MiniProjet/Calculatrice/Calculatrice.java b/BUT1/MiniProjet/Calculatrice/Calculatrice.java new file mode 100644 index 0000000..9832dd5 --- /dev/null +++ b/BUT1/MiniProjet/Calculatrice/Calculatrice.java @@ -0,0 +1,38 @@ +import javax.swing.*; +import java.awt.*; + +public class Calculatrice{ + + + public static void main(String args[]){ + + // Création d'une fenêtre nommée "Calculatrice" + JFrame fenetre = new JFrame("Calculatrice"); + // Configuration de la fenêtre + fenetre.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + fenetre.setSize(400, 700); + fenetre.setLocation(100,100); + + // Initialisation des tableaux + JButton[] boutonsChiffre = new JButton[10]; + JButton[] boutonsOperations = new JButton[4]; + String[] logoOperations = {"+","-","/","*"}; + + GridLayout gestionnaire = new GridLayout(3, 5); + fenetre.setLayout(gestionnaire); + + // Ajout des chiffres + for(int i=0; i<=9; i++){ + boutonsChiffre[i] = new JButton(""+i); + fenetre.add(boutonsChiffre[i]); + } + + // Ajout des opérations + for(int i=0; i<4; i++){ + boutonsOperations[i] = new JButton(logoOperations[i]); + fenetre.add(boutonsOperations[i]); + } + + fenetre.setVisible(true); + } +} \ No newline at end of file diff --git a/BUT1/MiniProjet/Calculatrice/Operation.java b/BUT1/MiniProjet/Calculatrice/Operation.java new file mode 100644 index 0000000..429814d --- /dev/null +++ b/BUT1/MiniProjet/Calculatrice/Operation.java @@ -0,0 +1,29 @@ +public class Operation{ + // attributs + + // constructeur + + + // méthodes + + public double addition(double a, double b){ + return a+b; + } + + public double soustraction(double a, double b){ + return a-b; + } + + public double multiplication(double a, double b){ + return a*b; + } + + public double division(double a, double b){ + if(b != 0){ + return a/b; + }else{ + System.out.println("Erreur : la division par 0 est impossible"); + return Double.NaN; + } + } +} \ No newline at end of file