Skip to content

Commit

Permalink
Merge pull request #217 from E0735389/fix-docs-4
Browse files Browse the repository at this point in the history
Add some use cases and glossary
  • Loading branch information
E0735389 authored Apr 15, 2024
2 parents eb56d38 + f291ed6 commit b58c0b4
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 23 deletions.
71 changes: 48 additions & 23 deletions docs/DeveloperGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -306,31 +306,31 @@ Priorities: High (must have) - `* * *`, Medium (nice to have) - `* *`, Low (unli

(For all use cases below, the **System** is the `NUSContacts` and the **Actor** is the `user`, unless specified otherwise)

**UC1: Add a tutor**
**UC1: Add a contact**

**MSS**

1. User requests to add a tutor
2. User provides the tutor's details
3. NUSContacts adds the tutor
1. User requests to add a contact
2. User provides the contact's details
3. NUSContacts adds the contact

Use case ends.

**Extensions**

* 2a. The tutor already exists.
* 2a. The contact already exists.
* 2a1. NUSContacts informs the user of the error.

Use case ends.

**UC2: Delete a tutor**
**UC2: Delete a contact**

**MSS**

1. User requests to list tutors
2. NUSContacts shows a list of tutors
3. User requests to delete a specific tutor in the list
4. NUSContacts deletes the tutor
3. User requests to delete a specific contact in the list
4. NUSContacts deletes the contact

Use case ends.

Expand All @@ -346,25 +346,25 @@ Priorities: High (must have) - `* * *`, Medium (nice to have) - `* *`, Low (unli

Use case resumes at step 2.

**UC3: Edit a tutor**
**UC3: Edit a contact**

**MSS**

1. User requests to edit a tutor
1. User requests to edit a contact
2. User provides the field to edit and the new value
3. NUSContacts edits the tutor
3. NUSContacts edits the contact

Use case ends.

**Extensions**

* 2a. User provides an empty address for a PROFESSOR.
* 2a. User provides an empty address for a PROFESSOR.
* 2a1. NUSContacts shows an error message.

Use case resumes at step 2.
* 2b. User gives a tutor without an address the PROFESSOR role.
* 2b. User gives a contact without an address the PROFESSOR role.
* 2b1. NUSContacts shows an error message.

Use case resumes at step 2.

* 2c. User provides an invalid index such as -1.
Expand All @@ -379,42 +379,67 @@ Priorities: High (must have) - `* * *`, Medium (nice to have) - `* *`, Low (unli
Use case resumes at step 3.


**UC4: Find a tutor by name**
**UC4: Find a contact by name**

**MSS**

1. User requests to find a tutor
1. User requests to find a contact
2. NUSContacts prompts search criterion (name or course code)
3. User provides the search criterion (name)
4. NUSContacts shows the tutor(s) that match the criterion
4. NUSContacts shows the contact(s) that match the criterion

Use case ends.

**Extensions**

* 4a. No tutor matches the criterion.
* 4a. No contact matches the criterion.
* 4a1. NUSContacts informs the user of the error.

Use case ends.

**UC5: Find a tutor by course code**
**UC5: Find a contact by course code**

**MSS**

1. User requests to find a tutor
1. User requests to find a contact
2. NUSContacts prompts search criterion (name or course code)
3. User provides the search criterion (course code)
4. NUSContacts shows the tutor(s) that match the criterion
4. NUSContacts shows the contact(s) that match the criterion

Use case ends.

**Extensions**

* 4a. No tutor matches the criterion.
* 4a. No contact matches the criterion.
* 4a1. NUSContacts informs the user of the error.

Use case ends.

**UC5: Clear all contacts**

**MSS**

1. User requests to clear all contacts
3. NUSContacts clears all contacts

Use case ends.

**UC6: Clear all contacts**

**MSS**

1. User requests to clear all contacts
3. NUSContacts clears all contacts

Use case ends.

**Extensions**

* 2a. The contact already exists.
* 2a1. NUSContacts informs the user of the error.

Use case ends.


### Non-Functional Requirements

Expand Down
23 changes: 23 additions & 0 deletions docs/UserGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ If you can type fast, NUSContacts can get your contact management tasks done fas

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

<div style="page-break-after: always;"></div>

## Quick start

1. Ensure you have Java `11` or above installed in your Computer. (Refer to [FAQ](#faq) on how to check your Java version and how to install it)
Expand Down Expand Up @@ -80,6 +82,24 @@ Furthermore, certain edits can cause the NUSContacts to behave in unexpected way

<div style="page-break-after: always;"></div>

### Glossary

Here are the definition of the terms we use throughout the documentation.


| Term | Definition |
|--------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Command | An input from the user that instructs the program to perform an action e.g. ADD a contact. |
| Command parameter | Some information that is provided to a command e.g. the name or phone number of a contact. |
| Contact | A person that the user wants to keep track of. |
| Optional parameter | A parameter that usually can be omitted from the command with no errors, unless specified otherwise. |
| GUI | The visual display of NUSContacts. |
| CLI | A text-based user interface to interact with the application. |

[Back to Table of Contents](#table-of-contents)

<div style="page-break-after: always;"></div>

### List of all commands

<div markdown="block" class="alert alert-info"> **:information_source: Notes about the command format:**
Expand Down Expand Up @@ -111,6 +131,7 @@ Furthermore, certain edits can cause the NUSContacts to behave in unexpected way
characters.
</div>

<div style="page-break-after: always;"></div>

#### Viewing help: `help`

Expand Down Expand Up @@ -398,6 +419,8 @@ For example:
Other characters should not be escaped.
<div style="page-break-after: always;"></div>
* Here are more examples.
| If you want to enter | You should type |
Expand Down

0 comments on commit b58c0b4

Please sign in to comment.