Project Mobilize

Mobilize is a organizing and planning desktop application used for teaching Software Engineering principles. The user interacts with it using a CLI, and it has a GUI created with JavaFX. It is written in Java, and has about 6 kLoC.

Code contributed: [Functional code][Test code]

External Behavior


Start of Extract [from: User Guide]

Adding new contacts : add

Whether you’ve just met a new colleague or reconnected with an old friend, adding new contacts to Mobilize is easy!

Format: add n/NAME p/PHONE e/EMAIL a/ADDRESS [b/BIRTHDAY] [t/TAG]…

Examples:

  • add n/John Doe p/92435671 e/john_d888@gmail.com a/ 207 Upper Street, Islington, LONDON, N1 1RL b/15-11-1986 t/friend t/roommate
    Creates a new contact and sets the name to John Doe, email address to john_d888@gmail.com, address to 207 Upper Street, Islington, LONDON, N1 1RL, birthday to 15-11-1996 and two tags to [friend] and [roommate].

Contacts are automatically sorted according to name.

Constraints:

Note the following constraints when trying to add new contacts:

  • All fields must be provided and not blank.

  • Duplicate contacts [where all parameters, except tags, are exactly the same] are not allowed.

  • NAME must only contain letters in upper or lower case.

  • PHONE must contain at least three numbers.

  • BIRTHDAY must be a eight-digit number in “dd-mm-yyyy” format.

  • Every TAG must be preceded by a tag prefix, t/.

  • Using multiple parameters after a single prefix will result in only the last parameter being added, if it is valid. e.g. if add n/John Doe n/Jane Doe is used, then the contact will be named Jane Doe.

End of Extract


Justification

Users may need to know the birthday of their friends and it is almost impossible to remember all of their friend’s birthday.

Hence, users can use the optional parameter to save the birthday of their friends. Since the parameter is optional, users can choose to use the birthday feature according to their own needs.

Implementation


Start of Extract [from: Developer Guide]

Add contact mechanism: birthday parameter

Addition of the birthday parameter is facilitated by the AddCommand class which inherited from the UndoableCommand class. It allows user to add the birthday of the contact by putting another parameter into the AddCommand.

Suppose the user has just executed the AddCommand using AddCommand using the following:

`add n/eryao p/96965340 e/lite0520@gmail.com a/blk 254, ang mo kio b/08-12-1995`

The AddCommandParser class will check for the validity of the parameter entered. Afterwards, the LogicManager invokes the method AddCommand, which creates a new person and update the storage.

If the birthday parameter is not specified, the AddCommand will give an invalid command message.

End of Extract


Enhancement Added: Deletetask

External Behavior


Start of Extract [from: User Guide]

Deleting tasks : delete

Due to our fast changing lives, if your task was cancelled suddenly and you would like to delete the task from your task manager, the delete function is here to save your day!

Format: delete INDEX

Constraints

Note the following constraints when deleting a task:

  • Deletes the task at the specified INDEX.

  • INDEX refers to the index number shown in the most recent listing.

  • If a task is first searched by the “find” feature, then the new index of the task according to the filtered list of Task Cards, is what must be used in the INDEX parameter.

  • The index must be a positive integer 1, 2, 3, …​

End of Extract


Justification

With the ever-changing hectic life of people now, our tasks may be cancelled anytime. Therefore, it will be more useful if users can delete tasks that are being cancelled.

Hence, users can use the deletetask feature to delete away the task at any index at their choice.

Implementation


Start of Extract [from: Developer Guide]

DeleteTask mechanism

The Delete Task mechanism is facilitated by the DeleteTaskCommand class which inherits from the UndoableCommand class. It allows for the removal of a task at a specified index.

Suppose the user has just executed the delete command using:

`delete 2`.

At first, the execute() function of the LogicManager class is called, which goes on to pass the command string into the parseCommand() function of the AddressBookParser class. This, in turn, determines that the Delete feature is being evoked and calls the DeleteTaskCommandParser to parse the index and validate that the index provided is not out of bounds and returns a new task object to call the DeleteTaskCommand class. The LogicManager then calls the executeUndoableFunction() in the DeleteTaskCommand class which creates and return a CommandResult object.

public abstract class UndoableCommand extends Command {
    @Override
    public CommandResult execute() {
        // ... undo logic ...

        executeUndoableCommand();
    }
}

public class DeleteTaskCommand extends UndoableCommand {
    @Override
    public CommandResult executeUndoableCommand() {
        // ... deletetask logic ...
    }
}

End of Extract


Enhancement Added: Findtag

External Behavior


Start of Extract [from: User Guide]

Finding contacts: find

Whether you’re a social butterfly or a networking pro, sifting through contacts can be a tedious task. To ease the process, you can filter your contact list by name, tag or birthday.

Format: find [NAME] [TAG] [BIRTHDAY]

  • The search is case insensitive. e.g hans will match Hans, friends will match Friends and BIRTHDAY, in the format of DD-MM, will match DD-MM_YYYY. e.g 17-07 will match 17-07-1995

  • The order of the keywords does not matter. e.g. Hans Bo will match Bo Hans

  • Persons matching at least one keyword will be returned (i.e. OR search). e.g. Hans Bo will return Hans Gruber, Bo Yang

Examples:

  • find John
    Returns john and John Doe

  • find Betsy Tim John
    Returns any person having names Betsy, Tim, or John

  • find friends
    Returns any person having tags friends or Friends

  • find 17-07
    Returns any person having birthday on 17-07

Constraints:

Note the following constraint when trying to find contacts:

  • Only full words will be matched e.g Han will not match Hans, friend will not match friends and 1707 will not match 17-07

End of Extract


Justification

With so many friends and contacts, users may not remember the name of the person but only remembers what group did he categorize the person in. Therefore, it will be good if users can search the contacts using tags.

Hence, users can use findtag feature to filter out all the people that are under that tag and look for the people that he is looking for.

Implementation


Start of Extract [from: Developer Guide]

FindTag mechanism

The FindTag mechanism is facilitated by the FindCommand class which inherits from the Command class. It allows the user to find contacts using tags. Users can search using multiple tags too.

Suppose the user has just executed the FindCommand using:

`find friends`

At first, the execute() function of the LogicManager class is called, which goes on to pass the command string into the parseCommand() function of the AddressBookParser class. This, in turn, determines that the FindCommand feature is being evoked and calls the FindCommandParser to parse the string and compare the tags. These are validated and formatted by the TagContainsKeywordsPredicate and returned as a TagContainsKeywordsPredicate object to be used to call the FindCommand class. The LogicManager then calls the execute() in the FindCommand class which creates and returns a CommandResult object.

Commands that are not undoable are implemented this way:

public class FindCommand extends Command {
    @Override
    public CommandResult execute() {
        // ... find logic ...
    }
}

FindCommand will call this class:

public class PersonContainsKeywordsPredicate implements Predicate<ReadOnlyPerson> {
@Override
    public boolean test(ReadOnlyPerson person) {
        String tag = Arrays.toString(person.getTags().toArray())
                .replaceAll("[\\[\\](),{}]", "");
        return keywords.stream()
                .anyMatch(keyword -> StringUtil.containsWordIgnoreCase(person.getName().fullName, keyword)
                || StringUtil.containsWordIgnoreCase(tag, keyword)
                || StringUtil.containsWordIgnoreCase(person.getBirthday().value, keyword));
    }

End of Extract


Enhancement Proposed: Pop-ups for task that are overdue or close to deadline

Justification

When the users have many tasks at hand, it will be hard for users to check and remember all the tasks that are near the deadline.

Hence, if there is a pop up, it could remind users of their tasks and allow user to complete their task by the deadline.

Other Contributions

  • Updated and standardized the format and structure for user guide and developer guide.