package seedu.address.model.task;

import seedu.address.commons.util.CollectionUtil;
import seedu.address.model.tag.UniqueTagList;

import java.util.Objects;

/**
 * Represents a Task in the task book.
 * Guarantees: details are present and not null, field values are validated.
 */
public class Task implements ReadOnlyTask {

    private Name name;
    private Description description;
    private Date date;
    private Time time;

    private UniqueTagList tags;

    /**
     * Every field must be present and not null.
     */
    public Task(Name name, Description description, Date date, Time time, UniqueTagList tags) {
        assert !CollectionUtil.isAnyNull(name, description, date, time, tags);
        this.name = name;
        this.description = description;
        this.date = date;
        this.time = time;
        this.tags = new UniqueTagList(tags); // protect internal tags from changes in the arg list
    }

    /**
     * Copy constructor.
     */
    public Task(ReadOnlyTask source) {
        this(source.getName(), source.getDescription(), source.getDate(), source.getTime(), source.getTags());
    }

    @Override
    public Name getName() {
        return name;
    }

    @Override
    public Description getDescription() {
        return description;
    }

    @Override
    public Date getDate() {
        return date;
    }

    @Override
    public Time getTime() {
        return time;
    }

    @Override
    public UniqueTagList getTags() {
        return new UniqueTagList(tags);
    }

    /**
     * Replaces this person's tags with the tags in the argument tag list.
     */
    public void setTags(UniqueTagList replacement) {
        tags.setTags(replacement);
    }

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

    @Override
    public int hashCode() {
        // use this method for custom fields hashing instead of implementing your own
        return Objects.hash(name, description, date, time, tags);
    }

    @Override
    public String toString() {
        return getAsText();
    }

}

@@ -53,130 +53,52 @@
 ess.
-commons.util.CollectionUtil;%0Aimport seedu.address.model.tag.UniqueTagList;%0A%0Aimport java.util.Objects;%0A%0A/**%0A * Represents a
+model.tag.UniqueTagList;%0A%0A/**%0A * An abstract
  Tas
@@ -205,16 +205,25 @@
 %0Apublic 
+abstract 
 class Ta
@@ -255,1208 +255,173 @@
 k %7B%0A
-%0A
     
-private Name name;%0A    private Description description;%0A    private Date date;%0A    private Time time;%0A%0A    private UniqueTagList tags;%0A%0A    /**%0A     * Every field must be present and not null.%0A     */%0A    public Task(Name name, Description description, Date date, Time time, UniqueTagList tags) %7B%0A        assert !CollectionUtil.isAnyNull(name, description, date, time, tags);%0A        this.name = name;%0A        this.description = description;%0A        this.date = date;%0A        this.time = time;%0A        this.tags = new UniqueTagList(tags); // protect internal tags from changes in the arg list%0A    %7D%0A%0A    /**%0A     * Copy constructor.%0A     */%0A    public Task(ReadOnlyTask source) %7B%0A        this(source.getName(), source.getDescription(), source.getDate(), source.getTime(), source.getTags());%0A    %7D%0A%0A    @Override%0A    public Name getName() %7B%0A        return name;%0A    %7D%0A%0A    @Override%0A    public Description getDescription() %7B%0A        return description;%0A    %7D%0A%0A    @Override%0A    public Date getDate() %7B%0A        return date;%0A    %7D%0A%0A    @Override%0A    public Time getTime() %7B%0A        return time;%0A    %7D%0A%0A    @Override%0A    public UniqueTagList getTags() %7B%0A        return new UniqueTagList(tags);%0A    %7D
+%0A    public abstract Name getName();%0A%0A    @Override%0A    public abstract Description getDescription();%0A%0A    @Override%0A    public abstract UniqueTagList getTags();
 %0A%0A  
@@ -520,16 +520,25 @@
  public 
+abstract 
 void set
@@ -572,51 +572,9 @@
 ent)
- %7B%0A        tags.setTags(replacement)
 ;
-%0A    %7D
 %0A%0A  
@@ -596,16 +596,25 @@
  public 
+abstract 
 boolean 
@@ -637,419 +637,119 @@
 her)
- %7B%0A        return other == this // short circuit if same object%0A                %7C%7C (other instanceof ReadOnlyTask // instanceof handles nulls%0A                && this.isSameStateAs((ReadOnlyTask) other));%0A    %7D%0A%0A    @Override%0A    public int hashCode() %7B%0A        // use this method for custom fields hashing instead of implementing your own%0A        return Objects.hash(name, description, date, time, tags
+;%0A%0A    @Override%0A    public abstract int hashCode();%0A%0A    @Override%0A    public abstract String toString(
 );%0A    
-%7D%0A
 %0A   
@@ -774,42 +774,23 @@
 lic 
-String toString() %7B%0A        return
+abstract String
  get
@@ -803,13 +803,11 @@
 ();%0A    
-%7D%0A
 %0A%7D%0A

Add abstract Task class