Example code for design patterns.