package seedu.task.model.task;

public class Duration {

}

@@ -29,31 +29,1715 @@
 k;%0A%0A
-public class Duration %7B
+import java.util.Calendar;%0Aimport java.util.Objects;%0A%0Aimport seedu.task.commons.exceptions.IllegalValueException;%0Aimport seedu.task.model.util.DateParser;%0A%0Apublic class Duration %7B%0A    Calendar start;%0A    Calendar end;%0A%0A    /**%0A     * Validates given duration.%0A     *%0A     * @throws IllegalValueException if given duration string is invalid.%0A     */%0A    public Duration(String start, String end) throws IllegalValueException %7B%0A        assert start != null && end != null;%0A        this.start = DateParser.parse(start);%0A        this.end = DateParser.parse(end);%0A    %7D%0A%0A    public Calendar getStart() %7B%0A        return this.start;%0A    %7D%0A%0A    public void setStart(String start) throws IllegalValueException %7B%0A        this.start = DateParser.parse(start);%0A    %7D%0A%0A    Calendar getEnd() %7B%0A        return this.start;%0A    %7D%0A%0A    void setEnd(String end) throws IllegalValueException %7B%0A        this.end = DateParser.parse(end);%0A    %7D%0A%0A    String getStartString() %7B%0A        return DateParser.toString(this.start);%0A    %7D%0A%0A    String getEndString() %7B%0A        return DateParser.toString(this.end);%0A    %7D%0A%0A    @Override%0A    public String toString() %7B%0A        return %22Start: %22 + DateParser.toString(this.start) + %22 End: %22 + DateParser.toString(this.end);%0A    %7D%0A%0A    @Override%0A    public boolean equals(Object other) %7B%0A        return other == this // short circuit if same object%0A                %7C%7C (other instanceof Duration // instanceof handles nulls%0A                && this.start.equals(((Duration) other).start) // state check%0A                && this.start.equals(((Duration) other).end)); // state check%0A    %7D%0A%0A    @Override%0A    public int hashCode() %7B%0A        return Objects.hash(start.hashCode(), end.hashCode());%0A    %7D
 %0A%0A%7D%0A

Implement the Duration class