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 toJohn Doe
, email address tojohn_d888@gmail.com
, address to207 Upper Street, Islington, LONDON, N1 1RL
, birthday to15-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:
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.
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
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:
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.
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
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 matchHans
,friends
will matchFriends
and BIRTHDAY, in the format of DD-MM, will match DD-MM_YYYY. e.g17-07
will match17-07-1995
-
The order of the keywords does not matter. e.g.
Hans Bo
will matchBo Hans
-
Persons matching at least one keyword will be returned (i.e.
OR
search). e.g.Hans Bo
will returnHans Gruber
,Bo Yang
Examples:
-
find John
Returnsjohn
andJohn Doe
-
find Betsy Tim John
Returns any person having namesBetsy
,Tim
, orJohn
-
find friends
Returns any person having tagsfriends
orFriends
-
find 17-07
Returns any person having birthday on17-07
Constraints:
Note the following constraint when trying to find contacts:
-
Only full words will be matched e.g
Han
will not matchHans
,friend
will not matchfriends
and1707
will not match17-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.
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.