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