diff --git a/DEV2.1/TP2/Date.java b/DEV2.1/TP2/Date.java index 0d1792b..eb3682f 100644 --- a/DEV2.1/TP2/Date.java +++ b/DEV2.1/TP2/Date.java @@ -68,12 +68,5 @@ public class Date } } - - - public static void main(String[] args) - { - Date test = new Date(2023,12,30); - System.out.println(test.toString()); - System.out.println(test.lendemain()); - } } + diff --git a/DEV2.1/TP3/Feuille.java b/DEV2.1/TP3/Feuille.java new file mode 100644 index 0000000..c2c382f --- /dev/null +++ b/DEV2.1/TP3/Feuille.java @@ -0,0 +1,9 @@ +Public class Feuille extends Paper +{ + public Feuille() + { + super(); + super.setSize(0.797167,1.168568); + super.setImageableArea(0.06,0.06,0.75,1.09); + } +} \ No newline at end of file diff --git a/DEV2.1/TP3/gris.java b/DEV2.1/TP3/gris.java new file mode 100644 index 0000000..0808a78 --- /dev/null +++ b/DEV2.1/TP3/gris.java @@ -0,0 +1,34 @@ +Public class Gris extends Color +{ + private float gr; + + public Gris(gr) + { + super(gr,gr,gr); + } + getHeight() + { + + } + getWidth() + { + + } + getImageableHeight() + { + + } + getImageableWidht() + { + + } + getImageableX() + { + + } + getImageableY() + { + + } + +} diff --git a/DEV2.1/TP4/Chien.class b/DEV2.1/TP4/Chien.class new file mode 100644 index 0000000..c02fa6c Binary files /dev/null and b/DEV2.1/TP4/Chien.class differ diff --git a/DEV2.1/TP4/Chien.java b/DEV2.1/TP4/Chien.java new file mode 100644 index 0000000..df7905d --- /dev/null +++ b/DEV2.1/TP4/Chien.java @@ -0,0 +1,23 @@ +import javax.swing.*; +import java.awt.*; + +public class Chien { + public static void main(String[] args) { + + JFrame fenetre = new JFrame(); + FlowLayout main = new FlowLayout(FlowLayout.CENTER); + fenetre.setLayout(main); + fenetre.setSize(500, 500); + fenetre.setLocation(0, 0); + + JLabel question = new JLabel("Aimez-vous les chiens ?"); + question.setHorizontalAlignment(JLabel.CENTER); + fenetre.add(question, BorderLayout.CENTER); + fenetre.add(new JButton("Oui")); + fenetre.add(new JButton("Non")); + fenetre.add(new JButton("NSPP")); + + fenetre.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + fenetre.setVisible(true); + } +} \ No newline at end of file diff --git a/DEV2.1/TP4/Damier.class b/DEV2.1/TP4/Damier.class new file mode 100644 index 0000000..282fc50 Binary files /dev/null and b/DEV2.1/TP4/Damier.class differ diff --git a/DEV2.1/TP4/Damier.java b/DEV2.1/TP4/Damier.java new file mode 100644 index 0000000..77d14bf --- /dev/null +++ b/DEV2.1/TP4/Damier.java @@ -0,0 +1,34 @@ +import javax.swing.*; +import java.awt.*; + +public class Damier { + public static void main(String[] args) { + + int taille = Integer.parseInt(args[0]); + JFrame fenetre = new JFrame(); + fenetre.setSize(500, 500); + fenetre.setLocation(0, 0); + GridLayout main = new GridLayout(taille,taille); + fenetre.setLayout(main); + + for (int i = 0;i