package seedu.taskell.model.task;

import java.util.Objects;

import seedu.taskell.model.task.Description;
import seedu.taskell.commons.exceptions.IllegalValueException;
import seedu.taskell.commons.util.CollectionUtil;
import seedu.taskell.model.tag.UniqueTagList;

//@@author A0139257X
/**
 * Represents a Floating Task in the task manager.
 * Guarantees: details are present and not null, field values are validated.
 */
public class FloatingTask extends Task {
    
    public static final String RECURRING_TYPE_NOT_ALLOWED = "Floating task cannot be recurring";
    public static final String EDIT_FLOATING_NOT_ALLOWED = "Floating task does not have date and time.";
    
    public FloatingTask(String description, String taskPriority, String recurringType, 
            String taskStatus, UniqueTagList tags) throws IllegalValueException {
        
        this(new Description(description),
                FLOATING_TASK,
                new TaskDate(TaskDate.DEFAULT_DATE),
                new TaskDate(TaskDate.DEFAULT_DATE),
                new TaskTime(TaskTime.DEFAULT_START_TIME),
                new TaskTime(TaskTime.DEFAULT_END_TIME),
                new TaskPriority(taskPriority),
                new RecurringType(recurringType),
                new TaskStatus(taskStatus),
                tags);
    }
    
    public FloatingTask(Description description, String taskType, TaskDate startDate, 
            TaskDate endDate, TaskTime startTime, TaskTime endTime, TaskPriority taskPriority, 
            RecurringType recurringType, TaskStatus taskStatus, UniqueTagList tags) {
        
        super(description, taskType, startDate, endDate, startTime, endTime, 
                taskPriority, recurringType, taskStatus, tags);
    }

    @Override
    public boolean equals(Object other) {
        return other == this // short circuit if same object
                || (other instanceof ReadOnlyTask // instanceof handles nulls
                && this.isSameStateAs((ReadOnlyTask) other));
    }

}

@@ -213,16 +213,70 @@
 onUtil;%0A
+import seedu.taskell.logic.commands.IncorrectCommand;%0A
 import s
@@ -720,24 +720,29 @@
 ime.%22;%0A    %0A
+    %0A
     public F
@@ -763,95 +763,62 @@
 ring
- description, String taskPriority, String recurringType, %0A            String taskStatus
+%5B%5D taskComponentArray, boolean%5B%5D hasTaskComponentArray
 , Un
@@ -866,24 +866,16 @@
 ption %7B%0A
-        
 %0A       
@@ -896,27 +896,47 @@
 ription(
-description
+taskComponentArray%5BDESCRIPTION%5D
 ),%0A     
@@ -1220,24 +1220,45 @@
 ity(task
-Priority
+ComponentArray%5BTASK_PRIORITY%5D
 ),%0A     
@@ -1286,29 +1286,50 @@
 ingType(
-recurringType
+taskComponentArray%5BRECURRING_TYPE%5D
 ),%0A     
@@ -1354,17 +1354,17 @@
 kStatus(
-t
+T
 askStatu
@@ -1364,16 +1364,27 @@
 skStatus
+.INCOMPLETE
 ),%0A     
@@ -1397,24 +1397,192 @@
      tags);%0A
+        %0A        if (hasTaskComponentArray%5BTask.RECURRING_COMPONENT%5D) %7B%0A            throw new IllegalValueException(FloatingTask.RECURRING_TYPE_NOT_ALLOWED);%0A        %7D%0A
     %7D%0A    %0A 
@@ -1885,25 +1885,47 @@
 iption, 
-taskType,
+FLOATING_TASK, %0A               
  startDa
@@ -1937,16 +1937,33 @@
 ndDate, 
+%0A                
 startTim
@@ -2020,16 +2020,33 @@
 ngType, 
+%0A                
 taskStat

Refactor floating task