package seedu.address.logic.commands;

import java.util.HashSet;
import java.util.Set;

import seedu.address.commons.exceptions.IllegalValueException;
import seedu.address.logic.commands.exceptions.CommandException;
import seedu.address.model.person.Address;
import seedu.address.model.person.Email;
import seedu.address.model.person.Name;
import seedu.address.model.person.Person;
import seedu.address.model.person.Phone;
import seedu.address.model.person.UniquePersonList;
import seedu.address.model.tag.Tag;
import seedu.address.model.tag.UniqueTagList;

/**
 * Adds a person to the address book.
 */
public class AddCommand extends Command {

    public static final String COMMAND_WORD = "add";

    public static final String MESSAGE_USAGE = COMMAND_WORD + ": Adds a person to the address book. "
            + "Parameters: NAME p/PHONE e/EMAIL a/ADDRESS  [t/TAG]...\n"
            + "Example: " + COMMAND_WORD
            + " John Doe p/98765432 e/johnd@gmail.com a/311, Clementi Ave 2, #02-25 t/friends t/owesMoney";

    public static final String MESSAGE_SUCCESS = "New person added: %1$s";
    public static final String MESSAGE_DUPLICATE_PERSON = "This person already exists in the address book";

    private final Person toAdd;

    /**
     * Creates an AddCommand using raw values.
     *
     * @throws IllegalValueException if any of the raw values are invalid
     */
    public AddCommand(String name, String phone, String email, String address, Set<String> tags)
            throws IllegalValueException {
        final Set<Tag> tagSet = new HashSet<>();
        for (String tagName : tags) {
            tagSet.add(new Tag(tagName));
        }
        this.toAdd = new Person(
                new Name(name),
                new Phone(phone),
                new Email(email),
                new Address(address),
                new UniqueTagList(tagSet)
        );
    }

    @Override
    public CommandResult execute() throws CommandException {
        assert model != null;
        try {
            model.addPerson(toAdd);
            return new CommandResult(String.format(MESSAGE_SUCCESS, toAdd));
        } catch (UniquePersonList.DuplicatePersonException e) {
            throw new CommandException(MESSAGE_DUPLICATE_PERSON);
        }

    }

}

@@ -240,22 +240,21 @@
 del.
-person.Address
+task.Deadline
 ;%0Aim
@@ -282,20 +282,24 @@
 del.
-person.Email
+task.Description
 ;%0Aim
@@ -323,22 +323,20 @@
 s.model.
-person
+task
 .Name;%0Ai
@@ -365,21 +365,33 @@
 del.
-person.Person
+task.IdentificationNumber
 ;%0Aim
@@ -419,20 +419,17 @@
 del.
-person.Phone
+task.Task
 ;%0Aim
@@ -457,27 +457,17 @@
 del.
-person.UniquePerson
+task.Task
 List
@@ -557,38 +557,36 @@
 %0A%0A/**%0A * Adds a 
-person
+task
  to the address 
@@ -768,22 +768,20 @@
 s a 
-person
+task
  to the 
 addr
@@ -776,28 +776,28 @@
  to the 
-address book
+task manager
 . %22%0A    
@@ -828,34 +828,59 @@
 AME 
-p/PHONE e/EMAIL a/ADDRESS 
+dl/DEADLINE ds/DESCRIPTION id/IDENTIFICATION NUMBER
  %5Bt/
@@ -886,16 +886,17 @@
 /TAG%5D...
+.
 %5Cn%22%0A    
@@ -961,88 +961,58 @@
 Doe 
-p/98765432 e/johnd@gmail.com a/311, Clementi Ave 2, #02-25 t/friends t/owesMoney
+dl/11/01/2017 ds/buy eggs id/311 t/lunch t/no eggs
 %22;%0A%0A
@@ -1065,22 +1065,20 @@
  = %22New 
-person
+task
  added: 
@@ -1152,14 +1152,12 @@
 his 
-person
+task
  alr
@@ -1209,22 +1209,20 @@
 e final 
-Person
+Task
  toAdd;%0A
@@ -1408,19 +1408,22 @@
  String 
-pho
+deadli
 ne, Stri
@@ -1425,21 +1425,27 @@
  String 
-email
+description
 , String
@@ -1445,23 +1445,18 @@
  String 
-address
+id
 , Set%3CSt
@@ -1674,22 +1674,20 @@
 d = new 
-Person
+Task
 (%0A      
@@ -1736,17 +1736,23 @@
 new 
-Phone(pho
+Deadline(deadli
 ne),
@@ -1776,57 +1776,77 @@
 new 
-Email(email),%0A                new Address(address
+Description(description),%0A                new IdentificationNumber(id
 ),%0A 
@@ -2013,26 +2013,8 @@
 ll;%0A
-        try %7B%0A    
     
@@ -2026,22 +2026,20 @@
 odel.add
-Person
+Task
 (toAdd);
@@ -2039,20 +2039,16 @@
 toAdd);%0A
-    
         
@@ -2115,148 +2115,8 @@
 d));
-%0A        %7D catch (UniquePersonList.DuplicatePersonException e) %7B%0A            throw new CommandException(MESSAGE_DUPLICATE_PERSON);%0A        %7D
 %0A%0A  

Modify AddCommand class