TP2: Finally make all Affichable implemented classes uniform.
[TP_POO.git] / TP2 / Segment.java
index 5fd0d735500ca44e6500358aafa525ef0ed85ad4..2ec075c659db70f7720fe77fa39b60c62f0ef98f 100644 (file)
@@ -26,4 +26,10 @@ class Segment extends Forme {
         pDest = pDest.additionner(p);
     }
 
+    public void afficher() {
+        String className = this.getClass().getSimpleName();
+        System.out.println("---- " + className + " ----");
+        System.out.println(super.getpOri().toString() + " " + pDest.toString());
+    }
+
 }