Commit | Line | Data |
---|---|---|
c05c2289 | 1 | |
2b29b63e JB |
2 | @ClassPreamble ( |
3 | author = "Jérôme Benoit", | |
4 | date = "01/03/2001" | |
5 | ) | |
c05c2289 JB |
6 | class Cercle extends Forme { |
7 | private double rayon; | |
8 | ||
9 | Cercle(Point pO, double r) { | |
10 | super(pO); | |
11 | rayon = r; | |
12 | } | |
13 | ||
14 | public void dessiner(Piletransformations pile) { | |
15 | String className = this.getClass().getSimpleName(); | |
16 | Point pTrans = pile.getCurrentTransformation(); | |
17 | Point pOriTrans = super.getpOri().additionner(pTrans); | |
18 | System.out.println(className + " " + super.getpOri().toString() + "->" + pOriTrans.toString() + " " + rayon); | |
19 | } | |
20 | ||
21 | public void afficher() { | |
22 | String className = this.getClass().getSimpleName(); | |
23 | System.out.println("---- " + className + " ----"); | |
24 | System.out.println(super.getpOri().toString() + " " + rayon); | |
25 | } | |
26 | ||
27 | } |