Java · Inheritance, polymorphism and interfaces
A drawing program holds rectangles and circles side by side, and one loop has to measure them all.