TP2: add class annotations.
[TP_POO.git] / TP2 / Cercle.java
CommitLineData
4871c009 1
78c725c5
JB
2@ClassPreamble (
3 author = "Jérôme Benoit",
4 date = "01/03/2001"
5)
bd443eec 6class Cercle extends Forme {
4871c009
JB
7 private double rayon;
8
9 Cercle(Point pO, double r) {
009c5b1e 10 super(pO);
4871c009
JB
11 rayon = r;
12 }
13
14d4fd0d
JB
14 public void dessiner(Piletransformations pile) {
15 String className = this.getClass().getSimpleName();
16 Point pTrans = pile.getCurrentTransformation();
009c5b1e
JB
17 Point pOriTrans = super.getpOri().additionner(pTrans);
18 System.out.println(className + " " + super.getpOri().toString() + "->" + pOriTrans.toString() + " " + rayon);
4871c009 19 }
14d4fd0d 20
54d3f5b3 21 public void afficher() {
c7c510eb
JB
22 String className = this.getClass().getSimpleName();
23 System.out.println("---- " + className + " ----");
54d3f5b3
JB
24 System.out.println(super.getpOri().toString() + " " + rayon);
25 }
26
4871c009 27}