Skip to content

Commit

Permalink
Justify the rules for duplicate
Browse files Browse the repository at this point in the history
  • Loading branch information
CYX22222003 committed Nov 9, 2024
1 parent 142007d commit 4db74c7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
10 changes: 7 additions & 3 deletions docs/DeveloperGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,8 @@ Priorities: High (must have) - `* * *`, Medium (nice to have) - `* *`, Low (unli

Use case ends.

**Use case: UC04 - Add tags to a contact**
**Use case: UC04 - Add tags to a contact**

**Precondition**: Contact to add tags to already exists

**MSS**
Expand All @@ -418,7 +419,8 @@ Priorities: High (must have) - `* * *`, Medium (nice to have) - `* *`, Low (unli

Use case ends.

**Use cases: UC05 - Delete a tag from a contact**
**Use cases: UC05 - Delete a tag from a contact**

**Precondition**: Contact to delete a tag from already exists

**MSS**
Expand Down Expand Up @@ -508,7 +510,9 @@ before the command was executed.
* **Field**: An attribute possessed by a contact, namely Phone number, Tags, Name and Email.
* **Prefix**: An identifier used in commands to indicate which field is referred to. For the 4 fields Phone, Name, Tags and Email,
the *prefixes* would be `p/`, `t/`, `n/` and `e/` respectively.
* **Duplicate Contact**: A contact that has the same Phone, Email or Name as another contact.
* **Duplicate Contact**: A contact is considered a duplicate if it shares the same phone number, email, or name with another contact.
Phone numbers and emails are unique identifiers, so allowing duplicates could cause confusion, such as accidentally contacting the wrong person.
Unique names also help maintain organization, with small variations (e.g., capitalization or adding a number) used to distinguish individuals with the same name.
* **Tag List**: The scrollable list in the GUI displaying all unique tags and their colour-coded categories.
* **Person List**: The scrollable list of contacts in the GUI displaying all contacts and the respective values for their fields.
* **Commands affected by `undo` and `redo`**: These refer to all commands that affect the *state* of the Tag List and Contact List
Expand Down
4 changes: 4 additions & 0 deletions docs/UserGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ any traditional point-and-click management app.

**Notes about duplicate contacts:**<br>
* A contact is considered a duplicate of another if it has the same Name, Phone or Email as the other contact.
*

--------------------------------------------------------------------------------------------------------------------

Expand Down Expand Up @@ -123,6 +124,9 @@ Format: `add n/NAME p/PHONE_NUMBER e/EMAIL [t/TAG]…​`

* The phone number must follow the Singaporean convention: have 8 digits, start with 6, 8, or 9, and consist only of numbers.
* Duplicate contacts cannot be added to the list.
* Names are case-sensitive. For example, “Alice” and “alice” are considered distinct names.
* Names should only contain alphanumeric characters and spaces, and it should not be blank.
* In cases where two people share the same name, differentiate them by appending a number or changing the capitalization (e.g., “Mary” and “Mary 2”).

Examples:
* `add n/John Doe p/98765432 e/[email protected]`
Expand Down

0 comments on commit 4db74c7

Please sign in to comment.