From: Jérôme Benoit Date: Wed, 14 Feb 2018 11:24:17 +0000 (+0100) Subject: Add method to the Image class. X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=145c683db97f23b40efe07e071826591fd7cdbea;p=TP_POO.git Add method to the Image class. Signed-off-by: Jérôme Benoit --- diff --git a/TP2/Image.java b/TP2/Image.java index 807e11b..ac66870 100644 --- a/TP2/Image.java +++ b/TP2/Image.java @@ -38,7 +38,13 @@ class Image extends Forme { } public boolean ajouter(Forme forme) { - return false; + boolean rtVal = false; + if (!isFull()) { + formeCollection[formeNumber] = forme; + formeNumber = 0; + rtVal = true; + } + return rtVal; } }