printer example for visitor pattern