diff --git a/docs/UserGuide.md b/docs/UserGuide.md index 983f84f2ff6..fb44a83c352 100644 --- a/docs/UserGuide.md +++ b/docs/UserGuide.md @@ -35,10 +35,20 @@ Here are some descriptions of the words we use throughout the User Guide: 1. Ensure you have Java `11` or above installed in your computer. 2. Download the latest `DAVE.jar` from here. 3. Copy the file to the folder you want to use as the *home folder* for D.A.V.E. -4. Double-click `DAVE.jar` to start the app. +4. Open a command terminal, `cd` into the folder you put the jar file in, and use the `java -jar DAVE.jar` command to run the application. + A GUI similar to the below should appear in a few seconds. Note how the app contains some sample data. + +
+ +

After starting up the application

+
# Features +> [!NOTE] +> Extraneous parameters for commands that do not take in parameters (such as help, exit and clear) will be ignored. +e.g. if the command specifies `exit 2`, it will be interpreted as the `exit` command. + ### Add lead - What it does: Add potential leads and their basic information, e.g. name, age, year of study, major, etc. @@ -380,3 +390,53 @@ from current date to ensure a follow-up by the user. - Precise expected outputs when the command fails: `The person index provided is invalid` + +### Locating person by name +- What it does: Finds persons whose names contain any of the given keywords. +- Command format: `find NAME [MORE_NAMES]` +- Example usage: `find John David` +- Acceptable values for parameter: + - `NAME`: Any name from the list. +- Precise expected output when the command succeeds: + +` persons listed!` + +- Precise expected output when the command fails: + +``Invalid command format! +find: Finds all persons whose names contain any of the specified names (case-insensitive) and displays them as a list with index numbers. +Parameters: NAME [MORE_NAMES]... +Example: find alice bob charlie`` + +>[!NOTE] +>- The search is case-insensitive. e.g `John` will match `john`. +>- Only full words will be matched e.g. `John` will not match `Johns`. +>- Persons matching at least one keyword will be returned (i.e. OR search). e.g. `find john david` will return `John Doe`, `David Li` + +Example usage: + +
+ +

Before using find

+
+ +
+ +

After using find john david

+
+ +### Clear +- What it does: Clears all entries from the address book. +- Command format: `clear`. +> [!WARNING] +> This command will delete all the data from the address book. This command cannot be reversed. Proceed with caution. +- Precise expected output when the command succeeds: + +`Address book has been cleared!` + +### Exit the program +- What it does: Exits the program. +- Command format: `exit`. + + + diff --git a/docs/images/AfterFind.png b/docs/images/AfterFind.png new file mode 100644 index 00000000000..4334ffb1d47 Binary files /dev/null and b/docs/images/AfterFind.png differ diff --git a/docs/images/BeforeFind.png b/docs/images/BeforeFind.png new file mode 100644 index 00000000000..c6abbece74e Binary files /dev/null and b/docs/images/BeforeFind.png differ diff --git a/docs/images/QuickStartGUI.png b/docs/images/QuickStartGUI.png new file mode 100644 index 00000000000..a31d8f60f0f Binary files /dev/null and b/docs/images/QuickStartGUI.png differ diff --git a/src/main/java/seedu/address/logic/commands/FindCommand.java b/src/main/java/seedu/address/logic/commands/FindCommand.java index 72b9eddd3a7..f04b419c6ef 100644 --- a/src/main/java/seedu/address/logic/commands/FindCommand.java +++ b/src/main/java/seedu/address/logic/commands/FindCommand.java @@ -16,8 +16,8 @@ public class FindCommand extends Command { public static final String COMMAND_WORD = "find"; public static final String MESSAGE_USAGE = COMMAND_WORD + ": Finds all persons whose names contain any of " - + "the specified keywords (case-insensitive) and displays them as a list with index numbers.\n" - + "Parameters: KEYWORD [MORE_KEYWORDS]...\n" + + "the specified names (case-insensitive) and displays them as a list with index numbers.\n" + + "Parameters: NAME [MORE_NAMES]...\n" + "Example: " + COMMAND_WORD + " alice bob charlie"; private final NameContainsKeywordsPredicate predicate;