Sample code for specific design patterns.