@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