Skip to content

Commit

Permalink
Merge pull request #208 from larrywang0701/milestone-1.4
Browse files Browse the repository at this point in the history
Add implementation details for `ListEventCommandParser` and tweak PPP
  • Loading branch information
Nixx162 authored Nov 13, 2023
2 parents bd75c86 + b14a634 commit 7d838ff
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 4 deletions.
16 changes: 15 additions & 1 deletion docs/DeveloperGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,10 @@
* [Events feature](#events-feature)
* [Overview: Event](#overview--event-)
* [Implementing `AddEventCommandParser`](#implementing-addeventcommandparser)
* [Implementing `ListEventCommandParser`](#implementing-listeventcommandparser)
* [Implementing `DeleteEventCommandParser`](#implementing-deleteeventcommandparser)
* [Implementing `AddEventCommand`](#implementing-addeventcommand)
* [Implementing `ListEventCommand`](#implementing-listeventcommand)
* [Implementing `DeleteEventCommand`](#implementing-deleteeventcommand)
* [Enhanced help feature](#enhanced-help-feature)
* [[Proposed] Undo/redo feature](#proposed-undo-redo-feature)
Expand Down Expand Up @@ -425,7 +427,7 @@ Simply replace `AddCommandParser` with `DeleteCommandParser`, `AddEventCommandPa
</box>

##### Implementing `AddEventCommandParser`
Implements the `Parser` interface, parsing these arguments:
Implements the `Parser` interface, parsing six main arguments:
1. `contactId`: the one-based index of the contact shown in the GUI.
2. `eventName`: the name of the event.
3. `eventStartTime`: the start time of the event.
Expand All @@ -438,6 +440,18 @@ After that, `contactId` and the `Event` object created are then used to create t

For the details of how parsing works, see the section on [Logic Component](#logic-component).

##### Implementing `ListEventCommandParser`
Implements the `Parser` interface, parsing three main arguments:
1. `filterStartTime`: the start time for filtering the events
2. `filterEndTime`: the end time for filtering the events
3. `useAscendingOrder`: should use ascending order when sorting the events?

`filterStartTime`, `filterEndTime` and `useAscendingOrder` are then used to create the `ListEventCommand` object.

`filterStartTime` and `filterEndTime` can both be `null` (to disable filtering) or neither be `null`, but can NOT only one of them be `null`.

For the details of how parsing works, see the section on [Logic Component](#logic-component).

##### Implementing `DeleteEventCommandParser`
Implements the `Parser` interface, parsing two main arguments:
1. `contactId`: the one-based index of the contact shown in the GUI.
Expand Down
10 changes: 7 additions & 3 deletions docs/team/larrywang0701.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,11 @@

- Wrote the User Stories part in the DG [#10](https://github.com/AY2324S1-CS2103T-W16-1/tp/pull/10)
- Add details about secondary command parser in DG [#47](https://github.com/AY2324S1-CS2103T-W16-1/tp/pull/47/files#diff-1a95edf069a4136e9cb71bee758b0dc86996f6051f0d438ec2c424557de7160b)
- Add details about implementation on `ListEventCommandParser` and `ListEventCommand` [#206](https://github.com/AY2324S1-CS2103T-W16-1/tp/pull/206) [#208](https://github.com/AY2324S1-CS2103T-W16-1/tp/pull/208)
- UML diagrams that I made: [#206](https://github.com/AY2324S1-CS2103T-W16-1/tp/pull/206)
<puml src="diagrams/event/ListEventsSequenceDiagram.puml"/>
<puml src="diagrams/event/ListEventsActivityDiagram.puml"/>
<puml src="diagrams/event/DeleteEventSequenceDiagram.puml"/>
- <puml src="../diagrams/event/ListEventsSequenceDiagram.puml"/>
- <puml src="../diagrams/event/ListEventsActivityDiagram.puml"/>
- <puml src="../diagrams/event/DeleteEventSequenceDiagram.puml"/>


- #### Review/mentoring contributions
Expand All @@ -50,3 +51,6 @@
- [#69](https://github.com/AY2324S1-CS2103T-W16-1/tp/pull/69)
- [#163](https://github.com/AY2324S1-CS2103T-W16-1/tp/pull/163)
- [#168](https://github.com/AY2324S1-CS2103T-W16-1/tp/pull/168)

- #### Contributions beyond the project team
- Reported 6 bugs to other team's product during PE-D

0 comments on commit 7d838ff

Please sign in to comment.