You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/DeveloperGuide.md
+47-3Lines changed: 47 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -320,6 +320,39 @@ All properties will be tested using this `PriceAndTagsInRangePredicate`. Propert
320
320
**Aspect: How the filtered properties should interact with the model:**
321
321
* We also decided for the filter commands to put the filtered properties in a different list (`FilteredPropertyList`), instead of removing the 'unused' properties from the model.
322
322
323
+
### Matching for Customers and Properties
324
+
[Back to top](#table-of-contents)
325
+
326
+
#### Motivation
327
+
The property agent may want to get all properties that satisfy the customers criteria or get all customers that want the properties characteristics. For example, the property agent want to get all properties that certain specified customer want and can afford.
328
+
Or, the property agent want to get all customers that might want to buy certain specified property.
329
+
330
+
#### Implementation
331
+
The `MatchCustomerCommand` and `MatchPropertyCommand` classes extends the `Command` class.
332
+
They are used to match the details of a customer or property, respectively.
333
+
The command expects exactly one "Index" of the customer or property to be match, otherwise an error message will be displayed.
334
+
When the match command is inputted, the `MatchCustomerCommandParser` or `MatchPropertyCommandParser` classes are used to parse the user input and create the `MatchCustomerCommand` or `MacthPropertyCommand` objects respectively.
335
+
When these created command objects are executed by the `Logic Manager`, the `MatchCustomerCommand#execute(Model model)` or `MatchProeprtyCommand#execute(Model model)` method is called.
336
+
These methods will match the customer or property in the model, and return a `ComandResult` object.
337
+
338
+
The following sequence diagram shows how the `MatchCustomerCommand` is executed.
**Alternative 1 (current choice):*`MatchPropertyCommand` and `MatchCustomerCommand` are separate, and both inherit from the `Command` class.
344
+
* Pros:
345
+
* Allows the property agent to match only customers or properties.
346
+
* The inheritance of the `Command` class allows us to keep to the Command design pattern, to easily add more types of edit commands in the future, without having to change the existing code.
347
+
* Cons:
348
+
* More code for each of the classes, which increases the size of the codebase
349
+
* More commands for the property agent to remember
350
+
**Alternative 2:* A single `MacthCommand` class is used to match both customers and properties.
351
+
* Pros:
352
+
* Lesser commands for the property agent to remember
353
+
* Cons:
354
+
* Unable to match only customers or properties without specify it which increase the complexity of the commands
@@ -514,6 +546,8 @@ Priorities: High (must have) - `* * *`, Medium (nice to have) - `* *`, Low (unli
514
546
|`* *`| user with a lot of properties | find properties based on properties' details | access specific properties with the detail |
515
547
|`* *`| user with a lot of customers | filter customers based on customers' details | get a list of specific customers with the detail |
516
548
|`* *`| user with a lot of properties | filter properties based on properties' details | get a list of specific properties with the detail |
549
+
|`* *`| user with a lot of customers | get properties based on customers' details | get a list of specific properties with the detail satisfy the customer |
550
+
|`* *`| user with a lot of properties | get customers based on properties' details | get a list of specific customers with the detail satisfy the property |
517
551
|`*`| user | add notes to customers' profiles | streamline customer management profile |
518
552
|`*`| user | add notes to properties' profiles | streamline customer property profile |
519
553
|`*`| experienced user using the application with new device | import and export customers' data | transfer customers' data across devices |
@@ -594,7 +628,17 @@ Actor: Property Agent
594
628
2. Property agent enters the characteristics of the properties into the CLI
595
629
3. Property agent views the properties that adheres to the conditions given
596
630
597
-
**Use Case: UC08 - Find specific entity**
631
+
**Use Case: UC08 - Match customers to properties**
632
+
633
+
System: PropertyMatch address book
634
+
635
+
Actor: Property Agent
636
+
637
+
1. Property agent identifies the characteristics the customers want that belong to properties
638
+
2. Property agent enters the characteristics of the customers into the CLI
639
+
3. Property agent views the customers that adheres to the conditions given
640
+
641
+
**Use Case: UC09 - Find specific entity**
598
642
599
643
System: PropertyMatch address book
600
644
@@ -604,7 +648,7 @@ Actor: Property Agent
604
648
2. Property agent enters the entity index he wants
0 commit comments