Skip to content

Commit

Permalink
Add commands to UG
Browse files Browse the repository at this point in the history
  • Loading branch information
yuxunn committed Nov 6, 2023
1 parent c76c7f5 commit a0028c7
Show file tree
Hide file tree
Showing 5 changed files with 63 additions and 3 deletions.
62 changes: 61 additions & 1 deletion docs/UserGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

<div align="center">
<img src="./images/QuickStartGUI.png" width="500" />
<p>After starting up the application</p>
</div>

# 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.
Expand Down Expand Up @@ -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:

`<NUMBER> 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:

<div align="center">
<img src="./images/BeforeFind.png" width = "500"/>
<p>Before using find</p>
</div>

<div align="center">
<img src="./images/AfterFind.png" width = "500"/>
<p>After using find john david</p>
</div>

### 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`.



Binary file added docs/images/AfterFind.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/BeforeFind.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/QuickStartGUI.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: 2 additions & 2 deletions src/main/java/seedu/address/logic/commands/FindCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit a0028c7

Please sign in to comment.