Skip to content

Commit

Permalink
Merge pull request nus-cs2103-AY2223S1#79 from peppapighs/75-update-dg
Browse files Browse the repository at this point in the history
Add DG for Person-Task Bridge Relation
  • Loading branch information
jasonqiu212 authored Oct 20, 2022
2 parents 85573c9 + 887dad5 commit 6ebfb4d
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
4 changes: 0 additions & 4 deletions .vscode/settings.json

This file was deleted.

17 changes: 17 additions & 0 deletions docs/DeveloperGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,23 @@ _{more aspects and alternatives to be added}_

_{Explain here how the data archiving feature will be implemented}_

### Many-to-many relationship between `Person` and `Task`

#### Implementation

The implementation of the contact-task relation is facilitated by `PersonTaskBridge` and `PersonTaskBridgeList`.

`PersonTaskBridge` is a class containing a `Person`'s ID and a `Task`'s ID, representing a relation between a `Person` and a `Task`.

`PersonTaskBridgeList` is a class containing a list of `PersonTaskBridge` objects, representing all the relations between `Person` and `Task` objects in the `AddressBook`. Additionally, it implements the following operations:

* `PersonTaskBridgeList#add(PersonTaskBridge)` - Saves a new relation between a `Person` and a `Task` in the list.
* `PersonTaskBridgeList#remove(PersonTaskBridge)` - Removes an existing relation between a `Person` and a `Task` from the list.
* `PersonTaskBridgeList#removePerson(Person)` and `PersonTaskBridgeList#removeTask(Task)` - Removes all existing relations between a `Person` and `Task` objects from the list.

These operations will be exposed in the `Model` interface.

<img src="images/PersonTaskBridgeDiagram.png" width="250" />

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

Expand Down
Binary file added docs/images/PersonTaskBridgeDiagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 6ebfb4d

Please sign in to comment.