design pattern - 3. decorator pattern

Post on 16-Apr-2017

610 Views

Category:

Technology

11 Downloads

Preview:

Click to see full reader

TRANSCRIPT

PRESENTATION NAME

Decorator Pattern

Francesco Ierna

Decorator Pattern

1. Creo base

2. wrappo la base aggiungendo condimenti

3. il totale dato dal costo della base + i condimenti che sono stati aggiunti alla base

Oggetti:

Base + n condimenti aggiunti alla base

Decorator Pattern Problem

Solution

Solution Example

Decorator Code Example

Code Example

Code

top related