diff --git a/TP5/td5/exo1td5.plantuml b/TP5/td5/exo1td5.plantuml new file mode 100644 index 0000000..200641a --- /dev/null +++ b/TP5/td5/exo1td5.plantuml @@ -0,0 +1,60 @@ +@startuml +title TD5 - Patron Décorateur (Exercice 1) : Diagramme de classes + +skinparam classAttributeIconSize 0 + +' ===== Interface ===== +interface Boisson { + +getCost() : double + +getIngredients() : String +} + +' ===== Boissons concrètes ===== +class Expresso { + +getCost() : double + +getIngredients() : String +} + +class The { + +getCost() : double + +getIngredients() : String +} + +Boisson <|.. Expresso +Boisson <|.. The + +' ===== Décorateur abstrait ===== +abstract class BoissonEtPlus { + -aDecorer : Boisson + +BoissonEtPlus(b : Boisson) + +getCost() : double + +getIngredients() : String +} + +Boisson <|.. BoissonEtPlus +BoissonEtPlus o-- "1" Boisson : aDecorer + +' ===== Décorateurs concrets ===== +class AvecLait { + +AvecLait(b : Boisson) + +getCost() : double + +getIngredients() : String +} + +class Double { + +Double(b : Boisson) + +getCost() : double + +getIngredients() : String +} + +class AvecGoutte { + +AvecGoutte(b : Boisson) + +getCost() : double + +getIngredients() : String +} + +BoissonEtPlus <|-- AvecLait +BoissonEtPlus <|-- Double +BoissonEtPlus <|-- AvecGoutte + +@enduml diff --git a/TP5/td5/exo1td5.png b/TP5/td5/exo1td5.png new file mode 100644 index 0000000..ee1c0e8 Binary files /dev/null and b/TP5/td5/exo1td5.png differ diff --git a/TP5/td5/plantuml.jar b/TP5/td5/plantuml.jar new file mode 100644 index 0000000..52e0cfe Binary files /dev/null and b/TP5/td5/plantuml.jar differ