Design Patterns: A Comprehensive Tutorial