50 lines
1.1 KiB
Plaintext
50 lines
1.1 KiB
Plaintext
@startuml
|
|
title TP no 3 - Exercices 4 & 5
|
|
|
|
package "Exercice 4" {
|
|
abstract class SurfaceFinie {
|
|
+ getAire() : double
|
|
+ contient(p : Point) : boolean
|
|
}
|
|
|
|
interface PerimetreMesurable {
|
|
+ getPerimetre() : double
|
|
}
|
|
|
|
interface Approximable {
|
|
+ dessiner(epsilon : double) : String
|
|
}
|
|
|
|
interface DessinExact {
|
|
+ dessinerExact() : String
|
|
}
|
|
|
|
interface Deplacable {}
|
|
|
|
class Cercle extends SurfaceFinie implements PerimetreMesurable, Approximable, Deplacable {
|
|
- rayon : double
|
|
}
|
|
|
|
class Rectangle extends SurfaceFinie implements PerimetreMesurable, DessinExact, Deplacable {
|
|
- largeur : double
|
|
- hauteur : double
|
|
}
|
|
|
|
class Carre extends Rectangle {
|
|
}
|
|
|
|
class Fractale extends SurfaceFinie implements Approximable, Deplacable {
|
|
- typeFractale : String
|
|
}
|
|
|
|
class Point {
|
|
- x : double
|
|
- y : double
|
|
}
|
|
|
|
' dépendance explicite : Rectangle et Cercle utilisent Point dans "contient()"
|
|
Cercle ..> Point : <<uses>>
|
|
Rectangle ..> Point : <<uses>>
|
|
Fractale ..> Point : <<uses>>
|
|
}
|