Extract method printNumbers to class NumberPrinter