exo 4 tp 03
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
@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>>
|
||||
}
|
||||
Reference in New Issue
Block a user