repositories
/
TP_POO.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
TP2: Add code skeleton for the Compactable interface.
[TP_POO.git]
/
TP2
/
Liste.java
diff --git
a/TP2/Liste.java
b/TP2/Liste.java
index b31d0816218f2db6028c5edf8ff4ac14a5392852..4ead214c512edb513a900572095685bb34baa334 100644
(file)
--- a/
TP2/Liste.java
+++ b/
TP2/Liste.java
@@
-118,9
+118,10
@@
public class Liste extends Structure {
}
public void afficher() {
}
public void afficher() {
- System.out.println("---- liste ----");
+ String className = this.getClass().getSimpleName();
+ System.out.println("---- " + className + " ----");
if (isEmpty()) {
if (isEmpty()) {
-
System.out.println("Liste vide")
;
+
return
;
} else if (headNode.getNext() == null) {
System.out.println("element 0 : " + headNode.getData());
} else {
} else if (headNode.getNext() == null) {
System.out.println("element 0 : " + headNode.getData());
} else {
@@
-135,4
+136,8
@@
public class Liste extends Structure {
}
}
}
}
+ public void compacter(int nElements) {
+
+ }
+
}
}