Skip to content

Commit

Permalink
Merge pull request #328 from Kb-Tay/branch-Docs-UpdateDocumentation
Browse files Browse the repository at this point in the history
Update CompleteCommand DG and PPP
  • Loading branch information
sopa301 authored Nov 13, 2023
2 parents a0bec86 + e3ea34a commit 0c782bd
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 3 deletions.
24 changes: 22 additions & 2 deletions docs/DeveloperGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,26 @@ The following activity diagram illustrates how the complete operation is execute

<img src="images/CompleteActivityDiagram.png" width="800"/>

**Design Considerations**

Alternative 1 (Previous Design): Use a `CompleteCommandDescriptor` that has a `Date` and `Index` field wrapped by Java `Optional`.

* Pros:
* Allows for clean, readable code without having to check for null values regardless of whether user inputs a date or index.

* Cons:
* Have to check for both fields for at every step of the command which is inefficient.

Alternative 2 (Current Choice): Make `CompleteCommand` an abstract class with the subclass `CompleteByIndex` and `CompletebyDate`.

Pros:
* `LogicManager` can just execute `CompleteCommand` without needing to know if it is `CompleteByIndex` or `CompleteByDate`.
* Also eliminates the need to check for null fields, since each `CompleteCommand` subclass only has their required fields.
* This also increases the extensibility of the command, as a new subclass can just be added.

Cons:
* Increases the amount of code written and testing required.

### Gather Emails Feature

The **Gather Emails** feature in our software system is designed to efficiently collect email addresses. This feature is facilitated by the `GatherCommand` and `GatherCommandParser`. Below is the class diagram of the `gather emails` feature.
Expand Down Expand Up @@ -808,10 +828,10 @@ point for testers to work on; testers are expected to do more *exploratory* test

1. Prerequisites: List all persons using the `list` command.

2. Test case: `add n/name p/987 a/address e/email@email nk/nokname nkp/654`<br>
2. Test case: `add n/name p/987 a/address e/email@email.com nk/nokname nkp/654`<br>
Expected: New contact with the above details is added to the bottom of the list.

3. Test case: `add n/invalidName! p/987 a/address e/email@email nk/nokname nkp/654`<br>
3. Test case: `add n/invalidName! p/987 a/address e/email@email.com nk/nokname nkp/654`<br>
Expected: No person is added. Error details shown in the status message. Status bar remains the same.

### Editing a person
Expand Down
2 changes: 1 addition & 1 deletion docs/team/kb-tay.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ UNOFAS is a desktop app for **Financial Advisors (FA)** to manage client’s con

Given below are my contributions to the project.

* **New Feature**: Added the `ScheduleItem` class as a new field to Person
* **New Feature**: Added the `ScheduleItem` class as a new field to Person.
* Justification: This feature provides users the ability to associate appointments with their clients.
* Pull Request [#70](https://github.com/AY2324S1-CS2103T-F12-1/tp/pull/70)

Expand Down

0 comments on commit 0c782bd

Please sign in to comment.