TP2: Finally make all Affichable implemented classes uniform.
[TP_POO.git] / TP2 / Cercle.java
CommitLineData
4871c009 1
bd443eec 2class Cercle extends Forme {
4871c009
JB
3 private double rayon;
4
5 Cercle(Point pO, double r) {
009c5b1e 6 super(pO);
4871c009
JB
7 rayon = r;
8 }
9
14d4fd0d
JB
10 public void dessiner(Piletransformations pile) {
11 String className = this.getClass().getSimpleName();
12 Point pTrans = pile.getCurrentTransformation();
009c5b1e
JB
13 Point pOriTrans = super.getpOri().additionner(pTrans);
14 System.out.println(className + " " + super.getpOri().toString() + "->" + pOriTrans.toString() + " " + rayon);
4871c009 15 }
14d4fd0d 16
54d3f5b3 17 public void afficher() {
c7c510eb
JB
18 String className = this.getClass().getSimpleName();
19 System.out.println("---- " + className + " ----");
54d3f5b3
JB
20 System.out.println(super.getpOri().toString() + " " + rayon);
21 }
22
4871c009 23}