Applying the Composite and Visitor patterns to build an Odometer