Sample code describing various design patterns