Skip to content

Commit

Permalink
Update DG formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
nananakx-x committed Nov 13, 2023
1 parent e9c84da commit db87f7e
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions docs/DeveloperGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@ Here is a step-by-step explanation of how the `Logic` component works when it us
1. The command can communicate with the `Model` when it is executed (e.g. to delete a person).
1. The result of the command execution is encapsulated as a `CommandResult` object which is returned back from `Logic` to `UI`.

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

Here is a step-by-step explanation of how the `Logic` component works when it uses `ViewModeParser`:

1. When `Logic` is called upon to execute a command, it is passed to an `ViewModeParser` object which in turn creates a `Command` object (e.g., `SaveCommand`).
Expand All @@ -144,6 +146,8 @@ Here are the other classes in `Logic` (omitted from the class diagram above) tha
* 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/AY2324S1-CS2103T-T13-4/tp/blob/master/src/main/java/seedu/address/model/Model.java)

Expand Down Expand Up @@ -365,6 +369,8 @@ Step 2. With `executeInView()`, `ViewModeParser` is used to parse the command te

![SaveSequenceDiagramStep2.png](images/SaveSequenceDiagramStep2.png)

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

Step 3. `EditFieldCommand` is executed, and `setPerson()` method from `Model` class is called with personToEdit and targetIndex obtained from `MainWindow` class.

![SaveSequenceDiagram.png](images/SaveSequenceDiagram.png)
Expand Down Expand Up @@ -434,8 +440,6 @@ Here are the justifications of why `SaveCommand` exits the profile page when add
* Pros: Easy to implement. Utilizes the current architecture and does not add additional coupling between `MainWindow` and `CommandBox`.
* Cons: May potentially cause errors since users may type in different commands.

<br>

### List feature

#### Implementation
Expand Down Expand Up @@ -538,7 +542,6 @@ Therefore, by ensuring that the user input indices are correctly parsed and vali
* Pros: Easy to implement.
* Cons: Overhead associated with the chain of delete commands should the user choose to perform multiple deletions.


### Sort feature
#### Implementation

Expand Down Expand Up @@ -590,7 +593,6 @@ The sort feature offers the user a choice to ensure that the list of fosterers i
* Pros: Offers an explicit and clear command for reverting to the original sorting of the address book list.
* Cons: Introduces additional commands, potentially leading to increased cognitive load for the users.


### Statistics feature
#### Implementation

Expand Down Expand Up @@ -770,6 +772,8 @@ required to read long error messages with details that might be irrelevant to th

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

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

## **Documentation, logging, testing, configuration, dev-ops**

* [Documentation guide](Documentation.md)
Expand Down

0 comments on commit db87f7e

Please sign in to comment.