package seedu.geekeep.model.task;

import java.util.Comparator;

public class TaskSortByType implements Comparator<ReadOnlyTask> {

    @Override
    public int compare(ReadOnlyTask thisTask, ReadOnlyTask otherTask) {
        if (thisTask.isEvent() && (otherTask.isDeadline() || otherTask.isFloatingTask())) {
            return -1;
        }
        if (thisTask.isFloatingTask() && otherTask.isDeadline()) {
            return -1;
        }
        if (thisTask.isDeadline() && (otherTask.isEvent() || otherTask.isFloatingTask())) {
            return 1;
        }
        return 0;
    }

}

@@ -428,32 +428,128 @@
 n -1;%0A        %7D%0A
+        if (thisTask.isFloatingTask() && otherTask.isEvent()) %7B%0A            return 1;%0A        %7D%0A
         if (this

Fix task comparator