From: Jérôme Benoit Date: Wed, 14 Feb 2018 10:54:22 +0000 (+0100) Subject: Add the abstract class Forme that Cercle and Segment extend. X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=bd443eec8f09abab2d4ca1ceeb28268dd11854a2;p=TP_POO.git Add the abstract class Forme that Cercle and Segment extend. Signed-off-by: Jérôme Benoit --- diff --git a/TP2/Cercle.java b/TP2/Cercle.java index fe17b44..f13be69 100644 --- a/TP2/Cercle.java +++ b/TP2/Cercle.java @@ -1,5 +1,5 @@ -class Cercle { +class Cercle extends Forme { private Point pOri; private double rayon; diff --git a/TP2/Forme.java b/TP2/Forme.java new file mode 100644 index 0000000..df9fc44 --- /dev/null +++ b/TP2/Forme.java @@ -0,0 +1,7 @@ + +abstract class Forme { + + abstract public void dessiner(Piletransformations pile); + abstract public void deplacer(Point p); + +} diff --git a/TP2/Makefile b/TP2/Makefile index 40b372f..14f1b59 100644 --- a/TP2/Makefile +++ b/TP2/Makefile @@ -47,6 +47,7 @@ JVM = java CLASSES = \ Point.java \ + Forme.java \ Segment.java \ Cercle.java \ Piletransformations.java \ diff --git a/TP2/Segment.java b/TP2/Segment.java index e169172..25dc5e4 100644 --- a/TP2/Segment.java +++ b/TP2/Segment.java @@ -1,5 +1,5 @@ -class Segment { +class Segment extends Forme { private Point pOri; private Point pDest;