Skip to content

Latest commit

 

History

History
67 lines (55 loc) · 856 Bytes

File metadata and controls

67 lines (55 loc) · 856 Bytes

Starbucks order system

classDiagram

class Beverage {
    <<abstract>>
    +description
    +getDescription()
    +cost()
}

class CondimentDecorator {
    <<abstract>>
    +getDescription()
}

class HouseBlend {
    +cost()
}

class DarkRoast {
    +cost()
}

class Espresso {
    +cost()
}

class Decaf {
    +cost()
}
Beverage <|-- HouseBlend
Beverage <|-- DarkRoast
Beverage <|-- Espresso
Beverage <|-- Decaf
Beverage <-- CondimentDecorator : component

class Milk {
    +Beverage b
    +cost()
    +getDescription()
}

class Mocha {
    +Beverage b
    +cost()
    +getDescription()
}

class Soy {
    +Beverage b
    +cost()
    +getDescription()
}

class Whip {
    +Beverage b
    +cost()
    +getDescription()
}

CondimentDecorator <|-- Milk
CondimentDecorator <|-- Mocha
CondimentDecorator <|-- Soy
CondimentDecorator <|-- Whip
Loading