diff --git a/docs/DeveloperGuide.md b/docs/DeveloperGuide.md index d9cbc70a690..bf851bee799 100644 --- a/docs/DeveloperGuide.md +++ b/docs/DeveloperGuide.md @@ -222,99 +222,63 @@ The activity diagram shows the general sequence of steps when a user interacts w ## **Implementation of main features** -### Add person feature +## **Implementation of Entity Commands** +Entity commands include `add`, `delete`, `find`, `clear` commands. +So `xyzCommand` can be `addPersonCommand`, `addCommandParser` and so on. -#### Implementation - -#### Design considerations - -
- -### Edit person feature - -#### Implementation - -#### Design considerations - -
- -### Delete person feature - -#### Implementation - -#### Design considerations - -
- -### Find person feature - -#### Implementation - -#### Design considerations - -
- -### List person feature +**Step 1**. The user types an `xyz` command in the `CommandBox`, followed by the type of entity `person` or `appt`. This is followed by appropriate arguments and prefixes. -#### Implementation - -#### Design considerations -
+**Step 2**. The command is passed to the `LogicManager`. `LogicManager` then calls the `AddressBookParser::parseCommand` method to parse the command. -### Clear person feature -#### Implementation - -#### Design considerations +**Step 3**. The `AddressBookParser` creates a `xyzEntityCommand` object, and call the `xyzCommandParser::parse` method, which is returned to the `LogicManager`. This may be different based on the entity type as commands like `addPersonCommand` and `addApptCommand` have a different set of arguments the user can provide. -
-### Add appointment feature +**Step 4**. The `LogicManager` calls the `xyzCommand : execute` method which creates a `CommandResult` Object. -#### Implementation -#### Design considerations +**Step 5**. The `CommandResult` object is returned to the `LogicManager`. -
+ +- The entity referred in `FindEntityCommand` etc, refers to `FindPersonCommand` and `FindAppointmentCommand` because we have two entities called person and appointment on which operations can be performed. -### Edit appointment feature +#### Find Appointment Command +**Aspect: How to show find appointment.** -#### Implementation +- **Alternative 1 (Current choice)**: Find the information based on what the user has provided (name, date). + - Pros: Fast and easy to find by date and name + - Cons: Confusing syntax from user's perspective -#### Design considerations +- **Alternative 2**: Create different find commands, find by date, find by name etc. + - Pros: Much easy in terms of user experience + - Cons: Harder to implement as more code needs to be written.
-### Delete appointment feature +### List appointment feature #### Implementation -#### Design considerations - -
+**Aspect**: How to show list -### Find appointment feature +- **Alternative 1 (Current choice)**: Print them out individually on the listpanel + - Pros: Easy to scroll through + - Cons: Might look cluttered to some users -#### Implementation #### Design considerations
-### List appointment feature +### Clear appointment feature -#### Implementation #### Design considerations -
- -### Clear appointment feature +**Aspect**: How to show list -#### Implementation - -#### Design considerations +- **Alternative 1 (Current choice)**: Replace the appointment book with a new appointment book.
diff --git a/docs/UserGuide.md b/docs/UserGuide.md index 45cb3562f3d..f28dcb74150 100644 --- a/docs/UserGuide.md +++ b/docs/UserGuide.md @@ -59,7 +59,7 @@ _If you type fast, this application can serve as an excellent substitute for you 5. A GUI similar to the one below should appear in a few seconds. Note how the DocTrack application contains some sample data.
- ![Ui](images/Ui.png) + ![Ui](images/Updated_UI.png)
@@ -255,7 +255,7 @@ Deletes the specified person from the address book. ##### Clearing all persons : `clear person` -Clears all entries from the address book after a validation check from the user. +Deletes all entries from the address book. **Format**: `clear person` @@ -356,7 +356,7 @@ Deletes the specified appointment from DocTrack. ##### Clearing all appointments : `clear appt` -Clears all entries from the appointment book after a validation check from the user. +Deletes all entries from the appointment book. **Format**: `clear appt` @@ -398,7 +398,7 @@ Exits the program. ##### Saving the data -AddressBook data are saved in the hard disk automatically after any command that changes the data. There is no need to save manually. +AddressBook and AppointmentBook data are saved in the hard disk automatically after any command that changes the data. There is no need to save manually.
diff --git a/docs/diagrams/EntityCommandSequenceDiagram.puml b/docs/diagrams/EntityCommandSequenceDiagram.puml new file mode 100644 index 00000000000..94b15ad07c3 --- /dev/null +++ b/docs/diagrams/EntityCommandSequenceDiagram.puml @@ -0,0 +1,60 @@ +@startuml +!include style.puml +skinparam ArrowFontStyle plain + +box Logic LOGIC_COLOR_T1 +participant ":LogicManager" as LogicManager LOGIC_COLOR +participant ":AddressBookParser" as AddressBookParser LOGIC_COLOR +participant ":xyzCommandParser" as CommandParser LOGIC_COLOR +participant "e:XYZCommand" as XYZCommand LOGIC_COLOR +participant "r:CommandResult" as CommandResult LOGIC_COLOR +end box + +[-> LogicManager : execute("xyz") +activate LogicManager + +LogicManager -> AddressBookParser : parseCommand("xyz") + +create CommandParser +activate AddressBookParser +AddressBookParser -> CommandParser +activate CommandParser +AddressBookParser <-- CommandParser +deactivate CommandParser + + + +AddressBookParser -> CommandParser : parse("xyz") +activate CommandParser + + +create XYZCommand +CommandParser -> XYZCommand +activate XYZCommand + +note right of XYZCommand: XYZCommand = \nFindEntityCommand, \nAddEntityCommand, \nDeleteEntityCommand, \nEditEntityCommand, \nClearEntityCommand, \nListEntityCommand + +XYZCommand --> CommandParser +CommandParser --> AddressBookParser +deactivate CommandParser +deactivate XYZCommand + +AddressBookParser --> LogicManager : e +deactivate AddressBookParser + +LogicManager -> XYZCommand : execute(e) +activate XYZCommand + +create CommandResult +XYZCommand -> CommandResult +activate CommandResult + +CommandResult --> XYZCommand +deactivate CommandResult + +XYZCommand --> LogicManager : r +deactivate XYZCommand + +[<--LogicManager : Model +deactivate LogicManager +@enduml diff --git a/docs/images/Updated_UI.png b/docs/images/Updated_UI.png new file mode 100644 index 00000000000..7d391025dfc Binary files /dev/null and b/docs/images/Updated_UI.png differ diff --git a/docs/team/vangmay.md b/docs/team/vangmay.md index f37e31db2e3..b8814dbd20e 100644 --- a/docs/team/vangmay.md +++ b/docs/team/vangmay.md @@ -8,5 +8,17 @@ **DocTrack** helps general practitioners (GPs) at small clinics quickly access patient contact details, appointments, and treatment records. It is optimized for users who prefer a command-line interface (CLI), enabling faster completion of frequent tasks through typed commands. --- +Role: +- Developer +- QA Tester +- Responsible for overseeing Logic Given below are my contributions to the project: +- Refactor Find Persons Command +- Create add appointment command +- Create AppointmentDescriptor in the AppointmentModel +- Created tests for Appointment book +- Wrote test cases to increase code coverage +- Implement changes in UI to add 2 windows +- Update user guide +- Update Developer guide (Find, List, Clear appt)