Skip to content

Commit

Permalink
Edit DG
Browse files Browse the repository at this point in the history
Let's,
* add the new Command Class UML to the Developer Guide
* add some description to the Developer Guide about the new UML
  • Loading branch information
KrashKart committed Oct 20, 2024
1 parent 3261f04 commit bb8a472
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions docs/DeveloperGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,15 @@ How the parsing works:
* When called upon to parse a user command, the `CampusConnectParser` class creates an `XYZCommandParser` (`XYZ` is a placeholder for the specific command name e.g., `AddCommandParser`) which uses the other classes shown above to parse the user command and create a `XYZCommand` object (e.g., `AddCommand`) which the `CampusConnectParser` returns back as a `Command` object.
* All `XYZCommandParser` classes (e.g., `AddCommandParser`, `DeleteCommandParser`, ...) inherit from the `Parser` interface so that they can be treated similarly where possible e.g, during testing.

Finally, here are the command classes in `Logic` used to represent the different types of commands:

<puml src="diagrams/CommandClasses.puml" width="600"/>

A few notes here:
* Since there are many types of Find Command classes with similar functionality, they all extend an abstract parent class `AbstractFindCommand`, used to contain most of the common methods.
* Each `Command` class contains the respective `COMMAND_WORD` representing the name of the command and a `MESSAGE_USAGE` string to demonstrate how to use the respective command.
* Additionally, each Find Command class (`FindByNameCommand`, `FindByEmailCommand`, `FindByTagCommand` and `FindByPhoneCommand`) contains a respective `COMMAND_WORD` ("`n/`", "`e/`", "`t/`" and "`p/`" respectively) on top of the shared command word "`find`" to be used.

### Model component
**API** : [`Model.java`](https://github.com/se-edu/CampusConnect/tree/master/src/main/java/seedu/address/model/Model.java)

Expand Down

0 comments on commit bb8a472

Please sign in to comment.