TP2: Finally make all Affichable implemented classes uniform.
[TP_POO.git] / TP2 / Entiers.java
index b4cffb15f6f90406be47212e9f9dede7a02f1e66..80fcc9016434b0b5ec16c3f946c1999e37097fa3 100644 (file)
@@ -60,7 +60,7 @@ class Entiers extends Structure {
 
     private int binarySearch(int first, int last, int value) {
         if (last < first)
-            //FIXME: should not return an integer 
+            //FIXME: should not return an integer
             return -1;
         int middle = (first + last) / 2;
         if (value == int_array[middle])
@@ -98,7 +98,8 @@ class Entiers extends Structure {
     }
 
     public void afficher() {
-        System.out.println("---- entiers ----");
+        String className = this.getClass().getSimpleName();
+        System.out.println("---- " + className + " ----");
         for (int i = 0; i < getCurrentSize(); i++) {
             System.out.println("element " + i + " : " + int_array[i]);
         }