From 78c725c5e287068ee24d4abb950de2ab9520d76a Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Thu, 5 Apr 2018 23:39:46 +0200 Subject: [PATCH] TP2: add class annotations. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- TP2/Cercle.java | 4 ++++ TP2/ClassPreamble.java | 13 +++++++++++++ TP2/Entiers.java | 5 ++++- TP2/Forme.java | 4 ++++ TP2/Image.java | 4 ++++ TP2/Liste.java | 5 ++++- TP2/Makefile | 1 + TP2/Piletransformations.java | 4 ++++ TP2/Point.java | 6 +++++- TP2/Segment.java | 4 ++++ TP2/Structure.java | 4 ++++ 11 files changed, 51 insertions(+), 3 deletions(-) create mode 100644 TP2/ClassPreamble.java diff --git a/TP2/Cercle.java b/TP2/Cercle.java index 68e6289..ba4e103 100644 --- a/TP2/Cercle.java +++ b/TP2/Cercle.java @@ -1,4 +1,8 @@ +@ClassPreamble ( + author = "Jérôme Benoit", + date = "01/03/2001" +) class Cercle extends Forme { private double rayon; diff --git a/TP2/ClassPreamble.java b/TP2/ClassPreamble.java new file mode 100644 index 0000000..523ea4f --- /dev/null +++ b/TP2/ClassPreamble.java @@ -0,0 +1,13 @@ +import java.lang.annotation.Documented; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; + +@Retention(RetentionPolicy.RUNTIME) +@Documented +public @interface ClassPreamble { + String author(); + String date(); + int currentRevision() default 1; + String lastModified() default "N/A"; + String lastModifiedBy() default "N/A"; +} diff --git a/TP2/Entiers.java b/TP2/Entiers.java index 602ec8f..b11f364 100644 --- a/TP2/Entiers.java +++ b/TP2/Entiers.java @@ -1,4 +1,8 @@ +@ClassPreamble ( + author = "Jérôme Benoit", + date = "05/03/2009" +) class Entiers extends Structure { private int int_array[]; private int array_size; @@ -112,5 +116,4 @@ class Entiers extends Structure { current_size = 0; } } - } diff --git a/TP2/Forme.java b/TP2/Forme.java index c90aa31..cdef6b5 100644 --- a/TP2/Forme.java +++ b/TP2/Forme.java @@ -1,4 +1,8 @@ +@ClassPreamble ( + author = "Jérôme Benoit", + date = "11/17/2008" +) public abstract class Forme implements Affichable { private Point pOri; diff --git a/TP2/Image.java b/TP2/Image.java index 65d0929..c2b0b84 100644 --- a/TP2/Image.java +++ b/TP2/Image.java @@ -1,5 +1,9 @@ import java.util.Comparator; +@ClassPreamble ( + author = "Jérôme Benoit", + date = "09/11/2009" +) public class Image extends Forme implements Compactable, Comparable, Comparator { diff --git a/TP2/Liste.java b/TP2/Liste.java index e042612..6928b00 100644 --- a/TP2/Liste.java +++ b/TP2/Liste.java @@ -1,5 +1,8 @@ - +@ClassPreamble ( + author = "Jérôme Benoit", + date = "05/12/2011" +) public class Liste extends Structure { private class IntNode { diff --git a/TP2/Makefile b/TP2/Makefile index d8fc6bd..849e82a 100644 --- a/TP2/Makefile +++ b/TP2/Makefile @@ -46,6 +46,7 @@ JVM = java # NAME = Camilo Juan CLASSES = \ + ClassPreamble.java \ Compactable.java \ Affichable.java \ Structure.java \ diff --git a/TP2/Piletransformations.java b/TP2/Piletransformations.java index 5e53ddd..2d7874c 100644 --- a/TP2/Piletransformations.java +++ b/TP2/Piletransformations.java @@ -1,4 +1,8 @@ +@ClassPreamble ( + author = "Jérôme Benoit", + date = "06/21/2009" +) class Piletransformations { private Point[] transformations; private int currentTransformation; diff --git a/TP2/Point.java b/TP2/Point.java index 5a591c6..89382d5 100644 --- a/TP2/Point.java +++ b/TP2/Point.java @@ -1,11 +1,15 @@ +@ClassPreamble ( + author = "Jérôme Benoit", + date = "11/02/2012" +) class Point { private double x; private double y; Point() { /* - * FIXME: init to (0,0)? + * FIXME?: init to (0,0) */ } diff --git a/TP2/Segment.java b/TP2/Segment.java index 2ec075c..4010120 100644 --- a/TP2/Segment.java +++ b/TP2/Segment.java @@ -1,4 +1,8 @@ +@ClassPreamble ( + author = "Jérôme Benoit", + date = "04/25/2014" +) class Segment extends Forme { private Point pDest; diff --git a/TP2/Structure.java b/TP2/Structure.java index 7c1ce9f..617eba2 100644 --- a/TP2/Structure.java +++ b/TP2/Structure.java @@ -1,4 +1,8 @@ +@ClassPreamble ( + author = "Jérôme Benoit", + date = "05/02/2009" +) public abstract class Structure implements Affichable, Compactable { public abstract boolean inserer(int value); -- 2.34.1