Skip to content

Commit

Permalink
Edit existing model class diagram and add Task class implementation s…
Browse files Browse the repository at this point in the history
…ection (#72)
  • Loading branch information
zxjtan authored Oct 19, 2018
1 parent 1f6f7a1 commit 65fb66b
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions docs/DeveloperGuide.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ Given below is the Sequence Diagram for interactions within the `Logic` componen

.Interactions Inside the Logic Component for the `contacts delete 1` Command
image::DeletePersonSdForLogic.png[width="800"]
////

[[Design-Model]]
=== Model component

Expand All @@ -206,14 +206,10 @@ The `Model`,

* stores a `UserPref` object that represents the user's preferences.
* stores the Address Book data.
* exposes an unmodifiable `ObservableList<Person>` that can be 'observed' e.g. the UI can be bound to this list so that the UI automatically updates when the data in the list change.
* exposes an unmodifiable `ObservableList<Person>` and `ObservableList<Task>` that can be 'observed' e.g. the UI can be bound to this list so that the UI automatically updates when the data in the list change.
* does not depend on any of the other three components.

[NOTE]
As a more OOP model, we can store a `Tag` list in `Address Book`, which `Person` can reference. This would allow `Address Book` to only require one `Tag` object per unique `Tag`, instead of each `Person` needing their own `Tag` object. An example of how such a model may look like is given below. +
+
image:ModelClassBetterOopDiagram.png[width="800"]
////
[[Design-Storage]]
=== Storage component
Expand All @@ -237,6 +233,15 @@ Classes used by multiple components are in the `seedu.addressbook.commons` packa

This section describes some noteworthy details on how certain features are implemented.

// tag::tasks[]
=== Tasks class
image::TaskComponentClassDiagram.png[width="800"]

The `Task` class consists of list of `Tag` objects and a `Name` object, corresponding to the same classes in the `Person` namespace. It also has two `DateTime` objects, one for the start date and time and the other for the end date and time of the task.

The `DateTime` class encapsulates a Java `Calendar` object to store a date and time. It also includes methods to parse and validate date/time inputs from the user, and methods to return the date or time as a `String`.
// end::tasks[]

// tag::listfindtasks[]
=== Listing and finding of tasks
==== Current Implementation
Expand Down
Binary file modified docs/diagrams/ModelComponentClassDiagram.pptx
Binary file not shown.
Binary file added docs/diagrams/TaskComponentClassDiagram.pptx
Binary file not shown.
Binary file modified docs/images/ModelClassDiagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/TaskComponentClassDiagram.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 65fb66b

Please sign in to comment.