Merged Code for Design Patterns final