Sample code for various Design Patterns