From 145c683db97f23b40efe07e071826591fd7cdbea Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Wed, 14 Feb 2018 12:24:17 +0100 Subject: [PATCH] Add method to the Image class. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- TP2/Image.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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; } } -- 2.34.1