| 1 | |
| 2 | |
| 3 | class Main { |
| 4 | |
| 5 | public static void main(String[] args) { |
| 6 | |
| 7 | Point p1 = new Point(1, 2); |
| 8 | Point p2 = new Point(2, 7); |
| 9 | Segment segment = new Segment(p1, p2); |
| 10 | Point p3 = new Point(4, 5); |
| 11 | Cercle cercle = new Cercle(p3, 5.2); |
| 12 | Point p4 = new Point(2, 3); |
| 13 | Piletransformations trans = new Piletransformations(10); |
| 14 | boolean rt = trans.empiler(p4); |
| 15 | |
| 16 | segment.dessiner(trans); |
| 17 | cercle.dessiner(trans); |
| 18 | |
| 19 | Image image = new Image(); |
| 20 | image.ajouter(segment); |
| 21 | image.ajouter(cercle); |
| 22 | image.dessiner(trans); |
| 23 | } |
| 24 | |
| 25 | } |