Skip to content

Commit

Permalink
DG touch up
Browse files Browse the repository at this point in the history
  • Loading branch information
LimZiJia committed Apr 15, 2024
1 parent bab2b4c commit ca92103
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
8 changes: 4 additions & 4 deletions docs/DeveloperGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ The `Model` component,

<div markdown="span" class="alert alert-info">:information_source: **Note:** An alternative (arguably, a more OOP) model is given below. It has a `Tag` list in the `AddressBook`, which `Person` references. This allows `AddressBook` to only require one `Tag` object per unique tag, instead of each `Person` needing their own `Tag` objects.<br>

<img src="images/BetterModelClassDiagram.png" width="450" />
<img src="images/BetterModelClassDiagram.png" width="650" />

</div>

Expand Down Expand Up @@ -168,7 +168,9 @@ prefer to be called on a later date.
#### How it is implemented
We assume clients who do not have `HousekeepingDetails` do not want to be disturbed by the housekeeping company.
Therefore, the client list should be first filtered by `Client.hasHousekeepingDetais()` then sorted by `HousekeepingDetails`.
We will also not show clients who have their predicted next housekeeping date that is after the current date.
As this is meant to be a notification for the client or sales lead for the admin, we not show clients who have their
predicted next housekeeping date that is after the current date. We will show clients who have their predicted next housekeeping
that is today or before today to account for calls that the admin might have missed.

To do the sorting, the `Client` class now implements `Comparable<Client>` interface, and the `compareTo()` method is
overridden to compare the `HousekeepingDetails` of two clients.
Expand Down Expand Up @@ -218,8 +220,6 @@ Cons: [1] Less flexible for the client. The client may not be ready for housekee
[2] It is possible to deal with this as an admin, but it would be "hacky" as the admin would have to edit the `lastHousekeepingDate`.


A `ClientComparator` is made using the `compareTo()` is then used by `FXCollections.sort()` to sort the list of clients.

### \[Completed\] Find using multiple attributes

The Find feature has already been developed in AB3. However, it only searches the keywords given in the Name attribute.
Expand Down
3 changes: 2 additions & 1 deletion docs/diagrams/BetterModelClassDiagram.puml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ Person *--> "1" Address
Person *--> "1" Area

HousekeepingDetails *--> "1" LocalDate
HousekeepingDetails *--> "1" Period
HousekeepingDetails *--> "2" Period
HousekeepingDetails *--> "1" Booking

BookingList *-right-> "*" Booking

Expand Down
Binary file modified docs/images/BetterModelClassDiagram.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 ca92103

Please sign in to comment.