public void executeCommand(CommandType userCommand) throws IOException,
			ParseException {
		CommandTypesEnum commandType = determineCommandType(userCommand);

		switch (commandType) {
		case ADD:
			AddCommandType addUserCommand = (AddCommandType) userCommand;
			add(addUserCommand.getDescription(), addUserCommand.getDateFrom(),
					addUserCommand.getDateTo(), addUserCommand.getProjectName());
			break;

		case DISPLAY:
			DisplayCommandType displayUserCommand = (DisplayCommandType) userCommand;
			displayOverall(displayUserCommand.getModifiers());
			break;

		case DELETE:
			DeleteCommandType deleteUserCommand = (DeleteCommandType) userCommand;
			delete(deleteUserCommand.getTaskDescription(),
					deleteUserCommand.getProjectName());
			break;

		case SEARCH:
			SearchCommandType searchUserCommand = (SearchCommandType) userCommand;
			searchInProj(searchUserCommand.getTaskDescription(),
					searchUserCommand.getProjectName());
			break;

		case EDIT:
			EditCommandType editUserCommand = (EditCommandType) userCommand;
			edit(editUserCommand.getTaskDescription(),
					editUserCommand.getProjectName());
			break;

		case UNDO:
			undo();
			break;

		case REDO:
			redo();
			break;

		case RESET:
			reset();
			break;

		case COMPLETE:
			CompleteCommandType completeUserCommand = (CompleteCommandType) userCommand;
			checkCompleteTask(completeUserCommand.getTaskDescription());
			break;

		default:
			throw new Error(MESSAGE_ERROR_WRONG_CMDTYPE);
		}
	}