package seedu.taskitty.commons.util;

import seedu.taskitty.model.task.Task;

public class TaskUtil {
    
    /**
     * Returns the specified index in the {@code command} IF a valid category character was given.
     *   else return the default index
     */
    public static int getCategoryIndex(String command) {
        switch(command) {
        
            case(Task.TODO_CATEGORY_CHAR) :
                return Task.TODO_CATEGORY_INDEX;
            
            case(Task.DEADLINE_CATEGORY_CHAR): 
                return Task.DEADLINE_CATEGORY_INDEX;
            
            case(Task.EVENT_CATEGORY_CHAR): 
                return Task.EVENT_CATEGORY_INDEX;
            
            default: 
                return 0;
            
        }
    }
    
}

@@ -71,16 +71,67 @@
 .Task;%0A%0A
+/**%0A * Helper functions for handling tasks.%0A *%0A */%0A
 public c
@@ -774,9 +774,35 @@
 urn 
-0
+Task.DEFAULT_CATEGORY_INDEX
 ;%0A  

Add header comments in TaskUtil