Demonstrate how to implement design patterns in swift