Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update CompleteCommand DG and PPP #328

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading