public void handle() { int startIndex = input.readInt(); int endIndex = input.readInt(); IntervalRole interval = intervalFactory.build(startIndex, endIndex); array.mirrorInterval(interval); }
public void handle() { int index = input.readInt(); int value = array.getValueAt(index); output.print(value); }
public void runCommands() { while (input.hasMoreData()) { int commandCode = input.readInt(); HandlerRole commandHandler = dispatcher.get(commandCode); commandHandler.handle(); } }