From dd88092569fd92ec27590fa412b467ba75a827a3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Thu, 5 Apr 2018 14:10:22 +0200 Subject: [PATCH] exo4: cleanup useless files. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- exo4/Main.java.bak0 | 151 -------------------------------------------- 1 file changed, 151 deletions(-) delete mode 100644 exo4/Main.java.bak0 diff --git a/exo4/Main.java.bak0 b/exo4/Main.java.bak0 deleted file mode 100644 index 229b639..0000000 --- a/exo4/Main.java.bak0 +++ /dev/null @@ -1,151 +0,0 @@ - -class Main { - - private static void main1() { - Point p1 = new Point(1, 2); - Point p2 = new Point(2, 7); - Segment segment = new Segment(p1, p2); - Point p3 = new Point(4, 5); - Cercle cercle = new Cercle(p3, 5.2); - Point p4 = new Point(2, 3); - Piletransformations trans = new Piletransformations(10); - - boolean rt = trans.empiler(p4); - if (!rt) { - System.out.println("Echec empilation"); - } - - segment.dessiner(trans); - cercle.dessiner(trans); - - Point p5 = new Point(3, 5); - segment.deplacer(p5); - cercle.deplacer(p5); - - Image image = new Image(); - image.ajouter(segment); - image.ajouter(cercle); - image.dessiner(trans); - image.deplacer(p5); - image.dessiner(trans); - - trans.depiler(); - } - - private static void main2() { - Point p1 = new Point(1, 2); - Point p2 = new Point(2, 7); - Segment segment1 = new Segment(p1, p2); - Point p3 = new Point(1, 5); - Point p4 = new Point(3, 1); - Segment segment2 = new Segment(p3, p4); - Point p5 = new Point(4, 5); - Cercle cercle1 = new Cercle(p5, 5.2); - Point p6 = new Point(5, 4); - Cercle cercle2 = new Cercle(p6, 4.3); - Point point1 = new Point(8, -1.5); - Image image1 = new Image(); - Image image2 = new Image(); - Image image3 = new Image(); - Piletransformations transformations = new Piletransformations(10); - - transformations.empiler(point1); - image1.ajouter(segment1); - image1.ajouter(cercle1); - image2.ajouter(segment2); - image2.ajouter(cercle2); - image1.dessiner(transformations); - image2.dessiner(transformations); - Point point2 = new Point(0.5, 2.5); - image1.deplacer(point2); - image3.ajouter(image1); - image3.ajouter(image2); - image3.dessiner(transformations); - transformations.depiler(); - } - - public static void main3() { - - Affichable[] affichable = new Affichable[10]; - - Point p1 = new Point(1, 2); - Point p2 = new Point(2, 7); - Point p3 = new Point(1, 5); - - Entiers entiers = new Entiers(5); - entiers.inserer(3); - entiers.inserer(1); - entiers.inserer(5); - - Liste liste = new Liste(); - liste.inserer(3); - liste.inserer(1); - liste.inserer(5); - - for (int i = 0; i < 10; i++) { - affichable[i] = entiers; - affichable[i].afficher(); - - affichable[i] = liste; - affichable[i].afficher(); - - affichable[i] = new Segment(p1, p2); - affichable[i].afficher(); - - affichable[i] = new Cercle(p3, 5.5); - affichable[i].afficher(); - } - - } - - public static void main4() { - - Compactable[] compactable = new Compactable[10]; - - Point p1 = new Point(1, 2); - Point p2 = new Point(2, 7); - Point p3 = new Point(1, 5); - Point p4 = new Point(3, 1); - - Segment segment1 = new Segment(p1, p2); - Segment segment2 = new Segment(p3, p4); - Cercle cercle = new Cercle(p3, 5.5); - Image image = new Image(); - image.ajouter(segment1); - image.ajouter(segment2); - image.ajouter(cercle); - - Entiers entiers = new Entiers(5); - entiers.inserer(3); - entiers.inserer(1); - entiers.inserer(4); - - Liste liste = new Liste(); - liste.inserer(3); - liste.inserer(1); - liste.inserer(5); - liste.inserer(4); - - compactable[0] = entiers; - entiers.afficher(); - compactable[0].compacter(1); - entiers.afficher(); - - compactable[1] = liste; - liste.afficher(); - compactable[1].compacter(1); - liste.afficher(); - - compactable[2] = image; - image.afficher(); - compactable[2].compacter(1); - image.afficher(); - } - - public static void main(String[] args) { - - main4(); - - } - -} -- 2.34.1