package taskDo;

import commandFactory.CommandAction;
import commandFactory.CommandFactory;
import commandFactory.CommandType;

public class Executor {
	public void execute() {
		CommandFactory commandFactory = new CommandFactory();
		CommandType commandType = ParsedResult.getCommandType();
		CommandAction commandAction = null;
		if (commandType.equals(CommandType.UNDO)) {
			// pop from stack commandAction = stack.pop();
			commandAction.undo();
		} else {
			commandAction = commandFactory.getCommandAction(commandType);
			commandAction.execute();
			// push commandAction into stack
		}
		commandAction.updateSummaryReport();
	}
}
@@ -145,16 +145,89 @@
 cutor %7B%0A
+%09public void Executor() %7B%0A//%09%09StorageList.getInstance().loadFile();%0A%09%7D%0A%09%0A
 %09public 
@@ -621,16 +621,55 @@
 cute();%0A
+//%09%09%09StorageList.getInstance().save();%0A
 %09%09%09// pu

add Executor constructor and save StorageList after every execution