"""Open/Closed Principle Example inspired by this wonderful piece here: http://joelabrahamsson.com/a-simple-example-of-the-openclosed-principle/ """ # Area calculator: calculate area of a rectangle class Rectangle: def __init__(self, width, height): self.width = width self.height = height def area(self): return self.width * self.height # Calculate area of multiple rectangles class AreaCalculator: