package controller;

/**
 * 
 * This is to be used before the formal GUI
 *
 */
public class Body {
	public static void main(String[] args) {
		Storage storage = new Storage(); 
		// get existing tasks from storage
    	Logic.listOfTasks = storage.load();
    	
        // get and execute new tasks
        while (true) {
        	String userInput = Logic.getUserInput();

        	if (userInput.equalsIgnoreCase("help")) {
        		System.out.println(Logic.help);
        	} else {
	        	// parse and execute command
	        	Parser parser = new Parser();
	        	UserInput userCommand = parser.parse(userInput);
	        	Logic.executeCommand(userCommand);
	
	        	// update the history and storage file
	        	storage.save(Logic.listOfTasks);
        	}

        }
	}
}

@@ -292,16 +292,50 @@
 w tasks%0A
+    %09// get and execute new tasks%0A
         
@@ -399,17 +399,16 @@
 nput();%0A
-%0A
         
@@ -412,49 +412,36 @@
    %09
-if (userInput.equalsIgnoreCase(%22help%22)) %7B
+// parse and execute command
 %0A   
@@ -446,17 +446,16 @@
        %09
-%09
 System.o
@@ -475,219 +475,44 @@
 gic.
-help);%0A        %09%7D else %7B%0A%09        %09// parse and execute command%0A%09        %09Parser parser = new Parser();%0A%09        %09UserInput userCommand = parser.parse(userInput);%0A%09        %09Logic.executeCommand(userCommand);%0A%09%0A%09
+readAndExecuteCommands(userInput));%0A
     
@@ -555,17 +555,16 @@
 ge file%0A
-%09
         
@@ -609,20 +609,17 @@
     
-%09%7D%0A%0A
+%7D
         
 %7D%0A%09%7D
@@ -614,15 +614,14 @@
         
-%7D
 %0A%09%7D%0A%7D%0A

Update the Body class as an entry for uClear (pre-UI).