Skip to content

Commit

Permalink
Add command word and message usage
Browse files Browse the repository at this point in the history
For FindByContactCommand and FindByNameCommand
  • Loading branch information
KrashKart committed Oct 10, 2024
1 parent 86973cd commit 2e31ac5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@
* Finds and lists all persons in address book whose contact contains any of the argument keywords.
*/
public class FindByContactCommand extends AbstractFindCommand {
public static final String COMMAND_WORD = "find /c";

public static final String MESSAGE_USAGE = COMMAND_WORD + ": Finds all persons whose contact numbers "
+ "contain any of the specified keywords (case-insensitive) and displays them as a list with indices.\n"
+ "Parameters: KEYWORD [MORE_KEYWORDS]...\n"
+ "Example: " + COMMAND_WORD + " alice bob charlie";
public FindByContactCommand(ContactContainsKeywordsPredicate predicate) {
super(predicate);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@
* Keyword matching is case-insensitive.
*/
public class FindByNameCommand extends AbstractFindCommand {
public static final String COMMAND_WORD = "find /n";

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 indices.\n"
+ "Parameters: KEYWORD [MORE_KEYWORDS]...\n"
+ "Example: " + COMMAND_WORD + " alice bob charlie";
public FindByNameCommand(NameContainsKeywordsPredicate predicate) {
super(predicate);
}
Expand Down

0 comments on commit 2e31ac5

Please sign in to comment.