OOP examples and design patterns