Skip to content

Commit

Permalink
Merge branch 'master' into bugs-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ChillinRage authored Apr 15, 2024
2 parents 8f57f1c + 18c3a5d commit 28931f6
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 26 deletions.
43 changes: 32 additions & 11 deletions docs/DeveloperGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ The *Sequence Diagram* below shows how the components interact with each other f
<div markdown="span" class="alert alert-info">:information_source: **Note:**
The description is a high-level description and is not exactly accurate, for example,
the `execute()` method in fact takes in a `CommandString` object that represents a command string,
instead of a literal string.
instead of a literal string. Refer to [the implementation detail of "highlight error" feature](#implementation-1) for
more details.
</div>

Each of the four main components (also shown in the diagram above),
Expand Down Expand Up @@ -105,6 +106,13 @@ The sequence diagram below illustrates the interactions within the `Logic` compo
<div markdown="span" class="alert alert-info">:information_source: **Note:** The lifeline for `DeleteCommandParser` should end at the destroy marker (X) but due to a limitation of PlantUML, the lifeline continues till the end of diagram.
</div>

<div markdown="span" class="alert alert-info">:information_source: **Note:**
The description is a high-level description and is not exactly accurate, for example,
the `execute()` method in fact takes in a `CommandString` object that represents a command string,
instead of a literal string. Refer to [the implementation detail of "highlight error" feature](#implementation-1) for
more details.
</div>

How the `Logic` component works:

1. When `Logic` is called upon to execute a command, it is passed to an `AddressBookParser` object which in turn creates a parser that matches the command (e.g., `DeleteCommandParser`) and uses it to parse the command.
Expand All @@ -127,10 +135,12 @@ How the parsing works:
* When called upon to parse a user command, the `AddressBookParser` class creates an `XYZCommandParser` (`XYZ` is a placeholder for the specific command name e.g., `AddCommandParser`) which uses the other classes shown above to parse the user command and create a `XYZCommand` object (e.g., `AddCommand`) which the `AddressBookParser` returns back as a `Command` object.
* All `XYZCommandParser` classes (e.g., `AddCommandParser`, `DeleteCommandParser`, ...) inherit from the `Parser` interface so that they can be treated similarly where possible e.g, during testing.

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

### Model component
**API** : [`Model.java`](https://github.com/AY2324S2-CS2103T-T11-2/tp/tree/master/src/main/java/seedu/address/model/Model.java)

<img src="images/ModelClassDiagram.png" width="450" />
<img src="images/ModelClassDiagram.png" width="380" />


The `Model` component,
Expand All @@ -140,7 +150,9 @@ The `Model` component,
* stores a `UserPref` object that represents the user’s preferences. This is exposed to the outside as a `ReadOnlyUserPref` objects.
* does not depend on any of the other three components (as the `Model` represents data entities of the domain, they should make sense on their own without depending on other components)

<div markdown="span" class="alert alert-info">:information_source: **Note:** An alternative (arguably, a more OOP) model is given below. It has a `Tag` list in the `AddressBook`, which `Person` references. This allows `AddressBook` to only require one `Tag` object per unique tag, instead of each `Person` needing their own `Tag` objects.<br>
<div style="page-break-after: always;"></div>

<div markdown="block" class="alert alert-info">:information_source: **Note:** An alternative (arguably, a more OOP) model is given below. It has a `Tag` list in the `AddressBook`, which `Person` references. This allows `AddressBook` to only require one `Tag` object per unique tag, instead of each `Person` needing their own `Tag` objects.

<img src="images/BetterModelClassDiagram.png" width="450" />

Expand Down Expand Up @@ -272,14 +284,23 @@ For backwards compatibility, not all `CommandException` object need to know what

Priorities: High (must have) - `* * *`, Medium (nice to have) - `* *`, Low (unlikely to have) - `*`

| Priority | As a …​ | I want to …​ | So that I can…​ |
|----------|--------------------------------------------|----------------------------------|-----------------------------------------------------------------------------------|
| `* * *` | new user | see usage instructions | refer to instructions when I forget how to use the App |
| `* * *` | user | add a new tutor | |
| `* * *` | user | delete a tutor | remove entries that I no longer need |
| `* * *` | user | find a tutor by name | locate details of tutors without having to go through the entire list |
| `* * *` | user | find a tutor by course code | locate tutors from a specific course without having to go through the entire list |
| `* *` | user | edit a tutor | change incorrect or new information about a tutor |
| Priority | As a …​ | I want to …​ | So that I can…​ |
|-----|--------------------------------------------|------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------|
| `* * *` | new user | see usage instructions | refer to instructions when I forget how to use the App |
| `* * *` | user | add a new contact | |
| `* * *` | user | delete a contact | remove entries that I no longer need |
| `* * *` | user | edit a contact | change incorrect or new information about a contact |
| `* * *` | user | find a contact by name | locate details of contact without having to go through the entire list |
| `* * *` | user | find a contact by course code | locate contact from a specific course without having to go through the entire list |
| `*` | user | find a contact by tag | find contacts with similar roles quickly |
| `* * *` | user | list all contacts | see all contacts at a glance |
| `* *` | user | undo the previous command | revert the previous action |
| `* *` | user | redo the previous command | redo the previous action |
| `* *` | user | tag contacts with custom labels | easily identify their roles in my academic life |
| `* *` | user | press [] to fill the command-line box with previous commands from command history | edit the last-typed erroneous command quickly |
| `*` | user | share a contact with my classmates | collaborate more easily on group assignments |
| `*` | user | set reminders to contact instructors before important deadlines | ensure timely communication |
| `*` | user | rate and review my interactions with instructors | keep track of my personal experiences and preferences |

### Use cases

Expand Down
32 changes: 17 additions & 15 deletions docs/UserGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ Whether you're organizing peer groups, keeping track of tutors, or connecting wi
Our platform combines the simplicity of a Command Line Interface (CLI) with an intuitive Graphical User Interface (GUI), providing users with the best of both worlds.
If you can type fast, NUSContacts can get your contact management tasks done faster than traditional GUI apps.

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

## Table of Contents

* Table of Contents
Expand Down Expand Up @@ -46,7 +47,7 @@ If you can type fast, NUSContacts can get your contact management tasks done fas

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

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

## Features

Expand Down Expand Up @@ -77,13 +78,11 @@ Furthermore, certain edits can cause the NUSContacts to behave in unexpected way

[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:**<br>
<div markdown="block" class="alert alert-info"> **:information_source: Notes about the command format:**

* Words in `UPPER_CASE` are the parameters to be supplied by the user.<br>
e.g. in `add n/NAME`, `NAME` is a parameter which can be used as `add n/John Doe`.
Expand Down Expand Up @@ -112,9 +111,6 @@ Furthermore, certain edits can cause the NUSContacts to behave in unexpected way
characters.
</div>

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

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

#### Viewing help: `help`

Expand All @@ -136,6 +132,8 @@ The [project website](https://ay2324s2-cs2103t-t11-2.github.io/tp/) includes the

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

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

#### Adding a contact: `add`

Adds a contact to the address book.
Expand Down Expand Up @@ -164,7 +162,7 @@ This is mostly sufficient for you to know how to use the command. Here are some
| `f/` | Bypasses validation. The program will inform you if you violate a validation rule, and how to bypass it. More details in [technical details section](#detail-bypassing-validation). | `f/` | Yes |


<div markdown="span" class="alert alert-warning">:exclamation:
<div markdown="span" class="alert alert-warning">:exclamation: **Caution:**
One `f/` bypasses all invalid field value errors.
For example, `add f/ n/Alice e/ c/` bypasses to have empty email and course.
</div>
Expand Down Expand Up @@ -201,8 +199,8 @@ Examples:
* `edit 2 n/Betsy Crower t/` Edits the name of the 2nd contact to be `Betsy Crower` and clears all existing tags.
* `edit 3 p/ a/` Deletes the phone number and the address of the 3rd contact.

<div markdown="block" class="alert alert-info">
:bulb: If an invalid field value is specified, the program will inform you of the error.
<div markdown="block" class="alert alert-primary">:bulb: **Tip:**
If an invalid field value is specified, the program will inform you of the error.
You can fix the error, or use `f/` to bypass it if you want to.

Refer to [Adding a contact: `add`](#adding-a-contact-add) for more information about `f/`.
Expand Down Expand Up @@ -258,8 +256,8 @@ Shows a list of all contacts in the address book.

Format: `list`

<div markdown="block" class="alert alert-info">
:bulb: See [note](#note-on-returning-to-the-original-view) under [Locating Contacts](#locating-contacts-find) to understand how the `list` command can be useful.
<div markdown="block" class="alert alert-info"> :information_source: **Note:**
See [note](#note-on-returning-to-the-original-view) under [Locating Contacts](#locating-contacts-find) to understand how the `list` command can be useful.
</div>

[Back to Table of Contents](#table-of-contents)
Expand Down Expand Up @@ -357,7 +355,7 @@ Format: `exit`

You don't need to know about these features on the first read.

#### Highlighting erroneous part of the command
#### Highlight erroneous part of the command

When a command contains an error, the program will try to detect the part of the command that causes the error, and
selects it in the command box.
Expand Down Expand Up @@ -426,6 +424,8 @@ For example:

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

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

## Appendix: Technical details

You should not need to read this, unless you run into some trouble.
Expand Down Expand Up @@ -536,6 +536,8 @@ Because currently there are only 3 roles (Student, Professor, TA), there is no a

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

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

## Command summary

| Action | Format, Examples |
Expand Down

0 comments on commit 28931f6

Please sign in to comment.