diff --git a/docs/DeveloperGuide.adoc b/docs/DeveloperGuide.adoc index 031944bfa5d2..882239cd5001 100644 --- a/docs/DeveloperGuide.adoc +++ b/docs/DeveloperGuide.adoc @@ -479,6 +479,9 @@ We are using `java.util.logging` package for logging. The `LogsCenter` class is === Delete command `delete` command supports modifying the state of address book by deleting all persons whose indices are specified in the input. It inherits from `UndoableCommand`. + +image::delete.png[width="300"] + The implementation of `delete` contains 2 classes: `DeleteCommand` and `DeleteCommandParser` inside the logic component. + `DeleteCommandParser`, the parser of `delete`, parses user's input into the variable `input: List` that store a list of `Index`. `DeleteCommand`, which handles the logic of `delete` command, then iteratively remove any `Person` object with `Index` specified in `input`. @@ -505,8 +508,14 @@ And finally, we add the `delete` command to the class 'AddressBookParser' so tha === Phone command The `phone` command utilize the same implementation as the `Find` command for name. Instead of logic execute search via `Name` attribute of `Person`, the command search for the `phone` attribute. +The `phone` command is handled by the class `FindPhoneCommand` that inherits from `Command` class. + `Name` and `Phone` API structure is roughly similar that they allow to extract value of the object. The search algorithm utilizes a class `NameContainsPhonesPredicate implements Predicate` -which allows the algorithm to use Java `Predicate` class method. +which allows the algorithm to use Java `Predicate` class method. + +The diagram demonstrating `phone` command structure is illustrated here: + +image::findPhone.png[width="300"] + + // end::phone[] // tag::findtag[] diff --git a/docs/UserGuide.adoc b/docs/UserGuide.adoc index 28a94d201854..d2e7545a59a9 100644 --- a/docs/UserGuide.adoc +++ b/docs/UserGuide.adoc @@ -158,10 +158,16 @@ Format: `phone NUMBER [MORE_NUMBERS]` Examples: -* `phone 123` + -Returns persons with phone numbers containing 123 -* `phone 123 65` + -Returns persons with phone numbers containing `123` or `65`. +* `phone 92` + +Returns persons with phone numbers containing 92. +* `phone 92 65` + +Returns persons with phone numbers containing `92` or `283`. + +The second example is illustrated below: + +image::findPhone1.png[width="690"] + +image::findPhone2.png[width="690"] // end::phone[] // tag::findtag[] @@ -282,7 +288,7 @@ Examples: * `list` + `select 2` + Selects the 2nd person in the address book. + -The 2nd person in the list has the profile page "www.facebook.com" + +The 2nd person in the list has the profile page "twitter.com/davidlee" + image::select1.png[width="690"] diff --git a/docs/images/delete.png b/docs/images/delete.png new file mode 100644 index 000000000000..93562c5b1889 Binary files /dev/null and b/docs/images/delete.png differ diff --git a/docs/images/findPhone.png b/docs/images/findPhone.png new file mode 100644 index 000000000000..87292ff77931 Binary files /dev/null and b/docs/images/findPhone.png differ diff --git a/docs/images/findPhone1.png b/docs/images/findPhone1.png new file mode 100644 index 000000000000..dfb77481dc47 Binary files /dev/null and b/docs/images/findPhone1.png differ diff --git a/docs/images/findPhone2.png b/docs/images/findPhone2.png new file mode 100644 index 000000000000..e8628de4257b Binary files /dev/null and b/docs/images/findPhone2.png differ diff --git a/docs/images/select1.png b/docs/images/select1.png index 11227050a423..a6907b3f5a43 100644 Binary files a/docs/images/select1.png and b/docs/images/select1.png differ diff --git a/docs/images/select2.png b/docs/images/select2.png index 3fd918c82450..bd16b796b8f4 100644 Binary files a/docs/images/select2.png and b/docs/images/select2.png differ diff --git a/docs/team/quangtdn.adoc b/docs/team/quangtdn.adoc index c5449e7da74d..796f6dfe2f4e 100644 --- a/docs/team/quangtdn.adoc +++ b/docs/team/quangtdn.adoc @@ -167,7 +167,3 @@ include::../DeveloperGuide.adoc[tag=addprofile] * Fix bugs due to merge conflicts for team (Pull requests https://github.com/CS2103AUG2017-W10-B4/main/pull/70[#70], https://github.com/CS2103AUG2017-W10-B4/main/pull/45[#45]) * Write additional tests to increase coverage by 1.4% (Pull requests https://github.com/CS2103AUG2017-W10-B4/main/pull/89[#89], https://github.com/CS2103AUG2017-W10-B4/main/pull/99[#99]) - -== Project: PowerPointLabs - -{Optionally (not graded), you may include other projects in your portfolio.}