diff --git a/BUT1/CONTROLE/DEV2.1/Entrainement/SUJETA/EXO2/Manie.java b/BUT1/CONTROLE/DEV2.1/Entrainement/SUJETA/EXO2/Manie.java new file mode 100644 index 0000000..edbe997 --- /dev/null +++ b/BUT1/CONTROLE/DEV2.1/Entrainement/SUJETA/EXO2/Manie.java @@ -0,0 +1,3 @@ +public class Manie{ + +} diff --git a/BUT1/CONTROLE/DEV2.1/Entrainement/SUJETA/EXO2/Sudoku/Menu.class b/BUT1/CONTROLE/DEV2.1/Entrainement/SUJETA/EXO2/Sudoku/Menu.class deleted file mode 100644 index 5cdb358..0000000 Binary files a/BUT1/CONTROLE/DEV2.1/Entrainement/SUJETA/EXO2/Sudoku/Menu.class and /dev/null differ diff --git a/BUT1/CONTROLE/DEV2.1/Entrainement/SUJETA/EXO2/Sudoku/Nuance.java b/BUT1/CONTROLE/DEV2.1/Entrainement/SUJETA/EXO2/Sudoku/Nuance.java deleted file mode 100644 index e6a0c6e..0000000 --- a/BUT1/CONTROLE/DEV2.1/Entrainement/SUJETA/EXO2/Sudoku/Nuance.java +++ /dev/null @@ -1,9 +0,0 @@ -import javax.swing.*; -import java.awt.*; - -public class Nuance { - private JPanel[] tableauPanneauNuance; - public Nuance(){ - } - -} \ No newline at end of file diff --git a/BUT1/CONTROLE/DEV2.1/Entrainement/SUJETA/EXO3/Menu.java b/BUT1/CONTROLE/DEV2.1/Entrainement/SUJETA/EXO3/Menu.java new file mode 100644 index 0000000..f5def1a --- /dev/null +++ b/BUT1/CONTROLE/DEV2.1/Entrainement/SUJETA/EXO3/Menu.java @@ -0,0 +1,33 @@ +import javax.swing.*; +import java.awt.*; + +public class Menu { + private JButton[] boutons; + + public Menu(String args[]) { + JFrame fenetre = new JFrame(); + fenetre.setSize(500,500); + fenetre.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + + this.boutons = new JButton[args.length]; + + JPanel panneau = new JPanel(); + panneau.setLayout(new GridLayout(args.length, 1)); + + int i = 0; + for (String element : args) { + this.boutons[i] = new JButton(element); + panneau.add(this.boutons[i]); + i++; + } + + fenetre.add(panneau); + + // Utiliser pack() pour ajuster la taille de la fenĂȘtre en fonction des composants + fenetre.setVisible(true); + } + + public static void main(String[] args) { + Menu test = new Menu(args); + } +} diff --git a/BUT1/CONTROLE/DEV2.1/Entrainement/SUJETA/EXO3/MenuApp.class b/BUT1/CONTROLE/DEV2.1/Entrainement/SUJETA/EXO3/MenuApp.class new file mode 100644 index 0000000..7733cab Binary files /dev/null and b/BUT1/CONTROLE/DEV2.1/Entrainement/SUJETA/EXO3/MenuApp.class differ diff --git a/BUT1/CONTROLE/DEV2.1/Entrainement/SUJETC/EXO1/EXO1.class b/BUT1/CONTROLE/DEV2.1/Entrainement/SUJETC/EXO1/EXO1.class new file mode 100644 index 0000000..9582ae4 Binary files /dev/null and b/BUT1/CONTROLE/DEV2.1/Entrainement/SUJETC/EXO1/EXO1.class differ diff --git a/BUT1/CONTROLE/DEV2.1/Entrainement/SUJETC/EXO1/EXO1.java b/BUT1/CONTROLE/DEV2.1/Entrainement/SUJETC/EXO1/EXO1.java new file mode 100644 index 0000000..346095d --- /dev/null +++ b/BUT1/CONTROLE/DEV2.1/Entrainement/SUJETC/EXO1/EXO1.java @@ -0,0 +1,23 @@ +import java.lang.Math; +import java.util.Random; + +public class EXO1{ + private double valeur1; + private Random random; + private double valeur2; + + public EXO1(){ + valeur1 = Math.random(); + this.random = new Random(); + valeur2 = random.nextDouble(); + } + + public String toString(){ + return ""+valeur1+"\n"+valeur2; + } + + public static void main(String[] args){ + EXO1 test = new EXO1(); + System.out.println(test.toString()); + } +} \ No newline at end of file