package com.nilhcem.mowitnow;

import java.io.File;
import java.io.IOException;
import java.util.List;

import org.apache.commons.io.FileUtils;

/**
 * Starting point of the application.
 *
 * <p>
 * Opens file passed in args and calls the Mower interpreter.
 * </p>
 */
public final class App {

	public static void main(String[] args) throws IOException {
		List<String> instructions = App.getInstructionsFromArgFile(args);
	}

	private static List<String> getInstructionsFromArgFile(String[] args) throws IOException {
		if (args.length != 1) {
			throw new IllegalArgumentException("App is expecting one (and only one) parameter: the mower instructions file");
		}

		File instructions = new File(args[0]);
		return FileUtils.readLines(instructions, "UTF-8");
	}
}

@@ -138,16 +138,192 @@
 Utils;%0A%0A
+import com.nilhcem.mowitnow.core.Mower;%0Aimport com.nilhcem.mowitnow.core.instruction.MowerInstruction;%0Aimport com.nilhcem.mowitnow.core.instruction.parser.InstructionsParser;%0A%0A
 /**%0A * S
@@ -360,11 +360,8 @@
 on.%0A
- *%0A
  * %3C
@@ -463,16 +463,37 @@
  App %7B%0A%0A
+%09private App() %7B%0A%09%7D%0A%0A
 %09public 
@@ -613,16 +613,49 @@
 (args);%0A
+%09%09runInstructions(instructions);%0A
 %09%7D%0A%0A%09pri
@@ -931,16 +931,16 @@
 gs%5B0%5D);%0A
-
 %09%09return
@@ -986,11 +986,429 @@
 -8%22);%0A%09%7D
+%0A%0A%09private static void runInstructions(List%3CString%3E data) %7B%0A%09%09InstructionsParser parser = new InstructionsParser(data);%0A%0A%09%09Mower mower = parser.getNextMower();%0A%09%09while (mower != null) %7B%0A%09%09%09List%3CMowerInstruction%3E instrs = parser.getInstructionsForMower(mower);%0A%09%09%09for (MowerInstruction instr : instrs) %7B%0A%09%09%09%09mower.process(instr);%0A%09%09%09%7D%0A%09%09%09System.out.println(mower.getPosition());%0A%09%09%09mower = parser.getNextMower();%0A%09%09%7D%0A%09%7D
 %0A%7D%0A

Add main code (while calls core methods and displays result)