Design Patterns and Contracts