Skip to content

Commit

Permalink
Merge pull request #115 from quangtdn/documentation
Browse files Browse the repository at this point in the history
last update on documentation
  • Loading branch information
erik0704 authored Nov 13, 2017
2 parents 2e59f85 + 7b3fdef commit aecddc8
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 10 deletions.
11 changes: 10 additions & 1 deletion docs/DeveloperGuide.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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<Index>` 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`.
Expand All @@ -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<ReadOnlyPerson>`
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[]
Expand Down
16 changes: 11 additions & 5 deletions docs/UserGuide.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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[]
Expand Down Expand Up @@ -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"]

Expand Down
Binary file added docs/images/delete.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/findPhone.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/findPhone1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/findPhone2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/select1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/select2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 0 additions & 4 deletions docs/team/quangtdn.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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.}

0 comments on commit aecddc8

Please sign in to comment.