TP2: Factor out common code in the abstract class.
[TP_POO.git] / TP2 / Cercle.java
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 }