diff --git a/README.md b/README.md index 13f5c77403f..0aed6c7dafe 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,17 @@ -[![CI Status](https://github.com/se-edu/addressbook-level3/workflows/Java%20CI/badge.svg)](https://github.com/se-edu/addressbook-level3/actions) +[![CI Status](https://github.com/AY2021S2-CS2103T-W14-3/tp/actions/workflows/gradle.yml/badge.svg)](https://github.com/AY2021S2-CS2103T-W14-3/tp/actions/workflows/gradle.yml) ![Ui](docs/images/Ui.png) -* This is **a sample project for Software Engineering (SE) students**.
- Example usages: - * as a starting point of a course project (as opposed to writing everything from scratch) - * as a case study -* The project simulates an ongoing software project for a desktop application (called _AddressBook_) used for managing contact details. - * It is **written in OOP fashion**. It provides a **reasonably well-written** code base **bigger** (around 6 KLoC) than what students usually write in beginner-level SE modules, without being overwhelmingly big. - * It comes with a **reasonable level of user and developer documentation**. -* It is named `AddressBook Level 3` (`AB3` for short) because it was initially created as a part of a series of `AddressBook` projects (`Level 1`, `Level 2`, `Level 3` ...). -* For the detailed documentation of this project, see the **[Address Book Product Website](https://se-education.org/addressbook-level3)**. -* This project is a **part of the se-education.org** initiative. If you would like to contribute code to this project, see [se-education.org](https://se-education.org#https://se-education.org/#contributing) for more info. +Are you a CCA leader that has to keep track of multiple CCA members, tasks and upcoming deadlines but can't seem to remember everything? Well HEY MATEz is the solution for you! + +## About Us +Refer to the [About Us](https://github.com/AY2021S2-CS2103T-W14-3/tp/blob/master/docs/AboutUs.md) section + +## Developer Guide +Refer to the [Developer Guide](https://github.com/AY2021S2-CS2103T-W14-3/tp/blob/master/docs/DeveloperGuide.md) section + +## User Guide +Refer to the [User Guide](https://github.com/AY2021S2-CS2103T-W14-3/tp/blob/master/docs/UserGuide.md) section + +## Source Code +This project is based off the AddressBook-Level3 project created by the [SE-EDU initiative](https://se-education.org). diff --git a/build.gradle b/build.gradle index be2d2905dde..cdd8917bef1 100644 --- a/build.gradle +++ b/build.gradle @@ -6,7 +6,7 @@ plugins { id 'jacoco' } -mainClassName = 'seedu.address.Main' +mainClassName = 'seedu.heymatez.Main' sourceCompatibility = JavaVersion.VERSION_11 targetCompatibility = JavaVersion.VERSION_11 @@ -66,7 +66,11 @@ dependencies { } shadowJar { - archiveName = 'addressbook.jar' + archiveName = 'HEYMATEz.jar' +} + +run { + enableAssertions = true } defaultTasks 'clean', 'test' diff --git a/docs/AboutUs.md b/docs/AboutUs.md index 1c9514e966a..decb9fb7c89 100644 --- a/docs/AboutUs.md +++ b/docs/AboutUs.md @@ -5,55 +5,50 @@ title: About Us We are a team based in the [School of Computing, National University of Singapore](http://www.comp.nus.edu.sg). -You can reach us at the email `seer[at]comp.nus.edu.sg` +You can reach us at the respective emails: +* `dylan.ghee@u.nus.edu` +* `chee.erynne@u.nus.edu` +* `rachel.limjt@u.nus.edu` +* `e0424909@u.nus.edu` ## Project team -### John Doe +### Dylan Ghee Shao Kang - + -[[homepage](http://www.comp.nus.edu.sg/~damithch)] -[[github](https://github.com/johndoe)] -[[portfolio](team/johndoe.md)] - -* Role: Project Advisor - -### Jane Doe - - - -[[github](http://github.com/johndoe)] -[[portfolio](team/johndoe.md)] +[[github](https://github.com/zatkiller)] +[[portfolio](team/zatkiller.md)] * Role: Team Lead -* Responsibilities: UI +* Responsibilities: Project Management and Code Quality -### Johnny Doe +### Chee Erynne - + -[[github](http://github.com/johndoe)] [[portfolio](team/johndoe.md)] +[[github](http://github.com/cheeerynne)] +[[portfolio](team/cheeerynne.md)] -* Role: Developer -* Responsibilities: Data +* Role: Software Developer +* Responsibilities: Documentation, Testing -### Jean Doe +### Lim Jean Tong, Rachel - + -[[github](http://github.com/johndoe)] -[[portfolio](team/johndoe.md)] +[[github](http://github.com/rachelljt)] +[[portfolio](team/rachelljt.md)] -* Role: Developer -* Responsibilities: Dev Ops + Threading +* Role: Software Developer +* Responsibilities: UI -### James Doe +### Tasha Marion Wan hui lin - + -[[github](http://github.com/johndoe)] -[[portfolio](team/johndoe.md)] +[[github](https://github.com/tashawan23)] +[[portfolio](team/tashawan23.md)] -* Role: Developer -* Responsibilities: UI +* Role: Software Developer +* Responsibilities: Documentation, Integration diff --git a/docs/DeveloperGuide.md b/docs/DeveloperGuide.md index 4829fe43011..434b4a4f18d 100644 --- a/docs/DeveloperGuide.md +++ b/docs/DeveloperGuide.md @@ -2,17 +2,22 @@ layout: page title: Developer Guide --- +## Table of Contents * Table of Contents {:toc} -------------------------------------------------------------------------------------------------------------------- +
+ ## **Setting up, getting started** Refer to the guide [_Setting up and getting started_](SettingUp.md). -------------------------------------------------------------------------------------------------------------------- +
+ ## **Design** ### Architecture @@ -23,11 +28,12 @@ The ***Architecture Diagram*** given above explains the high-level design of the
-:bulb: **Tip:** The `.puml` files used to create diagrams in this document can be found in the [diagrams](https://github.com/se-edu/addressbook-level3/tree/master/docs/diagrams/) folder. Refer to the [_PlantUML Tutorial_ at se-edu/guides](https://se-education.org/guides/tutorials/plantUml.html) to learn how to create and edit diagrams. +:bulb: **Tip:** The `.puml` files used to create diagrams in this document can be found in the [diagrams](https://github.com/AY2021S2-CS2103T-W14-3/tp/tree/master/docs/diagrams) folder. Refer to the [_PlantUML Tutorial_ at se-edu/guides](https://se-education.org/guides/tutorials/plantUml.html) to learn how to create and edit diagrams.
-**`Main`** has two classes called [`Main`](https://github.com/se-edu/addressbook-level3/tree/master/src/main/java/seedu/address/Main.java) and [`MainApp`](https://github.com/se-edu/addressbook-level3/tree/master/src/main/java/seedu/address/MainApp.java). It is responsible for, +**`Main`** has two classes called [`Main`](https://github.com/AY2021S2-CS2103T-W14-3/tp/blob/master/src/main/java/seedu/heymatez/Main.java) +and [`MainApp`](https://github.com/AY2021S2-CS2103T-W14-3/tp/blob/master/src/main/java/seedu/heymatez/MainApp.java). It is responsible for, * At app launch: Initializes the components in the correct sequence, and connects them up with each other. * At shut down: Shuts down the components and invokes cleanup methods where necessary. @@ -51,175 +57,297 @@ For example, the `Logic` component (see the class diagram given below) defines i **How the architecture components interact with each other** -The *Sequence Diagram* below shows how the components interact with each other for the scenario where the user issues the command `delete 1`. +The *Sequence Diagram* below shows how the components interact with each other for the scenario where the user issues the command `deleteTask 1`. The sections below give more details of each component. +
+ ### UI component ![Structure of the UI Component](images/UiClassDiagram.png) **API** : -[`Ui.java`](https://github.com/se-edu/addressbook-level3/tree/master/src/main/java/seedu/address/ui/Ui.java) +[`Ui.java`](https://github.com/AY2021S2-CS2103T-W14-3/tp/blob/master/src/main/java/seedu/heymatez/ui/Ui.java) -The UI consists of a `MainWindow` that is made up of parts e.g.`CommandBox`, `ResultDisplay`, `PersonListPanel`, `StatusBarFooter` etc. All these, including the `MainWindow`, inherit from the abstract `UiPart` class. +The UI consists of a `MainWindow` that is made up of parts e.g.`CommandBox`, `ResultDisplay`, `PersonListPanel`, `TaskListPanel`, `StatusBarFooter` etc. All these, including the `MainWindow`, inherit from the abstract `UiPart` class. -The `UI` component uses JavaFx UI framework. The layout of these UI parts are defined in matching `.fxml` files that are in the `src/main/resources/view` folder. For example, the layout of the [`MainWindow`](https://github.com/se-edu/addressbook-level3/tree/master/src/main/java/seedu/address/ui/MainWindow.java) is specified in [`MainWindow.fxml`](https://github.com/se-edu/addressbook-level3/tree/master/src/main/resources/view/MainWindow.fxml) +The `UI` component uses JavaFx UI framework. The layout of these UI parts are defined in matching `.fxml` files that are in the `src/main/resources/view` folder. For example, the layout of the [`MainWindow`](https://github.com/AY2021S2-CS2103T-W14-3/tp/blob/master/src/main/java/seedu/heymatez/ui/MainWindow.java) is specified in [`MainWindow.fxml`](https://github.com/AY2021S2-CS2103T-W14-3/tp/blob/master/src/main/resources/view/MainWindow.fxml) The `UI` component, * Executes user commands using the `Logic` component. * Listens for changes to `Model` data so that the UI can be updated with the modified data. +
+ ### Logic component ![Structure of the Logic Component](images/LogicClassDiagram.png) **API** : -[`Logic.java`](https://github.com/se-edu/addressbook-level3/tree/master/src/main/java/seedu/address/logic/Logic.java) +[`Logic.java`](https://github.com/AY2021S2-CS2103T-W14-3/tp/blob/master/src/main/java/seedu/heymatez/logic/Logic.java) -1. `Logic` uses the `AddressBookParser` class to parse the user command. +1. `Logic` uses the `HeyMatezParser` class to parse the user command. 1. This results in a `Command` object which is executed by the `LogicManager`. -1. The command execution can affect the `Model` (e.g. adding a person). +1. The command execution can affect the `Model` (e.g. adding a task). 1. The result of the command execution is encapsulated as a `CommandResult` object which is passed back to the `Ui`. 1. In addition, the `CommandResult` object can also instruct the `Ui` to perform certain actions, such as displaying help to the user. -Given below is the Sequence Diagram for interactions within the `Logic` component for the `execute("delete 1")` API call. +Given below is the Sequence Diagram for interactions within the `Logic` component for the `execute("deleteTask 1")` API call. -![Interactions Inside the Logic Component for the `delete 1` Command](images/DeleteSequenceDiagram.png) +![Interactions Inside the Logic Component for the `deleteTask 1` Command](images/DeleteTaskSequenceDiagram.png) -
:information_source: **Note:** The lifeline for `DeleteCommandParser` should end at the destroy marker (X) but due to a limitation of PlantUML, the lifeline reaches the end of diagram. +
:information_source: **Note:** The lifeline for `DeleteTaskCommandParser` should end at the destroy marker (X) but due to a limitation of PlantUML, the lifeline reaches the end of diagram.
+
+ ### Model component ![Structure of the Model Component](images/ModelClassDiagram.png) -**API** : [`Model.java`](https://github.com/se-edu/addressbook-level3/tree/master/src/main/java/seedu/address/model/Model.java) +**API** : [`Model.java`](https://github.com/AY2021S2-CS2103T-W14-3/tp/blob/master/src/main/java/seedu/heymatez/model/Model.java) The `Model`, * stores a `UserPref` object that represents the user’s preferences. -* stores the address book data. -* exposes an unmodifiable `ObservableList` 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. +* stores the HEY MATEz data. +* exposes an unmodifiable `ObservableList` and `ObservableList` 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. - -
: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` object.
-![BetterModelClassDiagram](images/BetterModelClassDiagram.png) - -
- +
### Storage component ![Structure of the Storage Component](images/StorageClassDiagram.png) -**API** : [`Storage.java`](https://github.com/se-edu/addressbook-level3/tree/master/src/main/java/seedu/address/storage/Storage.java) +**API** : [`Storage.java`](https://github.com/AY2021S2-CS2103T-W14-3/tp/blob/master/src/main/java/seedu/heymatez/storage/Storage.java) The `Storage` component, * can save `UserPref` objects in json format and read it back. -* can save the address book data in json format and read it back. +* can save the HEY MATEz data in json format and read it back. ### Common classes -Classes used by multiple components are in the `seedu.addressbook.commons` package. +Classes used by multiple components are in the `seedu.heymatez.commons` package. -------------------------------------------------------------------------------------------------------------------- +
+ ## **Implementation** +This section documents some of the noteworthy details on how certain features are implemented -This section describes some noteworthy details on how certain features are implemented. +### Mark Task as completed / uncompleted feature -### \[Proposed\] Undo/redo feature +The implementation of the mark task as completed and uncompleted features are facilitated by the `DoneTaskCommand` and `UndoTaskCommand` +classes respectively, both of which extends from the Command abstract class. -#### Proposed Implementation +The execution of the command is also facilitated by the following Parser Classes: +* `DoneTaskCommandParser` +* `UndoTaskCommandParser` -The proposed undo/redo mechanism is facilitated by `VersionedAddressBook`. It extends `AddressBook` with an undo/redo history, stored internally as an `addressBookStateList` and `currentStatePointer`. Additionally, it implements the following operations: +The above mentioned Parser classes inherit the `#parse` method from the `Parser` interface. -* `VersionedAddressBook#commit()` — Saves the current address book state in its history. -* `VersionedAddressBook#undo()` — Restores the previous address book state from its history. -* `VersionedAddressBook#redo()` — Restores a previously undone address book state from its history. +* `DoneTaskCommandParser#parse` - checks if the arguments passed to the current DoneTaskCommand is valid and creates an DoneTaskCommand instance if it is. +* `UndoTaskCommandParser#parse` - checks if the arguments passed to the current UndoTaskCommand is valid and creates an UndoTaskCommand instance if it is. -These operations are exposed in the `Model` interface as `Model#commitAddressBook()`, `Model#undoAddressBook()` and `Model#redoAddressBook()` respectively. +Subsequently, the created `DoneTaskCommand` / `UndoTaskCommand` object contains an `#execute` method which is responsible for +updating the status of the task to `completed` or `uncompleted`. This is achieved by creating a new `Task` object with the +same fields and values but updating the `TaskStatus` field depending on which command is being executed. -Given below is an example usage scenario and how the undo/redo mechanism behaves at each step. +Below is the usage scenario and how the mark task as completed mechanism behaves. -Step 1. The user launches the application for the first time. The `VersionedAddressBook` will be initialized with the initial address book state, and the `currentStatePointer` pointing to that single address book state. +Assumptions: +1. User has already launched the app +2. HEY MATEz application has an existing task whose status is `uncompleted` -![UndoRedoState0](images/UndoRedoState0.png) +Step 1. User executes the `done 1` command to mark the task with index number 1 in the task list of HEY MATEz as `completed`. + A `DoneTaskCommandParser` object is created and it calls `DoneTaskCommandParser#parse` on the arguments given. -Step 2. The user executes `delete 5` command to delete the 5th person in the address book. The `delete` command calls `Model#commitAddressBook()`, causing the modified state of the address book after the `delete 5` command executes to be saved in the `addressBookStateList`, and the `currentStatePointer` is shifted to the newly inserted address book state. +Step 2. The `DoneTaskCommandParser#parse` method will check the validity of the argument given for a `DoneTaskCommand`. If it +is valid, it will create a new `DoneTaskCommand` instance by calling the constructor of `DoneTaskCommand`. -![UndoRedoState1](images/UndoRedoState1.png) +Step 3. The `DoneTaskCommand#execute` method is then called by the `LogicManager`. The task with the same `Index` is retrieved and +a copy of the task is created with the same attribute values. However, the `TaskStatus` value is updated to `completed`. The task copy +with the updated status replaces the old task in the `Model`. -Step 3. The user executes `add n/David …​` to add a new person. The `add` command also calls `Model#commitAddressBook()`, causing another modified address book state to be saved into the `addressBookStateList`. +Step 4. Once the execution is completed, the message `MESSAGE_DONE_TASK_SUCCESS` is used to return a new Command Result +with the attached message. -![UndoRedoState2](images/UndoRedoState2.png) +
-
:information_source: **Note:** If a command fails its execution, it will not call `Model#commitAddressBook()`, so the address book state will not be saved into the `addressBookStateList`. +Below is the sequence diagram to show how the mark task as completed mechanism works: +![#Interactions Inside the Logic Component for the `done 1` Command](images/DoneTaskSequenceDiagram.png) +
:information_source: **Note:** The lifeline for `DoneTaskCommandParser` and `DoneTaskCommand` should end at the destroy marker (X) +but due to the limitation of PlantUML, the lifeline reaches the end of the sequence diagram.
+
-Step 4. The user now decides that adding the person was a mistake, and decides to undo that action by executing the `undo` command. The `undo` command will call `Model#undoAddressBook()`, which will shift the `currentStatePointer` once to the left, pointing it to the previous address book state, and restores the address book to that state. +The following activity diagram summarizes what happens when a user executes the mark task as completed command: -![UndoRedoState3](images/UndoRedoState3.png) +![#Activity Diagram for Mark task as done](images/DoneTaskActivityDiagram.png) -
:information_source: **Note:** If the `currentStatePointer` is at index 0, pointing to the initial AddressBook state, then there are no previous AddressBook states to restore. The `undo` command uses `Model#canUndoAddressBook()` to check if this is the case. If so, it will return an error to the user rather -than attempting to perform the undo. +
-
+
+ +### Find Tasks with deadline before a selected date feature + +The implementation of the finding of tasks with deadlines before a selected date is facilitated by the `FindTasksBeforeCommand` +class, which extends from the Command abstract class. + +It is also facilitated by the following Parser Class: +* `FindTasksBeforeCommandParser` + +The above mentioned Parser class inherits the `#parse` method from the Parser interface. -The following sequence diagram shows how the undo operation works: +* `FindTasksBeforeParser#parse` - checks if the deadline passed to the current FindTasksBeforeCommand is in the correct format and is valid, then creates a FindTasksBeforeCommand instance if it is. -![UndoSequenceDiagram](images/UndoSequenceDiagram.png) -
:information_source: **Note:** The lifeline for `UndoCommand` should end at the destroy marker (X) but due to a limitation of PlantUML, the lifeline reaches the end of diagram. +Subsequently, the created `FindTasksBeforeCommand` object contains an `#execute` method which is responsible for +updating the task list to contain the tasks with deadlines before the selected date. This is achieved by calling on `Model#updateFilteredTaskList` +with the DeadlineBeforeDatePredicate which updates the task list with tasks that match the given predicate. +Below is the usage scenario and how the finding of tasks due before a selected date mechanism behaves. + +Assumptions: +1. User has already launched the app +2. HEY MATEz application has existing tasks with their corresponding deadlines + +Step 1. User executes the `findBefore 2021-04-04` command to show the tasks in the task list of HEY MATEz with deadlines before 2021-04-04. A +`FindTasksBeforeCommandParser` is created and it calls `FindTasksBeforeParser#parse` on the arguments + +Step 2. The `FindTasksBeforeCommandParser#parse` method will check the validity of the deadline argument for a `FindTasksBeforeCommand`. If it is +valid, it will create a new `FindTasksBeforeCommand` instance by calling the constructor with the DeadlineBeforeDatePredicate. + +Step 3. The `FindTasksBeforeCommand#execute` method is then called by the `LogicManager`. The tasks with deadline before 2021-04-04 are selected by the +DeadlineBeforeDatePredicate. + +Step 4. Once the execution is completed, the message `MESSAGE_TASKS_LISTED_OVERVIEW,` is used to return a new Command Result +with the attached message. + +Below is the sequence diagram: + +![#Interactions Inside the Logic Component for the `findBefore 2021-04-04` Command](images/FindBeforeSequenceDiagram.png) + +
:information_source: **Note:** The lifeline for `FindTasksBeforeCommandParser` and `FindTasksBeforeCommand` should end at the destroy marker (X) +but due to the limitation of PlantUML, the lifeline reaches the end of the sequence diagram.
+
+ +The following activity diagram summarizes what happens when a user executes the find tasks with deadline before a selected date command: + +![#Activity Diagram for find tasks due before a certain date](images/FindBeforeActivityDiagram.png) + +
+ +### Delete a Task feature + +The implementation of the delete a task feature is facilitated by the DeleteTaskCommand, which extends from the Command abstract class. + +It is also enabled by the following Parser class: +* `DeleteTaskCommandParser` + +The above mentioned Parser class inherits the `#parse method` from the Parser interface. -The `redo` command does the opposite — it calls `Model#redoAddressBook()`, which shifts the `currentStatePointer` once to the right, pointing to the previously undone state, and restores the address book to that state. +* `DeleteTaskCommandParser#parse` - checks if the arguments passed to the current DeleteTaskCommand is valid. + If the arguments are valid, it creates a DeleteTaskCommand instance. -
:information_source: **Note:** If the `currentStatePointer` is at index `addressBookStateList.size() - 1`, pointing to the latest address book state, then there are no undone AddressBook states to restore. The `redo` command uses `Model#canRedoAddressBook()` to check if this is the case. If so, it will return an error to the user rather than attempting to perform the redo. +Subsequently, the created `DeleteTaskCommand` object contains an `#execute` method which +is responsible for deleting the given Task with respect to the index. This is achieved by calling on +`Model#deleteTask` with the task to be deleted where it will be removed from the list of tasks. +Below is the usage scenario of how delete task mechanism behaves. + +Assumptions: +1. User has already launched the app +2. HEY MATEz application has an existing task + +Step 1. User executes the `deleteTask 1` command to delete the task at the 1st index in the task list of HEY MATEz. +A `DeleteTaskCommandParser` object is created and calls the `DeleteTaskCommandParser#parse` on the arguments. + +Step 2. The `DeleteTaskCommandParser#parse` method then checks on the validity of the arguments given for a `DeleteTaskCommand`. +If it is valid, it will create a new `DeleteTaskCommand` instance by calling the constructor along with the task `Index`. + +Step 3. The `DeleteTaskCommand#execute` method is then called by `Logic Manager`. The task with the same `Index` is retrieved +and deleted from the task list when `Model#deleteTask` is called. + +Step 4. Once the execution is completed, the message `MESSAGE_DELETE_TASK_SUCCESS` is used to return a +new Command Result with the attached message. + +Below is the sequence diagram: + +![#Interactions Inside the Logic Component for the `deleteTask 1` Command](images/DeleteTaskSequenceDiagram.png) + +
:information_source: **Note:** The lifeline for `DeleteTaskCommandParser` and `DeleteTaskCommand` should end at the destroy marker (X) +but due to the limitation of PlantUML, the lifeline reaches the end of the sequence diagram.
+
-Step 5. The user then decides to execute the command `list`. Commands that do not modify the address book, such as `list`, will usually not call `Model#commitAddressBook()`, `Model#undoAddressBook()` or `Model#redoAddressBook()`. Thus, the `addressBookStateList` remains unchanged. +The following activity diagram below summarizes what happens when a user executes the `deleteTask` command: -![UndoRedoState4](images/UndoRedoState4.png) +![#Activity Diagram for Delete Task](images/DeleteTaskActivityDiagram.png) -Step 6. The user executes `clear`, which calls `Model#commitAddressBook()`. Since the `currentStatePointer` is not pointing at the end of the `addressBookStateList`, all address book states after the `currentStatePointer` will be purged. Reason: It no longer makes sense to redo the `add n/David …​` command. This is the behavior that most modern desktop applications follow. +
-![UndoRedoState5](images/UndoRedoState5.png) +### Clear all assignees of a Task feature -The following activity diagram summarizes what happens when a user executes a new command: +The implementation of the clear all assignees of a task feature is facilitated by the `ClearAssigneeCommand` +class which extends from the Command abstract class. -![CommitActivityDiagram](images/CommitActivityDiagram.png) +It is also facilitated by the following Parser Classes: +* `ClearAssigneesCommandParser` -#### Design consideration: +The above mentioned Parser class inherits the `#parse` method from the Parser interface. -##### Aspect: How undo & redo executes +* `ClearAssigneesCommandParser#parse` - checks if the arguments passed to the current ClearAssigneeCommand is valid. + If the arguments are valid, it creates a ClearAssigneeCommand instance. -* **Alternative 1 (current choice):** Saves the entire address book. - * Pros: Easy to implement. - * Cons: May have performance issues in terms of memory usage. +Subsequently, the created `ClearAssigneeCommand` object contains an `#execute` method which is responsible for +clearing all assignees of the given task, with respect to its index. This is achieved by creating a new +`Task` object with the same fields and values as before but with the assignees field set to be a new empty HashSet. -* **Alternative 2:** Individual command knows how to undo/redo by - itself. - * Pros: Will use less memory (e.g. for `delete`, just save the person being deleted). - * Cons: We must ensure that the implementation of each individual command are correct. +Below is the usage scenario of how the clear all assignees of a task mechanism behaves. -_{more aspects and alternatives to be added}_ +Assumptions: +1. User has already launched the app +2. HEY MATEz application has an existing task with **assignees** -### \[Proposed\] Data archiving +Step 1. User executes the `clearAssignees 1` command to clear all the assignees of the task at index 1 in the task list of +HEY MATEz. A ` ClearAssigneesCommandParser` object is created and it calls `ClearAssigneesCommandParser#parse` on the arguments. + +Step 2. The `ClearAssigneesCommandParser#parse` method will check on the validity of the arguments given for a `ClearAssigneesCommand`. +If it is valid, it will create a new `ClearAssigneesCommand` instance by calling the constructor of `ClearAssigneesCommand`. + +Step 3. The `ClearAssigneesCommand#execute` method is then called by the `LogicManager`. The task with the same `Index` +is retrieved and a copy of the task is created with the same attribute values but with the assignees field updated to be a +new empty HashSet. The copy of the task with the updated assignees field replaces the old task in the `Model`. + +Step 4. Once the execution is completed, the message `MESSAGE_CLEARED_ASSIGNEES_SUCCESS` is used to return a new Command Result +with the attached message. + +The following sequence diagram shows how the clear all assignees of a task mechanism works: + +![#Interactions Inside the Logic Component for the `clearAssignees 1` Command](images/ClearAssigneeSequenceDiagram.png) + +
:information_source: **Note:** The lifeline for `ClearAssigneesCommandParser` and `ClearAssigneesCommand` should end at the destroy marker (X) +but due to the limitation of PlantUML, the lifeline reaches the end of the sequence diagram. +
+
-_{Explain here how the data archiving feature will be implemented}_ +The following activity diagram summarizes what happens when a user executes the `clearAssignees` command: +![#Activity Diagram for the clearAssignees command](images/ClearAssigneesActivityDiagram.png) -------------------------------------------------------------------------------------------------------------------- +
+ ## **Documentation, logging, testing, configuration, dev-ops** * [Documentation guide](Documentation.md) @@ -230,19 +358,20 @@ _{Explain here how the data archiving feature will be implemented}_ -------------------------------------------------------------------------------------------------------------------- +
+ ## **Appendix: Requirements** ### Product scope **Target user profile**: -* has a need to manage a significant number of contacts -* prefer desktop apps over other types -* can type fast -* prefers typing to mouse interactions -* is reasonably comfortable using CLI apps +* CCA / Club head who is managing many members and tasks +* Needs an efficient and organised method to assign tasks to these members +* Prefer desktop apps over other types +* Prefers typing to mouse interactions -**Value proposition**: manage contacts faster than a typical mouse/GUI driven app +**Value proposition**: Manage the members and tasks of a club quickly and efficiently. ### User stories @@ -251,106 +380,651 @@ Priorities: High (must have) - `* * *`, Medium (nice to have) - `* *`, Low (unli | Priority | As a …​ | I want to …​ | So that I can…​ | | -------- | ------------------------------------------ | ------------------------------ | ---------------------------------------------------------------------- | -| `* * *` | new user | see usage instructions | refer to instructions when I forget how to use the App | -| `* * *` | user | add a new person | | -| `* * *` | user | delete a person | remove entries that I no longer need | -| `* * *` | user | find a person by name | locate details of persons without having to go through the entire list | -| `* *` | user | hide private contact details | minimize chance of someone else seeing them by accident | -| `*` | user with many persons in the address book | sort persons by name | locate a person easily | - -*{More to be added}* +| `* * *` | user starting to use the app| be able to add in the contacts of my CCA members | have a better overview of the members in my CCA and access their information easily| +| `* * *` | forgetful CCA leader | be able to view who have been added into my contacts | retrieve their information and add the remaining members too | +| `* * *` | CCA leader with many tasks to be done | be able to add the tasks of our CCA | better manage the tasks | +| `* * *` | CCA leader whose tasks' details need to be updated constantly | be able to edit the details of the tasks accordingly | keep the tasks' details updated | +| `* * *` | CCA leader with tasks that are no longer relevant | be able to delete tasks that are either completed or unnecessary | keep the list organized and clear | +| `* * *` | CCA leader with projects and tasks piling up | be able to view a list of tasks that is to be completed by members of the CCA | be updated with what needs to be done | +| `* * *` | CCA leader who has members leaving the CCA | be able to remove details of the members from the application | better manage my members | +| `* * *` | CCA leader whose members’ details have changed | be able to edit the details of the members in the application | keep my contacts up-to-date | +| `* * *` | CCA leader with many deadlines to meet | be able to set deadlines for specific tasks | keep track of the tasks' deadlines | +| `* * *` | CCA leader with tasks to be distributed | be able to assign tasks to students | track the distribution of tasks to certain members| +| `* * ` | CCA leader with tasks that are being completed every other week | be able to mark tasks as ‘completed’ | track which tasks are completed | +| `* * ` | CCA leader | be able to change the assignee of a task | easily update the member assigned to the task | +| `* * ` | CCA leader | be able to assign a priority to a task | take note of the tasks that are more important and need to be completed first | +| `* * ` | CCA leader who has many tasks to supervise | be able to search for tasks of a certain priority | better manage tasks of different priorities | +| `* * ` | CCA leader whose members have different roles | be able to assign roles to the members | be aware of the members' roles | +| `* * ` | CCA leader whose members have different roles | be able to edit the roles to the members | update the members' roles when there is a change in their roles | +| `* ` | CCA leader who is very forgetful | be notified if I have accidentally added duplicate tasks | prevent repeated tasks from being added | +| `* ` | CCA leader who has a lot of tasks to manage | search for tasks which contain a particular word | find tasks more efficiently and quickly | +| `* ` | forgetful CCA leader who has forgotten which tasks have not been assigned | be able to get a list of tasks that have not been assigned | distribute tasks more efficiently | +| `* ` | CCA leader | be able to get a list of tasks that have not been completed | check on the progress of the tasks | +| `* ` | CCA leader | be able to get a list of tasks with deadlines that are prior to a certain date | make sure I do not miss those deadlines | +| `* ` | CCA leader | be able to get a list of tasks assigned to a particular member | check on the workload of a particular member | + +
### Use cases -(For all use cases below, the **System** is the `AddressBook` and the **Actor** is the `user`, unless specified otherwise) +(For all use cases below, the **System** is the `HEY MATEz` and the **Actor** is the `user`, unless specified otherwise) -**Use case: Delete a person** +:pencil2: **Use case: UC01 - Add a Member** **MSS** -1. User requests to list persons -2. AddressBook shows a list of persons -3. User requests to delete a specific person in the list -4. AddressBook deletes the person +1. User requests to add a member +2. HEY MATEz adds the member to the list of members - Use case ends. +Use case ends. **Extensions** -* 2a. The list is empty. +* 1a. Member already exists (Matching Name) in the list + * 1a1. HEY MATEz shows an error message +* 1b. The name, phone number, email or role provided for the member is invalid + * 1b1. HEY MATEz shows an error message + +Use case ends. - Use case ends. +:pencil2: **Use case: UC02 - View Members** -* 3a. The given index is invalid. +**MSS** - * 3a1. AddressBook shows an error message. +1. User requests to view the members +2. HEY MATEz lists the members and their details + +Use case ends. - Use case resumes at step 2. +:pencil2: **Use case: UC03 - Delete a Member** -*{More to be added}* +**MSS** -### Non-Functional Requirements +1. User requests to delete a member by specifying the member's name +2. HEY MATEz searches for the member's name in the currently displayed list of members +3. HEY MATEz deletes the specified member from the members list + +Use case ends. -1. Should work on any _mainstream OS_ as long as it has Java `11` or above installed. -2. Should be able to hold up to 1000 persons without a noticeable sluggishness in performance for typical usage. -3. A user with above average typing speed for regular English text (i.e. not code, not system admin commands) should be able to accomplish most of the tasks faster using commands than using the mouse. +**Extensions** -*{More to be added}* +* 2a. Member name provided by user does not exist in the currently displayed list of members + * 2a1. HEY MATEz shows an error message + +Use case ends. -### Glossary +:pencil2: **Use case: UC04 -Edit Member's details** + +**MSS** + +1. User requests to edit the details of a member by specifying the member's name +2. HEY MATEz searches for the member's name in the currently displayed list of members +3. HEY MATEz edits the corresponding member with the new details + +Use case ends. + +**Extensions** + +* 1a. The new name, phone number, email or role provided for the member is invalid + * 1a1. HEY MATEz shows an error message +* 2a. Member name provided by user does not exist in the currently displayed list of members + * 2a1. HEY MATEz shows an error message + +Use case ends. +:pencil2: **Use case: UC05 - Find Members with keywords** + +**MSS** + +1. User requests to find members using the keywords specified +2. HEY MATEz searches through each member's details (i.e. name, phone number, email, role) +3. HEY MATEz lists members whose details matches any of the keywords + +Use case ends. + +:pencil2: **Use case: UC06 - Add a Task** + +**MSS** + +1. User requests to add a task +2. HEY MATEz adds the task to the task list + +Use case ends. + +**Extensions** + +* 1a. Task already exists (Matching Title) in the list + * 1a1. HEY MATEz shows an error message +* 1b. The title, description, deadline, status or priority provided for the task is invalid + * 1b1. HEY MATEz shows an error message + +Use case ends. + +:pencil2: **Use case: UC07 - View Tasks** + +**MSS** + +1. User requests to view the list of tasks +2. HEY MATEz lists all the tasks along with its details + +Use case ends. + +:pencil2: **Use case: UC08 - Delete a Task** + +**MSS** + +Similar to deleting a member (UC03) but user specifies task index instead of name + +**Extensions** + +* 2a. Task index does not exist in the current displayed list of tasks + * 2a1. HEY MATEz shows an error message + +Use case ends. + +:pencil2: **Use case: UC09 - Edit a Task** + +**MSS** + +Similar to editing a member (UC04) except that the user specifies task index instead of name + +**Extensions** + +* 1a. The new title, description, deadline, status or priority provided for the task is invalid + * 1a1. HEY MATEz shows an error message +* 2a. Task index does not exist in the currently displayed list of tasks + * 2a1. HEY MATEz shows an error message + +Use case ends. + +:pencil2: **Use case: UC10 - Find Tasks with keywords** + +**MSS** + +Similar to finding members with keywords (UC05) except that HEY MATEz +lists tasks with its title or description matching any of the keywords specified + +:pencil2: **Use case: Find tasks with deadline before a specified date** + +**MSS** + +1. User requests to find tasks which deadlines before their specified date +2. HEY MATEz searches through tasks' deadline +3. HEY MATEz lists tasks with deadlines before the specified date + +Use case ends. + +Extensions +* 1a. The deadline provided by user is not in the correct format or is invalid + * 1a1. HEY MATEz shows an error message + +Use case ends. + +:pencil2: **Use case: UC11 - Find Tasks with Priority** + +**MSS** + +1. User requests to find tasks of a certain priority +2. HEY MATEz searches through each task +3. HEY MATEz lists tasks with a matching priority + +Use case ends. + +**Extensions** +* 1a. The priority input provided by the user is not a valid priority + * 1a1. HEY MATEz shows an error message + +Use case ends. + +:pencil2: **Use case: UC12 - Mark a Task as Completed** + +**MSS** + +1. User requests to mark a task as completed using the task's index +2. HEY MATEz searches for the task index +3. HEY MATEz changes the status of the task in the list to **completed** + +Use case ends. + +**Extensions** +* 2a. Task index does not exist in the currently displayed list of tasks + * 2a1. HEY MATEz shows an error message +* 3a. The task has a status of **completed** + * 3a1. HEY MATEz shows an error message + +Use case ends. + +:pencil2: **Use case: UC13 - Mark a Task as Uncompleted** + +**MSS** + +1. User requests to mark a task as uncompleted using the task's index +2. HEY MATEz searches for the task index +3. HEY MATEz changes the status of the task in the list to **uncompleted** + +Use case ends. + +**Extensions** +* 2a. Task index does not exist in the currently displayed list of tasks + * 2a1. HEY MATEz shows an error message +* 3a. The task has a status of **uncompleted** + * 3a1. HEY MATEz shows an error message + +Use case ends. + +:pencil2: **Use case: UC14 - Clear all Members Assigned to a Task** + +**MSS** + +1. User requests to clear all assignees from a task using the task's index +2. HEY MATEz searches for the task index +3. HEY MATEz clears all members assigned to the task + +**Extensions** +* 2a. Task index does not exist in the currently displayed list of tasks + * 2a1. HEY MATEz shows an error message +* 2b. No members assigned to the task + * 2b1. HEY MATEz shows a 'nothing to clear' message + +Use case ends. + +:pencil2: **Use case: UC15 - View Uncompleted Tasks** + +**MSS** + +1. User requests to view the list of uncompleted tasks +2. HEY MATEz lists the uncompleted tasks + +Use case ends. + +:pencil2: **Use case: UC16 - View Unassigned Tasks** + +**MSS** + +Similar to viewing a list of uncompleted tasks (UC15) but a list of unassigned task is displayed instead. + +:pencil2: **Use case: UC17 - Find all Tasks assigned to a particular Member** + +**MSS** + +1. User requests to find tasks assigned to a member using the member's name +2. HEY MATEz searches through each task and checks the assignees of the task +3. HEY MATEz lists tasks which has the specified name as an assignee + +Use case ends. + + +### Non-Functional Requirements +1. Should work on any _mainstream OS_ as long as it has Java `11` or above installed. +2. Should be able to hold up to 100 members and tasks without a noticeable sluggishness in performance for typical usage. +3. Application data should be saved locally. +4. Application should be able to run normally without an internet connection. + +### Glossary * **Mainstream OS**: Windows, Linux, Unix, OS-X -* **Private contact detail**: A contact detail that is not meant to be shared with others +* **CCA**: Co-curricular activities +* **CCA / Club head**: A person who has a position in a Club / CCA and is required to manage the tasks and members within the club -------------------------------------------------------------------------------------------------------------------- +
+ ## **Appendix: Instructions for manual testing** Given below are instructions to test the app manually.
:information_source: **Note:** These instructions only provide a starting point for testers to work on; testers are expected to do more *exploratory* testing. -
-### Launch and shutdown +### Launch and Shutdown 1. Initial launch - 1. Download the jar file and copy into an empty folder + 1. Download the jar file and copy into an empty folder. - 1. Double-click the jar file Expected: Shows the GUI with a set of sample contacts. The window size may not be optimum. + 2. Double-click the jar file Expected: Shows the GUI with a set of sample contacts and tasks. The window size may not be optimum. -1. Saving window preferences +2. Saving window preferences 1. Resize the window to an optimum size. Move the window to a different location. Close the window. - 1. Re-launch the app by double-clicking the jar file.
+ 2. Re-launch the app by double-clicking the jar file.
Expected: The most recent window size and location is retained. -1. _{ more test cases …​ }_ +3. Shutting down + 1. Launch the help window using the `help` command. + + 2. Close the app using the `exit` command.
+ Expected: Both the help and main window should be closed. + +### Adding a member + +1. Adding a member + + 1. Prerequisites: No duplicate members exist. + + 1. Test case: `addMember Alice p/12345678 e/Alice@gmail.com`
+ Expected: Member is successfully added, with the details of the member displayed in the status bar. + + 1. Test case: `addMember Bryan p/45678910 e/Bryan@gmail.com r/President`
+ Expected: Member is successfully added, with the details of the member displayed in the status bar. + + 1. Test case: `addMember Charlie p/12345678 e/Charlie.com `
+ Expected: No member is added since the email given is invalid. Error details shown in the status bar. + + 1. Test case: `addMember Charlie p/12 e/Charlie@gmail.com`
+ Expected: No member is added since the phone number given is invalid. Error details shown in the status bar. + + 1. Other incorrect commands to try: `addMember`, `addMember Alice`, `addMember Alice p/12345678`, `addMember Alice e/Alice@gmail.com`
+ Expected: Similar to previous test case. + +
+ +### Viewing Members + +1. Viewing all members + + 1. Test case: `viewMembers`
+ Expected: Lists all members within HEY MATEz. + +### Deleting a Member + +1. Deleting a member + + 1. Prerequisites: List all members using the `viewMembers` command. A member with the name of 'Rachel' exists in the members list + while no members with the name of 'John' exists. + + 2. Test case: `deleteMember Rachel`
+ Expected: Member with the name 'Rachel' is deleted from the members list. Details of the deleted member is shown in the + status message. + + 3. Test case: `deleteMember John`
+ Expected: No member is deleted. Error details is shown in the status message. + + 4. Other incorrect delete commands to try: `delete`, `deleteMember x` (where x is a name which does not exist in the members list)
+ Expected: Similar to previous test case. + +### Editing a Member + +1. Editing a member + + 1. Prerequisites: List all members using the `viewMembers` command. Members with the name of 'Alice' and 'Timothy' exists + in the members list while no members with the name of 'Dylan' exists. + + 2. Test case: `editMember Alice n/Allyson`
+ Expected: Member with the name 'Alice' is edited to have a new name of 'Allyson'. Details of the edited member is shown + in the status message. + + 3. Test case: `editMember Alice n/Timothy`
+ Expected: No member is edited since a member with the name 'Timothy' already exists. Error details is shown in the status + message. + + 4. Test case: `editMember Alice n/Alice Tan p/98887777 e/aliceTan@gmail.com` + Expected: Member with the name 'Alice' is edited to have the new details as specified. Details of the edited member is shown + in the status message. + + 5. Test case: `editMember Dylan`
+ Expected: No member is edited. Error details is shown in the status message. + + 6. Other incorrect delete commands to try: `edit`, `editMember x` (where x is a name which does not exist in the members list)
+ Expected: Similar to previous test case. + +
+ +### Finding Members by keywords + +1. Finding members whose details (i.e. name, phone number, email, role) contain any of the specified keywords + + 1. Prerequisites: HEY MATEz contains 2 members with the following details:
+ * 1. Name: Alice, Phone Number: 98887777, Email: alice@gmail.com, Role: Secretary + * 2. Name: Bryan, Phone Number: 89996666, Email: bryan@gmail.com, Role: Secretary
+ + 2. Test case: `findMembers Alice`
+ Expected: Alice is listed in the members list. + + 3. Test case: `findMembers alice@gmail.com 89996666`
+ Expected: Both Alice and Bryan are listed in the members list. + + 4. Test case: `findMembers secretary`
+ Expected: Both Alice and Bryan are listed in the members list since keywords specified are case-insensitive. + + 5. Test case: `findMembers President`
+ Expected: Both Alice and Bryan are not listed since none of their details matches the specified keyword. + + 6. Test case: `findMembers`
+ Expected: Invalid command format, error details is shown in the status message. + + +### Add a Task + +1. Adding a task + + 1. Prerequisites: No duplicate tasks with same title exists. + + 1. Test case: `addTask Book Rooms d/Book seminar rooms for exco meeting b/2021-05-04`
+ Expected: Task is successfully added, with the details of the task displayed in the status bar. + + 1. Test case: `addTask Book Rooms d/Book seminar rooms for exco meeting b/2021-05-04 p/high`
+ Expected: Task is successfully added, with the details of the task displayed in the status bar. + + 1. Test case: `addTask Book Rooms d/Book seminar rooms for exco meeting b/2021-05-04 s/completed p/high`
+ Expected: Task is successfully added, with the details of the task displayed in the status bar. + + 1. Test case: `addTask CCA roster d/Plan roster for May b/2021/04/21`
+ Expected: No task is added since the deadline format is incorrect. Error details shown in the status bar. + + 1. Test case: `addTask CCA roster d/Plan roster for May b/2021-13-21`
+ Expected: No task is added since the deadline provided is invalid. Error details shown in the status bar. + + 1. Test case: `addTask CCA roster d/Plan roster for May b/2021-05-21 p/HIGH`
+ Expected: No task is added since the priority provided is invalid. Error details shown in the status bar. + + 1. Other incorrect commands to try: `addTask`, `addTask Roster`, `addTask Roster d/Plan roster`
+ Expected: No task is added since compulsory fields are not provided. Error details shown in the status bar. + +
+ +### Editing a Task + +1. Editing a task + + 1. Prerequisites: List all tasks using the `viewTasks` command. Tasks with the title of 'Meeting' and 'Draft roster' exist + in the task list with the index of 1 and 2 while no task with the title of 'Plan meeting' exists. + + 2. Test case: `editTask 1 n/Plan meeting`
+ Expected: Task with index 1 in the task list is edited to have a new title of 'Plan meeting'. Details of the edited task is shown + in the status message. + + 3. Test case: `editTask 1 n/Plan meeting d/Plan board meeting b/2021-04-04`
+ Expected: Task with index 1 in the task list is edited to have the new details as specified. Details of the edited task is shown + in the status message. + + 4. Test case: `editTask 1 n/Draft roster` + Expected: No task is edited since a task with the same title already exists. Error details is shown in the status message. + + 5. Test case: `editTask 1`
+ Expected: No Task is edited since none of the optional fields are provided. Error details is shown in the status message. + + 6. Other incorrect delete commands to try: `edit`, `editTask 0`, `editTask -1`
+ Expected: Similar to previous test case. + + +### Viewing Tasks + +1. Viewing all tasks + + 1. Test case: `viewTasks`
+ Expected: Lists all tasks within the HEY MATEz. + +### Deleting a Task + +1. Deleting a Task + + 1. Prerequisites: List all tasks using the `viewTasks` command. 3 different tasks in the list. + All 3 tasks have different indexes(1, 2, 3). + + 2. Test case: `deleteTask 1`
+ Expected: Task with the index `1` is deleted from the list. Details of the deleted task shown in the status message. + + 3. Test case: `deleteTask 4`
+ Expected: No task is deleted. Error details shown in the status message. + + 4. Other incorrect commands to try: `deleteTask`, `deleteTask abc`, `deleteTask -1`
+ Expected: Similar to previous test case. + +
+ +### Marking a Task as completed + +1. Marking a task as completed + + 1. Prerequisites: List all tasks with the `viewTasks` command. There exists a task at index 1 whose task status + is uncompleted. There also exists a task at index 2 whose task status is completed. + + 1. Test case: `done 1`
+ Expected: Status of task at index 1 is updated to completed. Successful task status update message is shown in the status bar. + + 1. Test case: `done 0`
+ Expected: No task marked as completed. Error details is shown in the status bar. + + 1. Test case: `done 2`
+ Expected: Since the task already has a status of completed, an error message is shown in the status bar. + + 1. Other incorrect commands to try: `done`, `done -1`
+ Expected: Similar to previous test case. + +### Marking a Task as uncompleted + +1. Marking a task as uncompleted + + 1. Prerequisites: List all tasks with the `viewTasks` command. There exists a task at index 1 whose task status + is completed. There also exists a task at index 2 whose task status is uncompleted. + + 1. Test case: `undo 1`
+ Expected: Status of task at index 1 is updated to uncompleted. Successful task status update message is shown in the status bar. + + 1. Test case: `undo 0`
+ Expected: No task marked as uncompleted. Error details is shown in the status bar. + + 1. Test case: `undo 2`
+ Expected: Since the task already has a status of uncompleted, an error message is shown in the status bar. + + 1. Other incorrect commands to try: `undo`, `undo -1`
+ Expected: Similar to previous test case. + +### Viewing a list of unassigned Tasks + +1. Viewing all unassigned tasks + + 1. Test case: `viewUnassignedTasks`
+ Expected: Lists all tasks that are unassigned within the HEY MATEz. + +### Viewing a list of uncompleted Tasks + +1. Viewing all uncompleted tasks + + 1. Test case: `viewUncompletedTasks`
+ Expected: Lists all tasks that are uncompleted within the HEY MATEz. + +
+ +### Finding Tasks by priority + +1. Finding tasks by priority + + 1. Test case: `findPriority high`
+ Expected: Lists all tasks within HEY MATEz whose priority is **high**. + + 1. Test case: `findPriority medium`
+ Expected: Lists all tasks within HEY MATEz whose priority is **medium**. + + 1. Test case: `findPriority low`
+ Expected: Lists all tasks within HEY MATEz whose priority is **low**. + + 1. Test case: `findPriority unassigned`
+ Expected: Lists all tasks within HEY MATEz whose priority is **unassigned**. + + 1. Test case: `findPriority unsure`
+ Expected: Error message displayed in the status bar. + + 1. Test case: `findPriority HIGH`
+ Expected: Error message displayed in the status bar. + + 1. Other incorrect commands to try: `findPriority, findPriority LOW`, `findPriority MeDIum`, etc.
+ Expected: Similar to previous test case. + +### Finding Tasks due before a certain date + +1. Finding all tasks with deadlines before the provided date + + 1. Test case: `findBefore 2021-05-04`
+ Expected: Lists all tasks within HEY MATEz whose deadline is before 2021-05-04. + + 1. Test case: `findBefore 2021/05/04`
+ Expected: Error occurred since the deadline provided is not in the correct format. Error details is shown in the status bar. + + 1. Test case: `findBefore 2021-13-12`
+ Expected: Error occurred since the deadline provided is invalid. Error details is shown in the status bar. + + 1. Other incorrect commands to try: `findBefore`, `findBefore 2021-03/21`, etc.
+ Expected: Similar to previous test case. + + +### Finding Tasks assigned to a member + +1. Finding all tasks assigned to a member + + 1. Prerequisites: There exists a member with the name of Alice and a task assigned to Alice within HEY MATEz. + + 1. Test case: `findTasksFor Alice`
+ Expected: Lists the task which is assigned to Alice. + + 1. Test case: `findTasksFor`
+ Expected: Error message displayed in the status bar. + +
+ +### Finding Tasks by keywords -### Deleting a person +1. Finding all tasks whose title or description contain any of the specified keywords -1. Deleting a person while all persons are being shown + 1. Prerequisites: HEY MATEz contains 2 tasks, T1 and T2, with the following details:
+ * T1. Title: Community outreach proposal, Description: Write detailed proposal for MINDS outreach + * T2. Title: Proposal for EXCO event, Description: Plan and discuss timeline
+ + 2. Test case: `findTasks Community`
+ Expected: Task T1 is listed in the task list. - 1. Prerequisites: List all persons using the `list` command. Multiple persons in the list. + 3. Test case: `findTasks Community EXCO`
+ Expected: Both task T1 and T2 are listed in the task list. - 1. Test case: `delete 1`
- Expected: First contact is deleted from the list. Details of the deleted contact shown in the status message. Timestamp in the status bar is updated. + 4. Test case: `findTasks proposal`
+ Expected: Both task T1 and T2 are listed in the task list since keywords specified are case-insensitive. - 1. Test case: `delete 0`
- Expected: No person is deleted. Error details shown in the status message. Status bar remains the same. + 5. Test case: `findTasks Pitch`
+ Expected: Both task T1 and T2 are not listed since their title and description does not contain the specified keyword. + + 6. Test case: `findTasks`
+ Expected: Invalid command format, error details is shown in the status message. - 1. Other incorrect delete commands to try: `delete`, `delete x`, `...` (where x is larger than the list size)
- Expected: Similar to previous. +### Clearing all assignees of a Task -1. _{ more test cases …​ }_ +1. Clearing all Assignees of a Task -### Saving data + 1. Prerequisites: List all tasks using the `viewTasks` command. There exists a task at index 1 with at least 1 member + assigned to it. -1. Dealing with missing/corrupted data files + 2. Test case: `clearAssignees 1`
+ Expected: All members assigned to the task at index 1 is cleared. Details of the task being cleared is shown + in the status message. + + 3. Test case: `clearAssignees 0`
+ Expected: No task is being cleared. Error details is shown in the status bar. - 1. _{explain how to simulate a missing/corrupted file, and the expected behavior}_ + 1. Other incorrect commands to try: `clearAssignees`, `clearAssignees -1`
+ Expected: Similar to previous test case. -1. _{ more test cases …​ }_ + + + diff --git a/docs/Gemfile.lock b/docs/Gemfile.lock index 4caff5b900c..36e9e768be4 100644 --- a/docs/Gemfile.lock +++ b/docs/Gemfile.lock @@ -49,7 +49,7 @@ GEM jekyll-relative-links (= 0.6.1) jekyll-remote-theme (= 0.4.1) jekyll-sass-converter (= 1.5.2) - jekyll-seo-tag (= 2.6.1) + jekyll-seo-assignee (= 2.6.1) jekyll-sitemap (= 1.4.0) jekyll-swiss (= 1.0.0) jekyll-theme-architect (= 0.1.1) @@ -138,51 +138,51 @@ GEM rubyzip (>= 1.3.0) jekyll-sass-converter (1.5.2) sass (~> 3.4) - jekyll-seo-tag (2.6.1) + jekyll-seo-assignee (2.6.1) jekyll (>= 3.3, < 5.0) jekyll-sitemap (1.4.0) jekyll (>= 3.7, < 5.0) jekyll-swiss (1.0.0) jekyll-theme-architect (0.1.1) jekyll (~> 3.5) - jekyll-seo-tag (~> 2.0) + jekyll-seo-assignee (~> 2.0) jekyll-theme-cayman (0.1.1) jekyll (~> 3.5) - jekyll-seo-tag (~> 2.0) + jekyll-seo-assignee (~> 2.0) jekyll-theme-dinky (0.1.1) jekyll (~> 3.5) - jekyll-seo-tag (~> 2.0) + jekyll-seo-assignee (~> 2.0) jekyll-theme-hacker (0.1.1) jekyll (~> 3.5) - jekyll-seo-tag (~> 2.0) + jekyll-seo-assignee (~> 2.0) jekyll-theme-leap-day (0.1.1) jekyll (~> 3.5) - jekyll-seo-tag (~> 2.0) + jekyll-seo-assignee (~> 2.0) jekyll-theme-merlot (0.1.1) jekyll (~> 3.5) - jekyll-seo-tag (~> 2.0) + jekyll-seo-assignee (~> 2.0) jekyll-theme-midnight (0.1.1) jekyll (~> 3.5) - jekyll-seo-tag (~> 2.0) + jekyll-seo-assignee (~> 2.0) jekyll-theme-minimal (0.1.1) jekyll (~> 3.5) - jekyll-seo-tag (~> 2.0) + jekyll-seo-assignee (~> 2.0) jekyll-theme-modernist (0.1.1) jekyll (~> 3.5) - jekyll-seo-tag (~> 2.0) + jekyll-seo-assignee (~> 2.0) jekyll-theme-primer (0.5.4) jekyll (> 3.5, < 5.0) jekyll-github-metadata (~> 2.9) - jekyll-seo-tag (~> 2.0) + jekyll-seo-assignee (~> 2.0) jekyll-theme-slate (0.1.1) jekyll (~> 3.5) - jekyll-seo-tag (~> 2.0) + jekyll-seo-assignee (~> 2.0) jekyll-theme-tactile (0.1.1) jekyll (~> 3.5) - jekyll-seo-tag (~> 2.0) + jekyll-seo-assignee (~> 2.0) jekyll-theme-time-machine (0.1.1) jekyll (~> 3.5) - jekyll-seo-tag (~> 2.0) + jekyll-seo-assignee (~> 2.0) jekyll-titles-from-headings (0.5.3) jekyll (>= 3.3, < 5.0) jekyll-watch (2.2.1) @@ -201,7 +201,7 @@ GEM minima (2.5.1) jekyll (>= 3.5, < 5.0) jekyll-feed (~> 0.9) - jekyll-seo-tag (~> 2.1) + jekyll-seo-assignee (~> 2.1) minitest (5.14.1) multipart-post (2.1.1) nokogiri (1.10.9-x64-mingw32) diff --git a/docs/SettingUp.md b/docs/SettingUp.md index 77667c6d581..d8ded1ab0d9 100644 --- a/docs/SettingUp.md +++ b/docs/SettingUp.md @@ -23,7 +23,7 @@ If you plan to use Intellij IDEA (highly recommended): 1. **Import the project as a Gradle project**: Follow the guide [_[se-edu/guides] IDEA: Importing a Gradle project_](https://se-education.org/guides/tutorials/intellijImportGradleProject.html) to import the project into IDEA.
:exclamation: Note: Importing a Gradle project is slightly different from importing a normal Java project. 1. **Verify the setup**: - 1. Run the `seedu.address.Main` and try a few commands. + 1. Run the `seedu.heymatez.Main` and try a few commands. 1. [Run the tests](Testing.md) to ensure they all pass. -------------------------------------------------------------------------------------------------------------------- @@ -45,11 +45,4 @@ If you plan to use Intellij IDEA (highly recommended): 1. **Learn the design** - When you are ready to start coding, we recommend that you get some sense of the overall design by reading about [AddressBook’s architecture](DeveloperGuide.md#architecture). - -1. **Do the tutorials** - These tutorials will help you get acquainted with the codebase. - - * [Tracing code](tutorials/TracingCode.md) - * [Removing fields](tutorials/RemovingFields.md) - * [Adding a new command](tutorials/AddRemark.md) + When you are ready to start coding, we recommend that you get some sense of the overall design by reading about [HEY MATEz’s architecture](DeveloperGuide.md#architecture). diff --git a/docs/Testing.md b/docs/Testing.md index 8a99e82438a..f5db7e19d92 100644 --- a/docs/Testing.md +++ b/docs/Testing.md @@ -29,8 +29,8 @@ There are two ways to run tests. This project has three types of tests: 1. *Unit tests* targeting the lowest level methods/classes.
- e.g. `seedu.address.commons.StringUtilTest` + e.g. `seedu.heymatez.commons.StringUtilTest` 1. *Integration tests* that are checking the integration of multiple code units (those code units are assumed to be working).
- e.g. `seedu.address.storage.StorageManagerTest` + e.g. `seedu.heymatez.storage.StorageManagerTest` 1. Hybrids of unit and integration tests. These test are checking multiple code units as well as how the are connected together.
- e.g. `seedu.address.logic.LogicManagerTest` + e.g. `seedu.heymatez.logic.LogicManagerTest` diff --git a/docs/UserGuide.md b/docs/UserGuide.md index 3716f3ca8a4..0ec2dab9600 100644 --- a/docs/UserGuide.md +++ b/docs/UserGuide.md @@ -2,35 +2,87 @@ layout: page title: User Guide --- - -AddressBook Level 3 (AB3) is a **desktop app for managing contacts, optimized for use via a Command Line Interface** (CLI) while still having the benefits of a Graphical User Interface (GUI). If you can type fast, AB3 can get your contact management tasks done faster than traditional GUI apps. - -* Table of Contents -{:toc} +## Table of Contents + +* [Welcome to HEY MATEz](#introduction) +* [About this User Guide](#about) +* [Quick Start](#quick-start) +* [Features](#features) + + [General Features](#general) + - [1. View Help: `help`](#help) + - [2. Clear all data in HEY MATEz: `clear`](#clear) + - [3. Exit Program: `exit`](#exit) + + [Member Related Features](#members) + - [1. Add Member: `addMember`](#addMember) + - [2. Delete Member: `deleteMember`](#deleteMember) + - [3. View Members: `viewMembers`](#viewMembers) + - [4. Edit Member: `editMember`](#editMember) + - [5. Find Members by Keywords: `findMembers`](#findMember) + + [Task Related Features](#tasks) + - [1. Add Task: `addTask`](#addTask) + - [2. Delete Task: `deleteTask`](#deleteTask) + - [3. View Tasks: `viewTasks`](#viewTasks) + - [4. Edit Task: `editTask`](#editTask) + - [5. Mark Task as Completed: `done`](#doneTask) + - [6. Mark Task as Uncompleted: `undo`](#undoTask) + - [7. Find Tasks by Keywords: `findTasks`](#findTask) + - [8. Find Tasks by Deadline: `findBefore`](#findBefore) + - [9. Find Tasks by Priority: `findPriority`](#findPriority) + - [10. Clear all Members Assigned to a Task: `clearAssignees`](#clearAssignees) + - [11. View List of Unassigned Tasks: `viewUnassignedTasks`](#findUnassigned) + - [12. View List of Uncompleted Tasks: `viewUncompletedTasks`](#findUncompleted) + - [13. Find Tasks Assigned to a Single Member: `findTasksFor`](#findTasksFor) +* [Data Storage](#dataStorage) + + [Saving the data](#savingData) + + [Editing the data file](#editData) +* [FAQ](#faq) +* [Command Summary](#summary) + + +## Welcome to HEY MATEz +As a CCA / club leader, are you struggling to **keep track of the ever-changing members** of your club as well as **manage +the mountain of tasks** that have to be completed? Or perhaps it is a challenge to **keep track of the increasing +number of deadlines** and be able to **assign tasks to members efficiently**. + +HEY MATEz is a desktop application to get rid of your woes by allowing you to **track +members** and **tasks** within the club **efficiently and easily**! It is +a Command Line Interface (CLI) application which handles user requests that are typed into the input box as commands. + +With HEY MATEz, managing and distributing tasks will never be a headache again! :smile: + + +## About this User Guide +This user guide includes information on the **features** of HEY MATEz as well as a walkthrough on how to use them. The features +are further divided into 3 sections which include the **General features**, **Member related features** as well as the **Task related features**. +Member related features allow you to manage a list of members and find members. On the other hand, Task related features allow you +to manage tasks which can be identified by their unique list indexes. -------------------------------------------------------------------------------------------------------------------- -## Quick start +
-1. Ensure you have Java `11` or above installed in your Computer. + +## Quick Start -1. Download the latest `addressbook.jar` from [here](https://github.com/se-edu/addressbook-level3/releases). +1. Ensure you have Java `11` or above installed in your Computer. You can install Java `11` [here](https://www.oracle.com/sg/java/technologies/javase-jdk11-downloads.html). -1. Copy the file to the folder you want to use as the _home folder_ for your AddressBook. +1. Download the latest `heymatez.jar` from [here](https://github.com/AY2021S2-CS2103T-W14-3/tp/releases). -1. Double-click the file to start the app. The GUI similar to the below should appear in a few seconds. Note how the app contains some sample data.
+1. Copy the file to the folder you want to use as the _home folder_ for your HEY MATEz. + +1. Double-click the file to start the app. The GUI similar to the picture below should appear in a few seconds. Note how the app contains some sample tasks and members.
![Ui](images/Ui.png) 1. Type the command in the command box and press Enter to execute it. e.g. typing **`help`** and pressing Enter will open the help window.
Some example commands you can try: - * **`list`** : Lists all contacts. - - * **`add`**`n/John Doe p/98765432 e/johnd@example.com a/John street, block 123, #01-01` : Adds a contact named `John Doe` to the Address Book. + * **`viewMembers`** : Lists all members. - * **`delete`**`3` : Deletes the 3rd contact shown in the current list. + * **`addTask`**`Proposal d/Write out detailed proposal plan for CCA timeline b/2021-04-22` : Adds a task named `Proposal` to HEY MATEz. + + * **`deleteTask`**`3` : Deletes the 3rd task shown in the list. - * **`clear`** : Deletes all contacts. + * **`clear`** : Deletes all tasks and members. * **`exit`** : Exits the app. @@ -38,155 +90,450 @@ AddressBook Level 3 (AB3) is a **desktop app for managing contacts, optimized fo -------------------------------------------------------------------------------------------------------------------- +
+ + ## Features
-**:information_source: Notes about the command format:**
+**:bookmark_tabs: Notes about the command format:**
* Words in `UPPER_CASE` are the parameters to be supplied by the user.
- e.g. in `add n/NAME`, `NAME` is a parameter which can be used as `add n/John Doe`. + e.g. in `addMember NAME`, `NAME` is a parameter which can be used as `addMember John Lim`. * Items in square brackets are optional.
- e.g `n/NAME [t/TAG]` can be used as `n/John Doe t/friend` or as `n/John Doe`. - + e.g `d/DESCRIPTION [p/PRIORITY]` can be used as `d/Meeting p/high` or as `d/Meeting`. + * Items with `…`​ after them can be used multiple times including zero times.
- e.g. `[t/TAG]…​` can be used as ` ` (i.e. 0 times), `t/friend`, `t/friend t/family` etc. - -* Parameters can be in any order.
- e.g. if the command specifies `n/NAME p/PHONE_NUMBER`, `p/PHONE_NUMBER n/NAME` is also acceptable. - -* If a parameter is expected only once in the command but you specified it multiple times, only the last occurrence of the parameter will be taken.
- e.g. if you specify `p/12341234 p/56785678`, only `p/56785678` will be taken. - -* Extraneous parameters for commands that do not take in parameters (such as `help`, `list`, `exit` and `clear`) will be ignored.
+ e.g. `[a/ASSIGNEE]…​` can be used as ` ` (i.e. 0 times), `a/Duncan`, `a/Daniel a/Benson` etc. + +* Parameters with prefixes can be in any order.
+ e.g. if the command specifies `e/EMAIL p/PHONE_NUMBER`, `p/PHONE_NUMBER e/EMAIL` is also acceptable. + +* If a parameter with a prefix is expected only once in the command, but you specified it multiple times, only the last occurrence of the parameter will be taken.
+ e.g. if you specify `p/98562545 p/88885555`, only `p/88885555` will be taken. + +* Extraneous parameters for commands that do not take in parameters (such as `help`, `exit` and `clear`) will be ignored.
e.g. if the command specifies `help 123`, it will be interpreted as `help`. +* For features which use the INDEX field, the INDEX you specify must be a valid number in the currently displayed list of tasks. + +* The NAME, NEW_NAME, ASSIGNEE and NEW_ASSIGNEE fields are case-sensitive and format-sensitive across all features which uses it. + e.g. "Alex Yeoh" and "Alex       Yeoh" are not the same. +
-### Viewing help : `help` +
-Shows a message explaning how to access the help page. + +## General Features -![help message](images/helpMessage.png) + +### 1. View Help: `help` +Shows a message explaining how to access the help page. Format: `help` +Example: `help` -### Adding a person: `add` + +### 2. Clear all data in application: `clear` +Clears all entries from the application. -Adds a person to the address book. +Format: `clear` -Format: `add n/NAME p/PHONE_NUMBER e/EMAIL a/ADDRESS [t/TAG]…​` +Example: `clear` -
:bulb: **Tip:** -A person can have any number of tags (including 0) + +### 3. Exiting the programme: `exit` +Exits the program. + +Format: `exit` + +Example: `exit` + +-------------------------------------------------------------------------------------------------------------------- + +
+ + +## Member Related Features + + +### 1. Add Member: `addMember` + +With new members joining the club, you can add a new member along with his/her contact number and email to the members list. + +Format: `addMember NAME p/PHONE_NUMBER e/EMAIL [r/ROLE]` + +* NAME and ROLE fields can take on any values with alphanumeric characters. +* PHONE_NUMBER field has to have a minimum length of 3 digits and maximum length of 15 digits. +* If ROLE field is not specified, person will be assigned a default role of `Member`. + +Assumptions: +* Every member in the CCA has a different name. An error will be prompted when you add a member with the same name but with +a different phone number, email or role. + +Examples: +* `addMember Dylan p/64529356 e/dylan@gmail.com` +* `addMember Dylan p/64529356 e/dylan@gmail.com r/President` + +
+ +Using the following addMember command, `addMember Erynne p/96398428 e/erynne@gmail.com`, the addMember command +can be used as shown below: + +1. Key in the addMember command and its parameters +

+![Example using the addMember command](images/UG-examples/addMember-cmd.png) +

+2. Press enter and view the result of the addMember command +

+![Example of using addMember result](images/UG-examples/addMember-result.png) +

+ +
+ + +### 2. Delete Member: `deleteMember` + +As members leave the club, you can delete a member along with all of his/her contact details from the members list. + +Format: `deleteMember NAME` + +
:exclamation: **Caution:** +The NAME specified must appear in the currently displayed list of members in order for it to be valid.
Examples: -* `add n/John Doe p/98765432 e/johnd@example.com a/John street, block 123, #01-01` -* `add n/Betsy Crowe t/friend e/betsycrowe@example.com a/Newgate Prison p/1234567 t/criminal` +* `deleteMember Rachel` + + +### 3. View Members: `viewMembers` -### Listing all persons : `list` +Displays the list of members that you have added into HEY MATEz. -Shows a list of all persons in the address book. +Format: `viewMembers ` -Format: `list` +Examples: +* `viewMembers` -### Editing a person : `edit` +
-Edits an existing person in the address book. + +### 4. Edit Member: `editMember` +Club members may change their emails or phone numbers after a while. This feature allows you to edit the details of an +existing member in the application with the name you specify. -Format: `edit INDEX [n/NAME] [p/PHONE] [e/EMAIL] [a/ADDRESS] [t/TAG]…​` +Format: `editMember NAME [n/NEW_NAME] [p/NEW_PHONE_NUMBER] [e/NEW_EMAIL] [r/NEW_ROLE]` -* Edits the person at the specified `INDEX`. The index refers to the index number shown in the displayed person list. The index **must be a positive integer** 1, 2, 3, …​ +* Edits the member with the specified NAME. +* At least one of the optional fields must be provided. +* NEW_NAME and NEW_ROLE fields can take on any values with alphanumeric characters. +* Existing values will be updated to the input values. + +
:exclamation: **Caution:** +The NAME specified must appear in the currently displayed list of members in order for it to be valid. +
+ +Examples: +* `editMember Alice n/Alice Tan` +* `editMember Alice n/Alice Tan p/98154155 e/aliceTan@gmail.com` +* `editMember Alice n/Alice Tan p/98154155 e/aliceTan@gmail.com r/Events head` + + +### 5. Find Members by Keywords: `findMembers` + +With so many members in the club, you may want to find a particular member's details quickly. +This feature allows you to find all members whose NAME, PHONE_NUMBER, EMAIL or ROLE contain +any of the specified keywords. + +Format: `findMembers KEYWORD [MORE_KEYWORDS]...` + +* KEYWORD must match an entire word in order for the particular member to be found. + * e.g. `Rachel` will not match with `Rach`. +* The search using KEYWORD is case-insensitive + * e.g. `Rachel` will match with `rachel`. + +Examples: +* `findMembers Rachel` +* `findMembers Rachel 98562154 john@gmail.com` +* `findMembers Rachel 98562154 john@gmail.com President` + +-------------------------------------------------------------------------------------------------------------------- + +
+ + +## Task Related Features + + +### 1. Add Task: `addTask` + +With new tasks that needs to be completed within the club every week, you can add a task, with its description and +deadline to the task list. + +Format: `addTask TITLE d/DESCRIPTION b/DEADLINE [s/STATUS] [p/PRIORITY] [a/ASSIGNEE]...` + +* If you did not specify a value for STATUS, the Task will be assigned a default status value of **uncompleted**. +* STATUS field can only take on the values **completed** or **uncompleted** (Values are case-sensitive). +* If you did not specify a value for PRIORITY, the Task will be assigned a default priority of **unassigned**. +* PRIORITY field can only take on the values **high**, **medium**, **low** or **unassigned** (Values are case-sensitive). + +
:bulb: **Tip:** +A task can have any number of assignees (including 0). To add multiple assignees, simply use multiple assignee prefixes. +
+ +Examples: +* `addTask CCA Timeline d/Plan semester's timeline b/2021-04-04 s/completed p/high a/Rachel` +* `addTask CCA Timeline d/Plan semester's timeline b/2021-04-04 a/Rachel a/James` + +
+ +Using the following addTask command, `addTask CCA Timeline d/Plan semester's timeline b/2021-04-04 a/Alex Yeoh a/Bernice Yu`, the +addTask command can be used as shown below: + +1. Key in the addTask command and its parameters +

+![Example using the addTask command](images/UG-examples/addTask-cmd.png) +

+2. Press enter and view the result of the addTask command +

+![Example of using addTask result](images/UG-examples/addTask-result.png) +

+ +
+ + +### 2. Delete Task: `deleteTask` +If a task is no longer relevant, you can delete the task along with its details from the list with the task index you specified. + +Format: `deleteTask INDEX` + +Examples: +* `deleteTask 1` + + +### 3. View Tasks: `viewTasks` +Displays the list of tasks that you have added into HEY MATEz. + +Format: `viewTasks` + +Examples: +* `viewTasks` + +
+ + +### 4. Edit Task: `editTask` +With ever-changing task requirements, you can edit an existing task at the task index specified with the new details +you key in. + +Format: `editTask INDEX [n/NEW_TITLE] [d/NEW_DESCRIPTION] [b/NEW_DEADLINE] [s/NEW_STATUS] [p/NEW_PRIORITY] [a/NEW_ASSIGNEE]...` + +* Edits the task at the specified INDEX. * At least one of the optional fields must be provided. * Existing values will be updated to the input values. -* When editing tags, the existing tags of the person will be removed i.e adding of tags is not cumulative. -* You can remove all the person’s tags by typing `t/` without - specifying any tags after it. +* When editing assignees, the existing assignees of the task will be removed i.e adding of assignees is not cumulative. -Examples: -* `edit 1 p/91234567 e/johndoe@example.com` Edits the phone number and email address of the 1st person to be `91234567` and `johndoe@example.com` respectively. -* `edit 2 n/Betsy Crower t/` Edits the name of the 2nd person to be `Betsy Crower` and clears all existing tags. +
:bulb: **Tip:** +Any number of assignees can be specified here (including 0). To have multiple assignees, simply use multiple assignee prefixes. +
-### Locating persons by name: `find` +Examples: +* `editTask 1 n/Plan meeting d/Plan board meeting` +* `editTask 1 n/Plan meeting d/Plan board meeting b/2021-04-04` +* `editTask 1 n/Plan meeting d/Plan board meeting b/2021-04-04 a/Samuel a/Christian` -Finds persons whose names contain any of the given keywords. +
+ + +### 5. Mark Task as Completed: `done` -Format: `find KEYWORD [MORE_KEYWORDS]` +Upon completion of a task, you can change the status of a task with the task index you specify from **uncompleted** +to **completed**. -* The search is case-insensitive. e.g `hans` will match `Hans` -* The order of the keywords does not matter. e.g. `Hans Bo` will match `Bo Hans` -* Only the name is searched. -* Only full words will be matched e.g. `Han` will not match `Hans` -* Persons matching at least one keyword will be returned (i.e. `OR` search). - e.g. `Hans Bo` will return `Hans Gruber`, `Bo Yang` +Format: `done INDEX` -Examples: -* `find John` returns `john` and `John Doe` -* `find alex david` returns `Alex Yeoh`, `David Li`
- ![result for 'find alex david'](images/findAlexDavidResult.png) +Examples: +* `done 1` + + +### 6. Mark Task as Uncompleted: `undo` + +Changes the status of a task with the task index you specify from **completed** to **uncompleted**. + +Format: `undo INDEX` + +Examples: +* `undo 1` + + +### 7. Find Tasks by Keywords: `findTasks` + +With so many tasks, you may want to find tasks quickly using some keywords. +This feature allows you to find all tasks which contain any of the specified keywords in its TITLE or DESCRIPTION. + +Format: `findTasks KEYWORD [MORE_KEYWORDS]...` + +* KEYWORD must match an entire word in order for the particular task to be found. + * e.g. `Meeting` will not match with `Meet`. +* The search using KEYWORD is case-insensitive. + * e.g. `Meeting` will match with `meeting`. + +Examples: +* `findTasks Meeting` +* `findTasks Meeting Proposal Draft` + +
+ + +### 8. Find Tasks due before certain date: `findBefore` + +With so many tasks that need to be completed at different times, you may want to find tasks which are due before a certain date. +This feature allows you to find all tasks with deadlines before the date you have specified. + +Format: `findBefore DATE` + +
:bulb: **Tip:** +The DATE specified must follow the format `YYYY-MM-DD`and be a valid date in the calendar. +
+ +Examples: +* `findBefore 2021-05-04` + + +### 9. Find Tasks by Priority: `findPriority` -### Deleting a person : `delete` +With so many tasks that are of different priority, this feature allows you to find all tasks containing the priority that +you have specified. -Deletes the specified person from the address book. +* The valid input values for `findPriority` are **high**, **medium**, **low** and **unassigned**. -Format: `delete INDEX` +
:bulb: **Tip:** +The input values are case-sensitive. +
-* Deletes the person at the specified `INDEX`. -* The index refers to the index number shown in the displayed person list. -* The index **must be a positive integer** 1, 2, 3, …​ +Format: `findPriority PRIORITY` Examples: -* `list` followed by `delete 2` deletes the 2nd person in the address book. -* `find Betsy` followed by `delete 1` deletes the 1st person in the results of the `find` command. +* `findPriority high` -### Clearing all entries : `clear` + +### 10. Clear all Members Assigned to a Task: `clearAssignees` -Clears all entries from the address book. +If you have accidentally assigned a task to the wrong group of members, +you can easily clear all members assigned to that task with the task index you specified. -Format: `clear` +Format: `clearAssignees INDEX` -### Exiting the program : `exit` +Examples: +* `clearAssignees 2` -Exits the program. +
-Format: `exit` + +### 11. View List of Unassigned Tasks: `viewUnassignedTasks` + +In order to efficiently distribute tasks to members, you may want to view tasks which have yet to be assigned to any member. +This feature allows you to view the list of unassigned tasks. + +Format: `viewUnassignedTasks` + +Examples: +* `viewUnassignedTasks` + + +### 12. View List of Uncompleted Tasks: `viewUncompletedTasks` + +In order to be on track with work, you may want to view tasks which have not been completed. +This feature allows you to view the list of uncompleted tasks. + +Format: `viewUncompletedTasks` +Examples: +* `viewUncompletedTasks` + + +### 13. Find Tasks Assigned to a Single Member: `findTasksFor` + +In order to manage members efficiently, you may want to track the tasks that are assigned to each member. +This feature allows you to find all tasks assigned to a single member. + +Format: `findTasksFor NAME` + +* The search using NAME is case-sensitive. + * e.g. `David Li` will only match with `David Li`. +* NAME must match an entire member's name exactly in order for the tasks assigned to that member to be found. + * e.g. `David` will not match with `David Li` + +
:bulb: **Tip:** +A NAME that does not belong to a member inside HEY MATEz will return no tasks listed. +
+ +Examples: +* `findTasksFor Alex Yeoh` +* `findTasksFor Bernice Teo Hui Min` + +-------------------------------------------------------------------------------------------------------------------- + +
+ + +## Data Storage + + ### 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. +HEY MATEz data is saved in the hard disk automatically after any command that changes the data. There is no need to save manually. + ### Editing the data file -AddressBook data are saved as a JSON file `[JAR file location]/data/addressbook.json`. Advanced users are welcome to update data directly by editing that data file. +HEY MATEz data is saved as a JSON file `[JAR file location]/data/heymatez.json`. Advanced users are welcome to update data directly by editing that data file.
:exclamation: **Caution:** -If your changes to the data file makes its format invalid, AddressBook will discard all data and start with an empty data file at the next run. +If your changes to the data file makes its format invalid, HEY MATEz will discard all data and start with an empty data file at the next run.
-### Archiving data files `[coming in v2.0]` - -_Details coming soon ..._ - -------------------------------------------------------------------------------------------------------------------- + ## FAQ **Q**: How do I transfer my data to another Computer?
-**A**: Install the app in the other computer and overwrite the empty data file it creates with the file that contains the data of your previous AddressBook home folder. +**A**: Install the app in the other computer and overwrite the empty data file it creates with the file that contains the data of your previous HEY MATEz home folder. -------------------------------------------------------------------------------------------------------------------- +
+ + ## Command summary Action | Format, Examples --------|------------------ -**Add** | `add n/NAME p/PHONE_NUMBER e/EMAIL a/ADDRESS [t/TAG]…​`
e.g., `add n/James Ho p/22224444 e/jamesho@example.com a/123, Clementi Rd, 1234665 t/friend t/colleague` -**Clear** | `clear` -**Delete** | `delete INDEX`
e.g., `delete 3` -**Edit** | `edit INDEX [n/NAME] [p/PHONE_NUMBER] [e/EMAIL] [a/ADDRESS] [t/TAG]…​`
e.g.,`edit 2 n/James Lee e/jameslee@example.com` -**Find** | `find KEYWORD [MORE_KEYWORDS]`
e.g., `find James Jake` -**List** | `list` -**Help** | `help` +**View Help** | `help` +**Clear Data** | `clear` +**Exit Program** | `exit` +|| +**Add Member** | `addMember NAME p/PHONE_NUMBER e/EMAIL [r/ROLE]`
e.g., `addMember Dylan p/64529356 e/dylan@gmail.com r/Member` +**Delete Member** | `deleteMember NAME`
e.g., `deleteMember Rachel` +**View Members** | `viewMembers`
e.g., `viewMembers` +**Edit Member** | `editMember NAME [n/NEW_NAME] [p/NEW_PHONE_NUMBER] [e/NEW_EMAIL] [r/NEW_ROLE]`
e.g.,`editMember Alice e/newAlice@gmail.com r/Events head` +**Find Members by Keywords** | `find KEYWORD [MORE_KEYWORDS]...`
e.g., `findMembers Rachel 98562154 john@gmail.com` +|| +**Add Task** | `addTask TITLE d/DESCRIPTION b/DEADLINE [s/STATUS] [p/PRIORITY] [a/ASSIGNEE]...`
e.g.,`addTask CCA Timeline d/Plan semester's timeline b/2021-04-04 s/completed p/high a/Rachel` +**Delete Task** | `deleteTask INDEX`
e.g., `deleteTask 1` +**View Tasks** | `viewTasks`
e.g., `viewTasks` +**Edit Task** | `editTask INDEX [n/NEW_TITLE] [d/NEW_DESCRIPTION] [b/NEW_DEADLINE] [s/NEW_STATUS] [p/NEW_PRIORITY] [a/NEW_ASSIGNEE]...`
e.g.,`editTask 1 n/Plan meeting d/Plan board meeting b/2021-04-04` +**Mark Task as Completed** | `done INDEX`
e.g., `done 1` +**Mark Task as Uncompleted** | `undo INDEX`
e.g., `undo 1` +**Find Tasks by Keywords** | `findTasks KEYWORD [MORE_KEYWORDS]...`
e.g., `findTasks Meeting Proposal Draft` +**Find Tasks by Deadline** | `findBefore DATE`
e.g., `findBefore 2021-04-05` +**Find Tasks by Priority** | `findPriority PRIORITY`
e.g., `findPriority high` +**Clear all Members Assigned to a Task** | `clearAssignees INDEX`
e.g., `clearAssignees 2` +**View Unassigned Tasks** | `viewUnassignedTasks`
e.g., `viewUnassignedTasks` +**View Uncompleted Tasks** | `viewUncompletedTasks`
e.g., `viewUncompletedTasks` +**Find Member's Tasks** | `findTasksFor NAME`
e.g., `findTasksFor Alice Tay` diff --git a/docs/_config.yml b/docs/_config.yml index 6bd245d8f4e..4b8d0fb3278 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -1,4 +1,4 @@ -title: "AB-3" +title: "HEY MATEz" theme: minima header_pages: @@ -8,7 +8,7 @@ header_pages: markdown: kramdown -repository: "se-edu/addressbook-level3" +repository: "AY2021S2-CS2103T-W14-3/tp" github_icon: "images/github-icon.png" plugins: diff --git a/docs/_sass/minima/_base.scss b/docs/_sass/minima/_base.scss index 0d3f6e80ced..9f267b503b9 100644 --- a/docs/_sass/minima/_base.scss +++ b/docs/_sass/minima/_base.scss @@ -288,7 +288,7 @@ table { text-align: center; } .site-header:before { - content: "AB-3"; + content: "HEY MATEz"; font-size: 32px; } } diff --git a/docs/diagrams/ArchitectureSequenceDiagram.puml b/docs/diagrams/ArchitectureSequenceDiagram.puml index ef81d18c337..ef7e56a0c8a 100644 --- a/docs/diagrams/ArchitectureSequenceDiagram.puml +++ b/docs/diagrams/ArchitectureSequenceDiagram.puml @@ -7,19 +7,19 @@ Participant ":Logic" as logic LOGIC_COLOR Participant ":Model" as model MODEL_COLOR Participant ":Storage" as storage STORAGE_COLOR -user -[USER_COLOR]> ui : "delete 1" +user -[USER_COLOR]> ui : "deleteTask 1" activate ui UI_COLOR -ui -[UI_COLOR]> logic : execute("delete 1") +ui -[UI_COLOR]> logic : execute("deleteTask 1") activate logic LOGIC_COLOR -logic -[LOGIC_COLOR]> model : deletePerson(p) +logic -[LOGIC_COLOR]> model : deleteTask(task) activate model MODEL_COLOR model -[MODEL_COLOR]-> logic deactivate model -logic -[LOGIC_COLOR]> storage : saveAddressBook(addressBook) +logic -[LOGIC_COLOR]> storage : saveHeyMatez(heyMatez) activate storage STORAGE_COLOR storage -[STORAGE_COLOR]> storage : Save to file diff --git a/docs/diagrams/BetterModelClassDiagram.puml b/docs/diagrams/BetterModelClassDiagram.puml index 29076104af3..047270c6749 100644 --- a/docs/diagrams/BetterModelClassDiagram.puml +++ b/docs/diagrams/BetterModelClassDiagram.puml @@ -4,18 +4,24 @@ skinparam arrowThickness 1.1 skinparam arrowColor MODEL_COLOR skinparam classBackgroundColor MODEL_COLOR -AddressBook *-right-> "1" UniquePersonList -AddressBook *-right-> "1" UniqueTagList -UniqueTagList -[hidden]down- UniquePersonList -UniqueTagList -[hidden]down- UniquePersonList +HeyMatez *-right-> "1" UniquePersonList +HeyMatez *-right-> "1" TaskList +TaskList -[hidden]down- UniquePersonList +TaskList -[hidden]down- UniquePersonList -UniqueTagList *-right-> "*" Tag -UniquePersonList o-right-> Person +TaskList *-right-> "*" Task +UniquePersonList o-down-> Person -Person -up-> "*" Tag -Person *--> Name -Person *--> Phone -Person *--> Email -Person *--> Address + +Person *--> "1"Name +Person *--> "1"Phone +Person *--> "1"Email +Person *--> "1"Role + +Task *--> "1" Title +Task *--> "1" Description +Task *--> "1" Deadline +Task *--> Priority +Task *--> "1" TaskStatus @enduml diff --git a/docs/diagrams/ClearAssigneeSequenceDiagram.puml b/docs/diagrams/ClearAssigneeSequenceDiagram.puml new file mode 100644 index 00000000000..b8b9b040434 --- /dev/null +++ b/docs/diagrams/ClearAssigneeSequenceDiagram.puml @@ -0,0 +1,78 @@ +@startuml +!include style.puml + +box Logic LOGIC_COLOR_T1 +participant ":LogicManager" as LogicManager LOGIC_COLOR +participant ":HeyMatezParser" as HeyMatezParser LOGIC_COLOR +participant ":ClearAssigneesCommandParser" as ClearAssigneesCommandParser LOGIC_COLOR +participant "c:ClearAssigneesCommand" as ClearAssigneesCommand LOGIC_COLOR +participant ":CommandResult" as CommandResult LOGIC_COLOR +end box + +box Model MODEL_COLOR_T1 +participant ":Model" as Model MODEL_COLOR +end box + +[-> LogicManager : execute("clearAssignees 1") +activate LogicManager + +LogicManager -> HeyMatezParser : parseCommand("clearAssignees 1") +activate HeyMatezParser + +create ClearAssigneesCommandParser +HeyMatezParser -> ClearAssigneesCommandParser +activate ClearAssigneesCommandParser + +ClearAssigneesCommandParser --> HeyMatezParser +deactivate ClearAssigneesCommandParser + +HeyMatezParser -> ClearAssigneesCommandParser : parse("1") +activate ClearAssigneesCommandParser + +create ClearAssigneesCommand +ClearAssigneesCommandParser -> ClearAssigneesCommand +activate ClearAssigneesCommand + +ClearAssigneesCommand --> ClearAssigneesCommandParser : c +deactivate ClearAssigneesCommand + +ClearAssigneesCommandParser --> HeyMatezParser : c +deactivate ClearAssigneesCommandParser +'Hidden arrow to position the destroy marker below the end of the activation bar. +ClearAssigneesCommandParser -[hidden]-> HeyMatezParser +destroy ClearAssigneesCommandParser + +HeyMatezParser --> LogicManager : c +deactivate HeyMatezParser + +LogicManager -> ClearAssigneesCommand : execute() +activate ClearAssigneesCommand + +ClearAssigneesCommand -> ClearAssigneesCommand : createModifiedTask(taskToClear) +activate ClearAssigneesCommand + +ClearAssigneesCommand --> ClearAssigneesCommand : clearedTask +deactivate ClearAssigneesCommand + +ClearAssigneesCommand -> Model : setTask(taskToClear, clearedTask) +activate Model + +Model --> ClearAssigneesCommand +deactivate Model + +create CommandResult +ClearAssigneesCommand -> CommandResult +activate CommandResult + +CommandResult --> ClearAssigneesCommand +deactivate CommandResult + +ClearAssigneesCommand --> LogicManager +deactivate ClearAssigneesCommand + +ClearAssigneesCommand -[hidden]-> LogicManager +destroy ClearAssigneesCommand + +[<--LogicManager +deactivate LogicManager +@enduml diff --git a/docs/diagrams/ClearAssigneesActivityDiagram.puml b/docs/diagrams/ClearAssigneesActivityDiagram.puml new file mode 100644 index 00000000000..7468c23969f --- /dev/null +++ b/docs/diagrams/ClearAssigneesActivityDiagram.puml @@ -0,0 +1,26 @@ +@startuml +start +:User executes clearAssignees command; + +if () then ([valid command input]) + :Fetch task with the given + index from the task list; + if () then ([target task has 1 or more assignees]) + : Create a copy of the fetched + task with its assignees + updated to be cleared; + : Update task list with the + updated copy of the + fetched task; + : Output cleared assignees + success message; + else([else]) + : Output no assignees + to clear message; + endif +else ([else]) + : Output invalid command + input error message; +endif +stop +@enduml diff --git a/docs/diagrams/DeleteSequenceDiagram.puml b/docs/diagrams/DeleteSequenceDiagram.puml deleted file mode 100644 index 1dc2311b245..00000000000 --- a/docs/diagrams/DeleteSequenceDiagram.puml +++ /dev/null @@ -1,69 +0,0 @@ -@startuml -!include style.puml - -box Logic LOGIC_COLOR_T1 -participant ":LogicManager" as LogicManager LOGIC_COLOR -participant ":AddressBookParser" as AddressBookParser LOGIC_COLOR -participant ":DeleteCommandParser" as DeleteCommandParser LOGIC_COLOR -participant "d:DeleteCommand" as DeleteCommand LOGIC_COLOR -participant ":CommandResult" as CommandResult LOGIC_COLOR -end box - -box Model MODEL_COLOR_T1 -participant ":Model" as Model MODEL_COLOR -end box - -[-> LogicManager : execute("delete 1") -activate LogicManager - -LogicManager -> AddressBookParser : parseCommand("delete 1") -activate AddressBookParser - -create DeleteCommandParser -AddressBookParser -> DeleteCommandParser -activate DeleteCommandParser - -DeleteCommandParser --> AddressBookParser -deactivate DeleteCommandParser - -AddressBookParser -> DeleteCommandParser : parse("1") -activate DeleteCommandParser - -create DeleteCommand -DeleteCommandParser -> DeleteCommand -activate DeleteCommand - -DeleteCommand --> DeleteCommandParser : d -deactivate DeleteCommand - -DeleteCommandParser --> AddressBookParser : d -deactivate DeleteCommandParser -'Hidden arrow to position the destroy marker below the end of the activation bar. -DeleteCommandParser -[hidden]-> AddressBookParser -destroy DeleteCommandParser - -AddressBookParser --> LogicManager : d -deactivate AddressBookParser - -LogicManager -> DeleteCommand : execute() -activate DeleteCommand - -DeleteCommand -> Model : deletePerson(1) -activate Model - -Model --> DeleteCommand -deactivate Model - -create CommandResult -DeleteCommand -> CommandResult -activate CommandResult - -CommandResult --> DeleteCommand -deactivate CommandResult - -DeleteCommand --> LogicManager : result -deactivate DeleteCommand - -[<--LogicManager -deactivate LogicManager -@enduml diff --git a/docs/diagrams/DeleteTaskActivityDiagram.puml b/docs/diagrams/DeleteTaskActivityDiagram.puml new file mode 100644 index 00000000000..9cf27494977 --- /dev/null +++ b/docs/diagrams/DeleteTaskActivityDiagram.puml @@ -0,0 +1,16 @@ +@startuml +'https://plantuml.com/activity-diagram-beta + +start +:User executes deleteTask command; +if () then ([Index input is valid]) + :Fetch task with the given index from task list; + :Delete the fetched task from task list; + :Update user interface with the updated task list; +else ([Else]) + :Output error message; + + endif + stop + +@enduml diff --git a/docs/diagrams/DeleteTaskSequenceDiagram.puml b/docs/diagrams/DeleteTaskSequenceDiagram.puml new file mode 100644 index 00000000000..fbebf32dc4b --- /dev/null +++ b/docs/diagrams/DeleteTaskSequenceDiagram.puml @@ -0,0 +1,69 @@ +@startuml +!include style.puml + +box Logic LOGIC_COLOR_T1 +participant ":LogicManager" as LogicManager LOGIC_COLOR +participant ":HeyMatezParser" as HeyMatezParser LOGIC_COLOR +participant ":DeleteTaskCommandParser" as DeleteTaskCommandParser LOGIC_COLOR +participant "d:DeleteTaskCommand" as DeleteTaskCommand LOGIC_COLOR +participant ":CommandResult" as CommandResult LOGIC_COLOR +end box + +box Model MODEL_COLOR_T1 +participant ":Model" as Model MODEL_COLOR +end box + +[-> LogicManager : execute("deleteTask 1") +activate LogicManager + +LogicManager -> HeyMatezParser : parseCommand("deleteTask 1") +activate HeyMatezParser + +create DeleteTaskCommandParser +HeyMatezParser -> DeleteTaskCommandParser +activate DeleteTaskCommandParser + +DeleteTaskCommandParser --> HeyMatezParser +deactivate DeleteTaskCommandParser + +HeyMatezParser -> DeleteTaskCommandParser : parse("1") +activate DeleteTaskCommandParser + +create DeleteTaskCommand +DeleteTaskCommandParser -> DeleteTaskCommand +activate DeleteTaskCommand + +DeleteTaskCommand --> DeleteTaskCommandParser : d +deactivate DeleteTaskCommand + +DeleteTaskCommandParser --> HeyMatezParser : d +deactivate DeleteTaskCommandParser +'Hidden arrow to position the destroy marker below the end of the activation bar. +DeleteTaskCommandParser -[hidden]-> HeyMatezParser +destroy DeleteTaskCommandParser + +HeyMatezParser --> LogicManager : d +deactivate HeyMatezParser + +LogicManager -> DeleteTaskCommand : execute() +activate DeleteTaskCommand + +DeleteTaskCommand -> Model : deleteTask(1) +activate Model + +Model --> DeleteTaskCommand +deactivate Model + +create CommandResult +DeleteTaskCommand -> CommandResult +activate CommandResult + +CommandResult --> DeleteTaskCommand +deactivate CommandResult + +DeleteTaskCommand --> LogicManager : +destroy DeleteTaskCommand + +[<--LogicManager +deactivate LogicManager +@enduml diff --git a/docs/diagrams/DoneTaskActivityDiagram.puml b/docs/diagrams/DoneTaskActivityDiagram.puml new file mode 100644 index 00000000000..aad733127e7 --- /dev/null +++ b/docs/diagrams/DoneTaskActivityDiagram.puml @@ -0,0 +1,20 @@ +@startuml +start +:User executes mark task as completed command; + +if () then ([input is valid]) + :Fetch target task from task list; + if () then ([task status is uncompleted]) + : Create a copy of the target task with + the status updated to completed; + : Update Task List with target task copy; + : Update User Interface; + else([else]) + : Output task is already marked + as completed error; + endif +else ([else]) + : Output error message; +endif +stop +@enduml diff --git a/docs/diagrams/DoneTaskSeqeuenceDiagram.puml b/docs/diagrams/DoneTaskSeqeuenceDiagram.puml new file mode 100644 index 00000000000..42685f97fa3 --- /dev/null +++ b/docs/diagrams/DoneTaskSeqeuenceDiagram.puml @@ -0,0 +1,77 @@ +@startuml +!include style.puml + +box Logic LOGIC_COLOR_T1 +participant ":LogicManager" as LogicManager LOGIC_COLOR +participant ":HeyMatezParser" as HeyMatezParser LOGIC_COLOR +participant ":DoneTaskCommandParser" as DoneTaskCommandParser LOGIC_COLOR +participant "d:DoneTaskCommand" as DoneTaskCommand LOGIC_COLOR +participant ":CommandResult" as CommandResult LOGIC_COLOR +end box + +box Model MODEL_COLOR_T1 +participant ":Model" as Model MODEL_COLOR +end box + +[-> LogicManager : execute("done 1") +activate LogicManager + +LogicManager -> HeyMatezParser : parseCommand("done 1") +activate HeyMatezParser + +create DoneTaskCommandParser +HeyMatezParser -> DoneTaskCommandParser +activate DoneTaskCommandParser + +DoneTaskCommandParser --> HeyMatezParser +deactivate DoneTaskCommandParser + +HeyMatezParser -> DoneTaskCommandParser : parse("1") +activate DoneTaskCommandParser + +create DoneTaskCommand +DoneTaskCommandParser -> DoneTaskCommand +activate DoneTaskCommand + +DoneTaskCommand --> DoneTaskCommandParser : d +deactivate DoneTaskCommand + +DoneTaskCommandParser --> HeyMatezParser : d +deactivate DoneTaskCommandParser +'Hidden arrow to position the destroy marker below the end of the activation bar. +DoneTaskCommandParser -[hidden]-> HeyMatezParser +destroy DoneTaskCommandParser + +HeyMatezParser --> LogicManager : d +deactivate HeyMatezParser + +LogicManager -> DoneTaskCommand : execute() +activate DoneTaskCommand + +DoneTaskCommand -> DoneTaskCommand : createDoneTask(taskToMarkDone) +activate DoneTaskCommand + +DoneTaskCommand --> DoneTaskCommand : doneTask +deactivate DoneTaskCommand + +DoneTaskCommand -> Model : setTask(taskToMarkDone, doneTask) +activate Model + +Model --> DoneTaskCommand +deactivate Model + +create CommandResult +DoneTaskCommand -> CommandResult +activate CommandResult + +CommandResult --> DoneTaskCommand +deactivate CommandResult + +DoneTaskCommand --> LogicManager +deactivate DoneTaskCommand +DoneTaskCommand -[hidden]-> LogicManager +destroy DoneTaskCommand + +[<--LogicManager +deactivate LogicManager +@enduml diff --git a/docs/diagrams/FindBeforeActivityDiagram.puml b/docs/diagrams/FindBeforeActivityDiagram.puml new file mode 100644 index 00000000000..6d76ad3dcb7 --- /dev/null +++ b/docs/diagrams/FindBeforeActivityDiagram.puml @@ -0,0 +1,12 @@ +@startuml +start +:User executes find task before command; + +if () then ([deadline input is valid and in correct format]) + :Fetch tasks with deadline that matches predicate from task list; + : Update User Interface with updated task list; +else ([else]) + : Output error message; +endif +stop +@enduml diff --git a/docs/diagrams/FindBeforeSequenceDiagram.puml b/docs/diagrams/FindBeforeSequenceDiagram.puml new file mode 100644 index 00000000000..597319e212a --- /dev/null +++ b/docs/diagrams/FindBeforeSequenceDiagram.puml @@ -0,0 +1,78 @@ +@startuml +!include style.puml + +box Logic LOGIC_COLOR_T1 +participant ":LogicManager" as LogicManager LOGIC_COLOR +participant ":HeyMatezParser" as HeyMatezParser LOGIC_COLOR +participant ":FindTaskBeforeCommandParser" as FindTaskBeforeCommandParser LOGIC_COLOR +participant "p:DeadlineBeforeDatePredicate" as DeadlineBeforeDatePredicate LOGIC_COLOR +participant "f:FindTaskBeforeCommand" as FindTaskBeforeCommand LOGIC_COLOR +participant ":CommandResult" as CommandResult LOGIC_COLOR +end box + +box Model MODEL_COLOR_T1 +participant ":Model" as Model MODEL_COLOR +end box + +[-> LogicManager : execute("findBefore 2021-04-04") +activate LogicManager + +LogicManager -> HeyMatezParser : parseCommand("findBefore 2021-04-04") +activate HeyMatezParser + +create FindTaskBeforeCommandParser +HeyMatezParser -> FindTaskBeforeCommandParser +activate FindTaskBeforeCommandParser + +FindTaskBeforeCommandParser --> HeyMatezParser +deactivate FindTaskBeforeCommandParser + +HeyMatezParser -> FindTaskBeforeCommandParser : parse("2021-04-04") +activate FindTaskBeforeCommandParser + +create DeadlineBeforeDatePredicate +FindTaskBeforeCommandParser -> DeadlineBeforeDatePredicate : DeadlineBeforeDatePredicate("2021-04-04") +activate DeadlineBeforeDatePredicate + + +DeadlineBeforeDatePredicate --> FindTaskBeforeCommandParser : p +deactivate DeadlineBeforeDatePredicate +create FindTaskBeforeCommand +FindTaskBeforeCommandParser -> FindTaskBeforeCommand +activate FindTaskBeforeCommand + +FindTaskBeforeCommand --> FindTaskBeforeCommandParser : f + +deactivate FindTaskBeforeCommand + +FindTaskBeforeCommandParser --> HeyMatezParser : f +deactivate FindTaskBeforeCommandParser +'Hidden arrow to position the destroy marker below the end of the activation bar. +FindTaskBeforeCommandParser -[hidden]-> HeyMatezParser +destroy FindTaskBeforeCommandParser + +HeyMatezParser --> LogicManager : f +deactivate HeyMatezParser + +LogicManager -> FindTaskBeforeCommand : execute() +activate FindTaskBeforeCommand + +FindTaskBeforeCommand -> Model : updateFilteredTaskList(p) +activate Model + +Model --> FindTaskBeforeCommand +deactivate Model + +create CommandResult +FindTaskBeforeCommand -> CommandResult +activate CommandResult + +CommandResult --> FindTaskBeforeCommand +deactivate CommandResult + +FindTaskBeforeCommand --> LogicManager +destroy FindTaskBeforeCommand + +[<--LogicManager +deactivate LogicManager +@enduml diff --git a/docs/diagrams/LogicClassDiagram.puml b/docs/diagrams/LogicClassDiagram.puml index 016ef33e2e2..02a61748086 100644 --- a/docs/diagrams/LogicClassDiagram.puml +++ b/docs/diagrams/LogicClassDiagram.puml @@ -8,7 +8,7 @@ package Logic { package Parser { Interface Parser <> -Class AddressBookParser +Class HeyMatezParser Class XYZCommandParser Class CliSyntax Class ParserUtil @@ -31,15 +31,19 @@ package Model{ Class HiddenModel #FFFFFF } +package Storage{ +Class HiddenModel #FFFFFF +} + Class HiddenOutside #FFFFFF HiddenOutside ..> Logic LogicManager .up.|> Logic -LogicManager -->"1" AddressBookParser -AddressBookParser .left.> XYZCommandParser: creates > +LogicManager -->"1" HeyMatezParser +HeyMatezParser .left.> XYZCommandParser: creates > XYZCommandParser ..> XYZCommand : creates > -XYZCommandParser ..|> Parser +XYZCommandParser .left.|> Parser XYZCommandParser ..> ArgumentMultimap XYZCommandParser ..> ArgumentTokenizer ArgumentTokenizer .left.> ArgumentMultimap @@ -52,8 +56,11 @@ XYZCommand -up-|> Command LogicManager .left.> Command : executes > LogicManager --> Model +LogicManager --> Storage +Storage --[hidden] Model +Command .[hidden]up.> Storage Command .right.> Model -note right of XYZCommand: XYZCommand = AddCommand, \nFindCommand, etc +note right of XYZCommand: XYZCommand = AddTaskCommand, \nFindTasksCommand, etc Logic ..> CommandResult LogicManager .down.> CommandResult diff --git a/docs/diagrams/ModelClassDiagram.puml b/docs/diagrams/ModelClassDiagram.puml index 3eae5326a82..61e85ae040a 100644 --- a/docs/diagrams/ModelClassDiagram.puml +++ b/docs/diagrams/ModelClassDiagram.puml @@ -5,11 +5,11 @@ skinparam arrowColor MODEL_COLOR skinparam classBackgroundColor MODEL_COLOR Package Model <>{ -Interface ReadOnlyAddressBook <> +Interface ReadOnlyHeyMatez <> Interface Model <> Interface ObservableList <> -Class AddressBook -Class ReadOnlyAddressBook +Class HeyMatez +Class ReadOnlyHeyMatez Class Model Class ModelManager Class UserPrefs @@ -17,40 +17,55 @@ Class ReadOnlyUserPrefs Package Person { Class Person -Class Address Class Email Class Name Class Phone +Class Role Class UniquePersonList } -Package Tag { -Class Tag +Package Task { +Class Task +Class Title +Class Description +Class Deadline +Enum Priority +Enum TaskStatus +Class UniqueTaskList +} + +Package Assignee { +Class Assignee } } Class HiddenOutside #FFFFFF HiddenOutside ..> Model -AddressBook .up.|> ReadOnlyAddressBook +HeyMatez .up.|> ReadOnlyHeyMatez ModelManager .up.|> Model Model .right.> ObservableList -ModelManager o--> "1" AddressBook +ModelManager o--> "1" HeyMatez ModelManager o-left-> "1" UserPrefs UserPrefs .up.|> ReadOnlyUserPrefs -AddressBook *--> "1" UniquePersonList +HeyMatez *--> "1" UniquePersonList UniquePersonList o--> "*" Person Person *--> Name Person *--> Phone Person *--> Email -Person *--> Address -Person *--> "*" Tag +Person *--> Role -Name -[hidden]right-> Phone -Phone -[hidden]right-> Address -Address -[hidden]right-> Email +HeyMatez *--> "1" UniqueTaskList +UniqueTaskList o--> "*" Task +Task *--> Title +Task *--> Description +Task *--> Deadline +Task *--> TaskStatus +Task *--> Priority +Task *--> "*" Assignee ModelManager ----->" ~* filtered list" Person +ModelManager ----->" \n\n\n~* filtered list" Task @enduml diff --git a/docs/diagrams/StorageClassDiagram.puml b/docs/diagrams/StorageClassDiagram.puml index 6adb2e156bf..1fcc24ab94d 100644 --- a/docs/diagrams/StorageClassDiagram.puml +++ b/docs/diagrams/StorageClassDiagram.puml @@ -6,19 +6,23 @@ skinparam classBackgroundColor STORAGE_COLOR Interface Storage <> Interface UserPrefsStorage <> -Interface AddressBookStorage <> +Interface HeyMatezStorage <> Class StorageManager Class JsonUserPrefsStorage -Class JsonAddressBookStorage +Class JsonHeyMatezStorage + +Storage -|> HeyMatezStorage +Storage -|> UserPrefsStorage StorageManager .left.|> Storage StorageManager o-right-> UserPrefsStorage -StorageManager o--> AddressBookStorage +StorageManager o--> HeyMatezStorage JsonUserPrefsStorage .left.|> UserPrefsStorage -JsonAddressBookStorage .left.|> AddressBookStorage -JsonAddressBookStorage .down.> JsonSerializableAddressBookStorage -JsonSerializableAddressBookStorage .right.> JsonSerializablePerson -JsonSerializablePerson .right.> JsonAdaptedTag +JsonHeyMatezStorage .left.|> HeyMatezStorage +JsonHeyMatezStorage .down.> JsonSerializableHeyMatez +JsonSerializableHeyMatez .left.> JsonAdaptedPerson +JsonSerializableHeyMatez .right.> JsonAdaptedTask +JsonAdaptedTask .right.> JsonAdaptedAssignee @enduml diff --git a/docs/diagrams/UiClassDiagram.puml b/docs/diagrams/UiClassDiagram.puml index 92746f9fcf7..4f77df03f50 100644 --- a/docs/diagrams/UiClassDiagram.puml +++ b/docs/diagrams/UiClassDiagram.puml @@ -11,6 +11,8 @@ Class UiManager Class MainWindow Class HelpWindow Class ResultDisplay +class TaskListPanel +class TaskCard Class PersonListPanel Class PersonCard Class StatusBarFooter @@ -34,9 +36,11 @@ MainWindow --> HelpWindow MainWindow *-down-> CommandBox MainWindow *-down-> ResultDisplay MainWindow *-down-> PersonListPanel +MainWindow *-down-> TaskListPanel MainWindow *-down-> StatusBarFooter PersonListPanel -down-> PersonCard +TaskListPanel -down-> TaskCard MainWindow -left-|> UiPart @@ -44,13 +48,17 @@ ResultDisplay --|> UiPart CommandBox --|> UiPart PersonListPanel --|> UiPart PersonCard --|> UiPart +TaskListPanel --|> UiPart +TaskCard --|> UiPart StatusBarFooter --|> UiPart HelpWindow -down-|> UiPart PersonCard ..> Model +TaskCard ..> Model UiManager -right-> Logic MainWindow -left-> Logic +TaskListPanel -[hidden]left- HelpWindow PersonListPanel -[hidden]left- HelpWindow HelpWindow -[hidden]left- CommandBox CommandBox -[hidden]left- ResultDisplay diff --git a/docs/diagrams/tracing/LogicSequenceDiagram.puml b/docs/diagrams/tracing/LogicSequenceDiagram.puml index fdcbe1c0ccc..b443490cea7 100644 --- a/docs/diagrams/tracing/LogicSequenceDiagram.puml +++ b/docs/diagrams/tracing/LogicSequenceDiagram.puml @@ -13,7 +13,7 @@ create ecp abp -> ecp abp -> ecp ++: parse(arguments) create ec -ecp -> ec ++: index, editPersonDescriptor +ecp -> ec ++: index, editMemberDescriptor ec --> ecp -- ecp --> abp --: command abp --> logic --: command diff --git a/docs/images/ArchitectureSequenceDiagram.png b/docs/images/ArchitectureSequenceDiagram.png index 2f1346869d0..0c1235ade4e 100644 Binary files a/docs/images/ArchitectureSequenceDiagram.png and b/docs/images/ArchitectureSequenceDiagram.png differ diff --git a/docs/images/ClearAssigneeSequenceDiagram.png b/docs/images/ClearAssigneeSequenceDiagram.png new file mode 100644 index 00000000000..64954ab07c0 Binary files /dev/null and b/docs/images/ClearAssigneeSequenceDiagram.png differ diff --git a/docs/images/ClearAssigneesActivityDiagram.png b/docs/images/ClearAssigneesActivityDiagram.png new file mode 100644 index 00000000000..15433b19630 Binary files /dev/null and b/docs/images/ClearAssigneesActivityDiagram.png differ diff --git a/docs/images/DeleteSequenceDiagram.png b/docs/images/DeleteSequenceDiagram.png deleted file mode 100644 index fa327b39618..00000000000 Binary files a/docs/images/DeleteSequenceDiagram.png and /dev/null differ diff --git a/docs/images/DeleteTaskActivityDiagram.png b/docs/images/DeleteTaskActivityDiagram.png new file mode 100644 index 00000000000..b687e4eaf15 Binary files /dev/null and b/docs/images/DeleteTaskActivityDiagram.png differ diff --git a/docs/images/DeleteTaskSequenceDiagram.png b/docs/images/DeleteTaskSequenceDiagram.png new file mode 100644 index 00000000000..04431395b4e Binary files /dev/null and b/docs/images/DeleteTaskSequenceDiagram.png differ diff --git a/docs/images/DoneTaskActivityDiagram.png b/docs/images/DoneTaskActivityDiagram.png new file mode 100644 index 00000000000..b3f72f8db2b Binary files /dev/null and b/docs/images/DoneTaskActivityDiagram.png differ diff --git a/docs/images/DoneTaskSequenceDiagram.png b/docs/images/DoneTaskSequenceDiagram.png new file mode 100644 index 00000000000..6de0609d762 Binary files /dev/null and b/docs/images/DoneTaskSequenceDiagram.png differ diff --git a/docs/images/FindBeforeActivityDiagram.png b/docs/images/FindBeforeActivityDiagram.png new file mode 100644 index 00000000000..1294521d04c Binary files /dev/null and b/docs/images/FindBeforeActivityDiagram.png differ diff --git a/docs/images/FindBeforeSequenceDiagram.png b/docs/images/FindBeforeSequenceDiagram.png new file mode 100644 index 00000000000..d67e48d6919 Binary files /dev/null and b/docs/images/FindBeforeSequenceDiagram.png differ diff --git a/docs/images/LogicClassDiagram.png b/docs/images/LogicClassDiagram.png index b9e853cef12..04c52c661fd 100644 Binary files a/docs/images/LogicClassDiagram.png and b/docs/images/LogicClassDiagram.png differ diff --git a/docs/images/ModelClassDiagram.png b/docs/images/ModelClassDiagram.png index ffd17662d41..70ce17d693e 100644 Binary files a/docs/images/ModelClassDiagram.png and b/docs/images/ModelClassDiagram.png differ diff --git a/docs/images/StorageClassDiagram.png b/docs/images/StorageClassDiagram.png index d87c1216820..bf91eb8b598 100644 Binary files a/docs/images/StorageClassDiagram.png and b/docs/images/StorageClassDiagram.png differ diff --git a/docs/images/UG-examples/addMember-cmd.png b/docs/images/UG-examples/addMember-cmd.png new file mode 100644 index 00000000000..c27923c9c42 Binary files /dev/null and b/docs/images/UG-examples/addMember-cmd.png differ diff --git a/docs/images/UG-examples/addMember-result.png b/docs/images/UG-examples/addMember-result.png new file mode 100644 index 00000000000..8bd33ce9f04 Binary files /dev/null and b/docs/images/UG-examples/addMember-result.png differ diff --git a/docs/images/UG-examples/addTask-cmd.png b/docs/images/UG-examples/addTask-cmd.png new file mode 100644 index 00000000000..c087d1b176b Binary files /dev/null and b/docs/images/UG-examples/addTask-cmd.png differ diff --git a/docs/images/UG-examples/addTask-result.png b/docs/images/UG-examples/addTask-result.png new file mode 100644 index 00000000000..237c06f5ac4 Binary files /dev/null and b/docs/images/UG-examples/addTask-result.png differ diff --git a/docs/images/Ui.png b/docs/images/Ui.png index 5bd77847aa2..99c5d3d5c2a 100644 Binary files a/docs/images/Ui.png and b/docs/images/Ui.png differ diff --git a/docs/images/UiClassDiagram.png b/docs/images/UiClassDiagram.png index 7b4b3dbea45..4bd23340e7c 100644 Binary files a/docs/images/UiClassDiagram.png and b/docs/images/UiClassDiagram.png differ diff --git a/docs/images/cheeerynne.png b/docs/images/cheeerynne.png new file mode 100644 index 00000000000..84a9c90ecaf Binary files /dev/null and b/docs/images/cheeerynne.png differ diff --git a/docs/images/findAlexDavidResult.png b/docs/images/findAlexDavidResult.png deleted file mode 100644 index 235da1c273e..00000000000 Binary files a/docs/images/findAlexDavidResult.png and /dev/null differ diff --git a/docs/images/johndoe.png b/docs/images/johndoe.png deleted file mode 100644 index 1ce7ce16dc8..00000000000 Binary files a/docs/images/johndoe.png and /dev/null differ diff --git a/docs/images/rachelljt.png b/docs/images/rachelljt.png new file mode 100644 index 00000000000..88e1614233d Binary files /dev/null and b/docs/images/rachelljt.png differ diff --git a/docs/images/tashawan23.png b/docs/images/tashawan23.png new file mode 100644 index 00000000000..187c79fe642 Binary files /dev/null and b/docs/images/tashawan23.png differ diff --git a/docs/images/zatkiller.png b/docs/images/zatkiller.png new file mode 100644 index 00000000000..675753cf7ac Binary files /dev/null and b/docs/images/zatkiller.png differ diff --git a/docs/index.md b/docs/index.md index 7601dbaad0d..fc6f8183596 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,17 +1,19 @@ --- layout: page -title: AddressBook Level-3 +title: HEY MATEz --- -[![CI Status](https://github.com/se-edu/addressbook-level3/workflows/Java%20CI/badge.svg)](https://github.com/se-edu/addressbook-level3/actions) -[![codecov](https://codecov.io/gh/se-edu/addressbook-level3/branch/master/graph/badge.svg)](https://codecov.io/gh/se-edu/addressbook-level3) +[![CI Status](https://github.com/AY2021S2-CS2103T-W14-3/tp/actions/workflows/gradle.yml/badge.svg)](https://github.com/AY2021S2-CS2103T-W14-3/tp/actions/workflows/gradle.yml) +[![codecov](https://codecov.io/gh/AY2021S2-CS2103T-W14-3/tp/branch/master/graph/badge.svg?token=OWR3AXGjau)](https://codecov.io/gh/AY2021S2-CS2103T-W14-3/tp) ![Ui](images/Ui.png) -**AddressBook is a desktop application for managing your contact details.** While it has a GUI, most of the user interactions happen using a CLI (Command Line Interface). +**HEY MATEz is a desktop application for managing your Club members and tasks to be completed.** While it has a GUI, most of the user interactions happen using a CLI (Command Line Interface). +With HEY MATEz, planning and distributing tasks among your members will never give you a headache again! :smile: -* If you are interested in using AddressBook, head over to the [_Quick Start_ section of the **User Guide**](UserGuide.html#quick-start). -* If you are interested about developing AddressBook, the [**Developer Guide**](DeveloperGuide.html) is a good place to start. + +* If you are interested in using HEY MATEz, head over to the [_Quick Start_ section of the **User Guide**](UserGuide.html#quick-start). +* If you are interested about developing HEY MATEz, the [**Developer Guide**](DeveloperGuide.html) is a good place to start. **Acknowledgements** diff --git a/docs/team/cheeerynne.md b/docs/team/cheeerynne.md new file mode 100644 index 00000000000..c71960cf253 --- /dev/null +++ b/docs/team/cheeerynne.md @@ -0,0 +1,74 @@ +--- +layout: page +title: Chee Erynne's Project Portfolio Page +--- + +## Project: HEY MATEz + +HEY MATEz is a desktop application to get rid of your woes by allowing you to track members and tasks within +a club efficiently and easily! It is a Command Line Interface (CLI) application which handles user requests +that are typed into the input box as commands and it has a GUI created with JavaFX. It is written in Java, and has about 10 kLoC. + +Given below are my contributions to the project. + +* **New Feature**: Added the ability to assign members to a task. (Pull Requests: [\#161](https://github.com/AY2021S2-CS2103T-W14-3/tp/pull/161), [\#163](https://github.com/AY2021S2-CS2103T-W14-3/tp/pull/163)) + * What it does: Allows the user to assign members and edit assignees to a task. + * Justification: This feature improves the product significantly as a user can conveniently track which members are assigned to a task. + Also, users can easily modify the assignees to a task should there be any changes in the assignment of a task. + * Highlights: The implementation was challenging as I had to check whether the specified member's name exists in the + members' list before allowing assignment to a task. I decided to implement an Assignee class, along with a checkAssignees + method within the ModelManager class. The checkAssignees method checks the validity of the specified member's name by + calling the hasPerson method within the ModelManager class. With the checkAssignees method, I was able to check + the validity of the specified names while not creating any unnecessary dependency between the Task and Person classes. + +* **New Feature**: Added the ability to find tasks with keywords. (Pull Requests: [\#133](https://github.com/AY2021S2-CS2103T-W14-3/tp/pull/133)) + * What it does: Allows the user to find all tasks which contain any of the specified keywords in its title or description. + * Justification: This feature improves the product significantly because a user can easily filter and find tasks based on specific + keywords. With this easy filtering, there is no need for users to scroll through the entire list just to find a specific task. + * Highlights: The implementation was challenging as I had to check through the title and description fields of all the tasks + in the task list. I decided to implement a predicate, TaskContainsKeywordPredicate, which compares the title and description of + a task to the list of keywords specified. The task list is then updated with the predicate, displaying tasks whose title or + description contain any of the specified keywords. + +* **New Feature**: Added the ability to find members with keywords. (Pull Requests: [\#130](https://github.com/AY2021S2-CS2103T-W14-3/tp/pull/130)) + * What it does: Allows the user to find all members whose name, phone number, email or role contain any of the specified keywords. + * Justification: This feature improves the product significantly because a user can easily filter and find members based on specific + keywords. With this easy filtering, there is no need for users to scroll through the entire list just to find a specific member. + * Highlights: The implementation was challenging as I had to check through all the fields of the members in the list. + I decided to implement a predicate, DetailsContainsKeywordsPredicate, which compares all the fields of a member to the list of keywords specified. + The members list is then updated with the predicate, displaying members whose details contain any of the specified keywords. + +* **New Feature**: Added the ability to clear all members assigned to a task. (Pull Requests: [\#163](https://github.com/AY2021S2-CS2103T-W14-3/tp/pull/163), [\#174](https://github.com/AY2021S2-CS2103T-W14-3/tp/pull/174)) + * What it does: Allows the user to clear all members assigned to a task. + * Justification: This feature improves the product significantly because should the user accidentally assigned a task to + the wrong group of members, the user can easily clear all members assigned to the task instead of removing one member at a time. + * Highlights: The implementation was challenging as I had to create a copy of the task at the given index and update + the assignees field accordingly, before updating the task list with the updated task copy. + +* **Code contributed**: [RepoSense link](https://nus-cs2103-ay2021s2.github.io/tp-dashboard/?search=&sort=groupTitle&sortWithin=title&since=&timeframe=commit&mergegroup=&groupSelect=groupByRepos&breakdown=false&tabOpen=true&tabType=authorship&tabAuthor=cheeerynne&tabRepo=AY2021S2-CS2103T-W14-3%2Ftp%5Bmaster%5D&authorshipIsMergeGroup=false&authorshipFileTypes=docs~functional-code~test-code&authorshipIsBinaryFileTypeChecked=false) + +* **Project management**: + * Created issues + * Managed milestones and issues + +* **Enhancements to existing features**: + * Updated the deleteMember and editMember commands to delete/edit by name instead of index. (Pull Requests: [\#70](https://github.com/AY2021S2-CS2103T-W14-3/tp/pull/70), [\#85](https://github.com/AY2021S2-CS2103T-W14-3/tp/pull/85)) + * Added JavaDoc comments to existing classes for better documentation. (Pull Requests: [\#187](https://github.com/AY2021S2-CS2103T-W14-3/tp/pull/187)) + +* **Documentation**: + * User Guide: + * Added documentation for the commands `findTasks`, `findMembers` and `clearAssignees`. (Pull Requests: [\#137](https://github.com/AY2021S2-CS2103T-W14-3/tp/pull/137), [\#166](https://github.com/AY2021S2-CS2103T-W14-3/tp/pull/166)) + * Categorized and organized the User Guide. (Pull Requests: [\#166](https://github.com/AY2021S2-CS2103T-W14-3/tp/pull/166)) + * Added introduction and mockup of application. (Pull Requests: [\#23](https://github.com/AY2021S2-CS2103T-W14-3/tp/pull/23)) + + * Developer Guide: + * Updated the Storage UML Diagram in the DG. (Pull Requests: [\#191](https://github.com/AY2021S2-CS2103T-W14-3/tp/pull/191), [\#273](https://github.com/AY2021S2-CS2103T-W14-3/tp/pull/273)) + * Added implementation explanation for `clearAssignees` command. (Pull Requests: [\#191](https://github.com/AY2021S2-CS2103T-W14-3/tp/pull/191), [\#291](https://github.com/AY2021S2-CS2103T-W14-3/tp/pull/291)) + * Added and updated use cases in the Developer Guide. (Pull Requests: [\#143](https://github.com/AY2021S2-CS2103T-W14-3/tp/pull/143), [\#171](https://github.com/AY2021S2-CS2103T-W14-3/tp/pull/171)) + * Added manual testing instructions for various commands. (Pull Requests: [\#284](https://github.com/AY2021S2-CS2103T-W14-3/tp/pull/284)) + +* **Community**: + * PRs reviewed (Pull requests: [\#246](https://github.com/AY2021S2-CS2103T-W14-3/tp/pull/246), [\#276](https://github.com/AY2021S2-CS2103T-W14-3/tp/pull/276), [\#283](https://github.com/AY2021S2-CS2103T-W14-3/tp/pull/283)) + * Reported bugs and suggestions for other teams in the class (Examples: [1](https://github.com/cheeerynne/ped/issues/11), [2](https://github.com/cheeerynne/ped/issues/12), [3](https://github.com/cheeerynne/ped/issues/9)) + + diff --git a/docs/team/johndoe.md b/docs/team/johndoe.md deleted file mode 100644 index 1f1e9e6f6db..00000000000 --- a/docs/team/johndoe.md +++ /dev/null @@ -1,46 +0,0 @@ ---- -layout: page -title: John Doe's Project Portfolio Page ---- - -## Project: AddressBook Level 3 - -AddressBook - Level 3 is a desktop address book application used for teaching Software Engineering principles. The user interacts with it using a CLI, and it has a GUI created with JavaFX. It is written in Java, and has about 10 kLoC. - -Given below are my contributions to the project. - -* **New Feature**: Added the ability to undo/redo previous commands. - * What it does: allows the user to undo all previous commands one at a time. Preceding undo commands can be reversed by using the redo command. - * Justification: This feature improves the product significantly because a user can make mistakes in commands and the app should provide a convenient way to rectify them. - * Highlights: This enhancement affects existing commands and commands to be added in future. It required an in-depth analysis of design alternatives. The implementation too was challenging as it required changes to existing commands. - * Credits: *{mention here if you reused any code/ideas from elsewhere or if a third-party library is heavily used in the feature so that a reader can make a more accurate judgement of how much effort went into the feature}* - -* **New Feature**: Added a history command that allows the user to navigate to previous commands using up/down keys. - -* **Code contributed**: [RepoSense link]() - -* **Project management**: - * Managed releases `v1.3` - `v1.5rc` (3 releases) on GitHub - -* **Enhancements to existing features**: - * Updated the GUI color scheme (Pull requests [\#33](), [\#34]()) - * Wrote additional tests for existing features to increase coverage from 88% to 92% (Pull requests [\#36](), [\#38]()) - -* **Documentation**: - * User Guide: - * Added documentation for the features `delete` and `find` [\#72]() - * Did cosmetic tweaks to existing documentation of features `clear`, `exit`: [\#74]() - * Developer Guide: - * Added implementation details of the `delete` feature. - -* **Community**: - * PRs reviewed (with non-trivial review comments): [\#12](), [\#32](), [\#19](), [\#42]() - * Contributed to forum discussions (examples: [1](), [2](), [3](), [4]()) - * Reported bugs and suggestions for other teams in the class (examples: [1](), [2](), [3]()) - * Some parts of the history feature I added was adopted by several other class mates ([1](), [2]()) - -* **Tools**: - * Integrated a third party library (Natty) to the project ([\#42]()) - * Integrated a new Github plugin (CircleCI) to the team repo - -* _{you can add/remove categories in the list above}_ diff --git a/docs/team/rachelljt.md b/docs/team/rachelljt.md new file mode 100644 index 00000000000..7dd643b86c7 --- /dev/null +++ b/docs/team/rachelljt.md @@ -0,0 +1,81 @@ +--- +layout: page +title: Rachel Lim's Project Portfolio Page +--- + +## Project: HEY MATEz + +HEY MATEz is a desktop application to get rid of your woes by allowing you to track members and tasks within a club efficiently and easily! +It is a Command Line Interface (CLI) application which handles user requests that are typed into the input box as commands and +it has a GUI created with JavaFX. It is written in Java, and has about 10 kLoC. + +Given below are my contributions to the project. + +* **New Feature**: Added the ability to delete tasks. (Pull Requests: [\#67](https://github.com/AY2021S2-CS2103T-W14-3/tp/pull/67), [\#106](https://github.com/AY2021S2-CS2103T-W14-3/tp/pull/106), [\#246](https://github.com/AY2021S2-CS2103T-W14-3/tp/pull/246)) + * What it does: Allows the user to delete a specific task given a valid index. + * Justification: This feature allows the user to delete an existing task in the list based on a given index. + Should the user accidentally add a task, they can delete it easily just by using the `deleteTask` command. + * Highlights: The implementation was challenging as it required changes to existing commands. When the index is parsed, I had to take into account of the different scenarios. + For instance, I had to change the function of isNonZeroUnsignedInteger in StringUtil.java from a boolean function to an + int function so that '1' will be returned if the index is a valid integer(positive integer), + '2' for an invalid integer(non-positive integer) and '3' for an invalid input(spaces, alphanumeric) such that different error messages would be thrown + should the index differ from the format. + + +* **New Feature**: Added the ability to view a list of uncompleted tasks. (Pull Requests: [\#117](https://github.com/AY2021S2-CS2103T-W14-3/tp/pull/117), [\#252](https://github.com/AY2021S2-CS2103T-W14-3/tp/pull/252)) + * What it does: Allows the user to view a list of tasks that have not been completed. + * Justification: This feature improves the product significantly because a user can easily view a list of uncompleted tasks upon inputting the command + which greatly saves the time of the user, instead of manually searching for a list uncompleted tasks. + * Highlights: The implementation was challenging as it required me to create another predicate to filter a list of + uncompleted tasks. Furthermore, I had to create a boolean function `isCompleted` in the `Task` class instead of calling `task.taskStatus` to prevent breaking the abstraction barrier in + order to filter the list of uncompleted tasks. + Also, I had to take into account of the different messages displayed in different situations such as when there are no uncompleted tasks found. + Lastly, I had to do heavy testing to account for the different scenarios of usage which was quite tedious as some commands + have to be modified. + + +* **New Feature**: Added the ability to view a list of unassigned tasks. (Pull Requests [\#162](https://github.com/AY2021S2-CS2103T-W14-3/tp/pull/162), [\#252](https://github.com/AY2021S2-CS2103T-W14-3/tp/pull/252)) + * What it does: Allows the user to view a list of tasks that have not been assigned to any member. + * Justification: This feature improves the product significantly because a user can easily view a list of unassigned tasks upon inputting the command + which greatly saves the time of the user, instead of manually searching for a list of unassigned tasks. + * Highlights: The implementation was challenging as it required me to create another predicate to filter a list of + unassigned tasks. Furthermore, I had to create a boolean function `isAssigned` in `Task` class instead of calling `task.assignees.isEmpty()` to prevent breaking the abstraction barrier in + order to filter the list of unassigned tasks. + Also, I had to take into account of the different messages displayed in different situations such as when there are no unassigned tasks found. + Finally, I had to do heavy testing to account for the different scenarios of usage which was quite challenging as some commands + have to be changed. + + +* **Code contributed**: [RepoSense link](https://nus-cs2103-ay2021s2.github.io/tp-dashboard/?search=&sort=groupTitle&sortWithin=title&since=&timeframe=commit&mergegroup=&groupSelect=groupByRepos&breakdown=false&tabOpen=true&tabType=authorship&zFR=false&tabAuthor=rachelljt&tabRepo=AY2021S2-CS2103T-W14-3%2Ftp%5Bmaster%5D&authorshipIsMergeGroup=false&authorshipFileTypes=docs~functional-code~test-code&authorshipIsBinaryFileTypeChecked=false) + + +* **Project management**: + * Create issues + * Set up unit testing for tasks + * Managed milestones and issues + + +* **Enhancements to existing features**: + * Change the User Interface of the app (Pull requests: [\#110](https://github.com/AY2021S2-CS2103T-W14-3/tp/pull/110), [\#128](https://github.com/AY2021S2-CS2103T-W14-3/tp/pull/128), [\#238](https://github.com/AY2021S2-CS2103T-W14-3/tp/pull/238)) + + +* **Documentation**: + * User Guide: + * Added documentation for the commands `deleteTask`, `viewTasks`, `viewUncompletedTasks`, `viewUnassignedTasks` (Pull requests: [\#117](https://github.com/AY2021S2-CS2103T-W14-3/tp/pull/117), [\#160](https://github.com/AY2021S2-CS2103T-W14-3/tp/pull/160)) + * Embedded a link to download Java 11 at the Quick Start section (Pull Requests: [\#189](https://github.com/AY2021S2-CS2103T-W14-3/tp/pull/189)) + + * Developer Guide: + * Updated the user stories in the Developer Guide (Pull requests: [\#138](https://github.com/AY2021S2-CS2103T-W14-3/tp/pull/138), [\#169](https://github.com/AY2021S2-CS2103T-W14-3/tp/pull/169), [\#274](https://github.com/AY2021S2-CS2103T-W14-3/tp/pull/274)) + * Updated the User Interface UML Diagram, Sequence Diagram in the Developer Guide (Pull requests: [\#185](https://github.com/AY2021S2-CS2103T-W14-3/tp/pull/185)) + * Updated the Architecture Sequence Diagram in the Developer Guide (Pull requests: [\#189](https://github.com/AY2021S2-CS2103T-W14-3/tp/pull/189)) + * Added the implementation explanation for `deleteTask` (Pull requests: [\#185](https://github.com/AY2021S2-CS2103T-W14-3/tp/pull/185)) + * Added activity diagram for `deleteTask` (Pull requests: [\#290](https://github.com/AY2021S2-CS2103T-W14-3/tp/pull/290)) + * Added manual testing instructions for `viewTasks`, `deleteTask`, `viewUnassignedTasks`, `viewUncompletedTasks` (Pull requests: [\#285](https://github.com/AY2021S2-CS2103T-W14-3/tp/pull/285)) + + +* **Community**: + * PRs reviewed (Pull requests: [\#247](https://github.com/AY2021S2-CS2103T-W14-3/tp/pull/247), [\#268](https://github.com/AY2021S2-CS2103T-W14-3/tp/pull/268)) + * Contributed to forum discussions (Examples: [1](https://github.com/nus-cs2103-AY2021S2/forum/issues/182)) + * Reported bugs and suggestions for other teams in the class (Examples: [1](https://github.com/rachelljt/ped/issues/4), [2](https://github.com/rachelljt/ped/issues/1), [3](https://github.com/rachelljt/ped/issues/6)) + + diff --git a/docs/team/tashawan23.md b/docs/team/tashawan23.md new file mode 100644 index 00000000000..67a8ac5b768 --- /dev/null +++ b/docs/team/tashawan23.md @@ -0,0 +1,67 @@ +--- +layout: page +title: Tasha Wan's Project Portfolio Page +--- + +## Project: HEY MATEz + +HEY MATEz is a desktop application to get rid of your woes by allowing you to track members and tasks within a club efficiently and easily! +It is a Command Line Interface (CLI) application which handles user requests that are typed into the input box as commands and +it has a GUI created with JavaFX. It is written in Java, and has about 10 kLoC. + +Given below are my contributions to the project. + +* **New Feature**: Added the ability to add and edit tasks. + * What it does: Allows the user to add a task with a title, and description as well as edit these details. + (Pull Requests: [\#62](https://github.com/AY2021S2-CS2103T-W14-3/tp/pull/62), [\#63](https://github.com/AY2021S2-CS2103T-W14-3/tp/pull/63)) + * Justification: This feature allows the user to add a task to the task list and edit the task based on its index. + Should the user need to update the details of a task, they can edit it easily. + * Highlights: The implementation was challenging as it involved creating a task list to store added tasks that had to be included in the storage as well. + I represented each task as a JsonAdaptedTask to be added into the HeyMatez storage along with the members. + +* **New Feature**: Added the ability to add a deadline to tasks. (Pull Requests: [\#107](https://github.com/AY2021S2-CS2103T-W14-3/tp/pull/107), [\#116](https://github.com/AY2021S2-CS2103T-W14-3/tp/pull/116)) + * What it does: Allows the user to add a deadline to tasks. + * Justification: This feature improves the ability to track tasks based on their deadlines so that users can ensure tasks are completed on time. + * Highlights: The implementation was challenging as it required me to implement a deadline parser which could parse a valid deadline provided in the + correct format. I had to handle the errors of incorrect deadline format by comparing it to the required format as well as invalid dates which are not + found in the calendar. This is so that the user can be notified correctly by the corresponding error messages when the deadline cannot be parsed. + +* **New Feature**: Added the ability to add a role to members and edit a member's role. + * What it does: Allows the user to add a role to any member and edit this role. (Pull Requests: [\#109](https://github.com/AY2021S2-CS2103T-W14-3/tp/pull/109), [\#111](https://github.com/AY2021S2-CS2103T-W14-3/tp/pull/111)) + * Justification: This feature allows users to add the member's role so that they can better manage members, and assign tasks to them correspondingly. + * Highlights: The implementation was challenging as the member role is an optional field. I had to take into account the situation where the user does not + specify a member role while adding a member and assign a default value to the field. I decided to assign a default value of member to all members added + unless specified by the user. + +* **New Feature**: Added the ability to find tasks due before a certain deadline. + * What it does: Allows the user to view list of tasks with deadlines before the provided date. (Pull Requests: [\#153](https://github.com/AY2021S2-CS2103T-W14-3/tp/pull/153)) + * Justification: This feature improves the product significantly because a user can conveniently search for tasks that are due soon or due before a specified + date to ensure that these tasks are completed on time. + * Highlights: The implementation was challenging as task deadlines have to be compared using a predicate that compares deadlines as a LocalDate. + +* **Code contributed**: [RepoSense link](https://nus-cs2103-ay2021s2.github.io/tp-dashboard/?search=w14&sort=groupTitle&sortWithin=title&since=2021-02-19&timeframe=commit&mergegroup=&groupSelect=groupByRepos&breakdown=false&tabOpen=true&tabType=authorship&zFR=false&tabAuthor=tashawan23&tabRepo=AY2021S2-CS2103T-W14-3%2Ftp%5Bmaster%5D&authorshipIsMergeGroup=false&authorshipFileTypes=docs~functional-code~test-code~other&authorshipIsBinaryFileTypeChecked=false) + +* **Project management**: + * Create issues. + * Managed milestones and issues. + * Set up Github repository. + +* **Enhancements to existing features**: + * Reorganise project structure by renaming directories and files to our product. (Pull requests: [\#181](https://github.com/AY2021S2-CS2103T-W14-3/tp/pull/181)) + +* **Documentation**: + * User Guide: + * Added documentation for the commands `addTask`, `editTask`, `findTasksBefore` (Pull requests: [\#108](https://github.com/AY2021S2-CS2103T-W14-3/tp/pull/108), [\#119](https://github.com/AY2021S2-CS2103T-W14-3/tp/pull/119)) + * Wrote the introduction and purpose of the user guide as well as use case scenarios for each command (Pull Requests: [\#196](https://github.com/AY2021S2-CS2103T-W14-3/tp/pull/196), [\#190](https://github.com/AY2021S2-CS2103T-W14-3/tp/pull/190)) + + * Developer Guide: + * Update the use cases in the Developer Guide (Pull requests: [\#139](https://github.com/AY2021S2-CS2103T-W14-3/tp/pull/139), [\#155](https://github.com/AY2021S2-CS2103T-W14-3/tp/pull/155)) + * Update the Logic and Model UML Diagrams in the Developer Guide (Pull requests: [\#173](https://github.com/AY2021S2-CS2103T-W14-3/tp/pull/173)) + * Update FindBefore Sequence Diagram in the Developer Guide (Pull requests: [\#186](https://github.com/AY2021S2-CS2103T-W14-3/tp/pull/186)) + * Add implementation explanation for `findBefore` command (Pull requests: [\#186](https://github.com/AY2021S2-CS2103T-W14-3/tp/pull/186)) + +* **Community**: + * PRs reviewed (Example pull requests: [\#185](https://github.com/AY2021S2-CS2103T-W14-3/tp/pull/185)) + * Reported bugs and suggestions for other teams in the class (examples: [1](https://github.com/tashawan23/ped/issues/3), [2](https://github.com/tashawan23/ped/issues/9), [3](https://github.com/tashawan23/ped/issues/5)) + + diff --git a/docs/team/zatkiller.md b/docs/team/zatkiller.md new file mode 100644 index 00000000000..bfa1010e2e6 --- /dev/null +++ b/docs/team/zatkiller.md @@ -0,0 +1,75 @@ +--- +layout: page +title: Dylan Ghee's Project Portfolio Page +--- + +## Project: HEY MATEz + +HEY MATEz is a desktop application to get rid of your woes by allowing you to track members and tasks within a club efficiently and easily! +It is a Command Line Interface (CLI) application which handles user requests that are typed into the input box as commands and +it has a GUI created with JavaFX. It is written in Java, and has about 10 kLoC. + +Given below are my contributions to the project. + +* **New Feature**: Added the ability to mark a task as completed or uncompleted. (Pull Requests: [\#96](https://github.com/AY2021S2-CS2103T-W14-3/tp/pull/101), [\#101](https://github.com/AY2021S2-CS2103T-W14-3/tp/pull/101)) + + * What it does: allows the user to change the status of a task from completed or uncompleted. + + * Justification: This feature improves the product significantly because a user can indicate whether a task is completed or uncompleted. With this indication, users + are able to focus on tasks that are not completed yet. + + * Highlights: The implementation was challenging as I had to design the feature such that it was only restricted to 2 values - completed and uncompleted. After taking into account design + considerations, I decided to implement an Enum class named TaskStatus, with UNCOMPLETED and COMPLETED as the enum constants. Using this, I was able to add an additional attribute + to the Task Class, status, while being able to restrict the allowed values of a task's status to completed and uncompleted. + +* **New Feature**: Added the ability to prioritize a task. (Pull Requests: [\#114](https://github.com/AY2021S2-CS2103T-W14-3/tp/pull/114)) + + * What it does: allows the user to assign a task a certain priority. + + * Justification: This feature improves the product significantly because a user can indicate the priority of a task - high, medium, low or unassigned. With this priority value, users + will be to focus on tasks which are of higher priority. + + * Highlights: The implementation was challenging as I had to design the feature such that it was only restricted to 4 values - high, medium, low and unassigned. After taking into account design + considerations, I decided to implement an Enum class named PRIORITY, with HIGH, MEDIUM, LOW and UNASSIGNED as the enum constants. Using this, I was able to add an additional attribute + to the Task Class, priority, while being able to restrict the allowed values of a task's priority to high, medium, low or unassigned. + +* **New Feature**: Added the ability to find tasks assigned to a particular member. (Pull Requests: [\#168](https://github.com/AY2021S2-CS2103T-W14-3/tp/pull/168)) + + * What it does: allows the user to find all tasks assigned to a particular member. + + * Justification: This feature improves the product significantly because a user can conveniently search what tasks has been assigned to a particular member. + + * Highlights: The implementation was challenging as I had to think of a way to check which tasks have been assigned to a particular member. After considering the current software architecture, + I made a decision to implement a predicate, TaskContainsAssigneePredicate. When the Task List is updated with the predicate, the predicate calls the `hasAssignee` method of the Task class to check + if the name specified in the command exists as an assignee and updates the Task List accordingly. + +* **Code contributed**: [RepoSense link](https://nus-cs2103-ay2021s2.github.io/tp-dashboard/?search=&sort=groupTitle&sortWithin=title&since=&timeframe=commit&mergegroup=&groupSelect=groupByRepos&breakdown=false&tabOpen=true&tabType=zoom&zA=zatkiller&zR=AY2021S2-CS2103T-W14-3%2Ftp%5Bmaster%5D&zACS=233.65598705501617&zS=2021-02-19&zFS=&zU=2021-04-05&zMG=undefined&zFTF=commit&zFGS=groupByRepos&zFR=false) + +* **Project management**: + * Responsible for project direction and task delegation + * Managed releases `v1.1, v1.2, v1.2.1, v1.3` (4 releases) on GitHub + * Set up github organization and repository + * Set up continuous integration + * Create milestones and issues + +* **Enhancements to existing features**: + * Updated add and list commands to addMember and viewMember commands (Pull requests: [\#66](https://github.com/AY2021S2-CS2103T-W14-3/tp/pull/66), [\#68](https://github.com/AY2021S2-CS2103T-W14-3/tp/pull/68), [\#71](https://github.com/AY2021S2-CS2103T-W14-3/tp/pull/71)) + * Remove redundant Address class and instances (Pull requests [\#65](https://github.com/AY2021S2-CS2103T-W14-3/tp/pull/65), [\#151](https://github.com/AY2021S2-CS2103T-W14-3/tp/pull/151)) + * Add sample tasks to existing sample data which only contains sample persons (Pull requests [\#125](https://github.com/AY2021S2-CS2103T-W14-3/tp/pull/125)) + +* **Documentation**: + * User Guide: + * Added documentation for the commands `done` and `undo` (Pull requests: [\#101](https://github.com/AY2021S2-CS2103T-W14-3/tp/pull/101)) + * Added Introduction, Summary and List of Content (Pull requests: [\#154](https://github.com/AY2021S2-CS2103T-W14-3/tp/pull/154), [\#179](https://github.com/AY2021S2-CS2103T-W14-3/tp/pull/179)) + + * Developer Guide: + * Update the user stories in the Developer Guide (Pull requests: [\#105](https://github.com/AY2021S2-CS2103T-W14-3/tp/pull/105)) + * Update the Model Diagram in the Developer Guide (Pull requests: [\#188](https://github.com/AY2021S2-CS2103T-W14-3/tp/pull/188)) + * Add implementation documentation for done and undo command (Pull requests: [\#134](https://github.com/AY2021S2-CS2103T-W14-3/tp/pull/134)) + +* **Community**: + * PRs reviewed (with non-trivial review comments) (Pull requests: [\#187](https://github.com/AY2021S2-CS2103T-W14-3/tp/pull/187), [\#67](https://github.com/AY2021S2-CS2103T-W14-3/tp/pull/67), [\#70](https://github.com/AY2021S2-CS2103T-W14-3/tp/pull/70)) + * Contributed to forum discussions (examples: [1](https://github.com/nus-cs2103-AY2021S2/forum/issues/117)) + * Reported bugs and suggestions for other teams in the class (examples: [1](https://github.com/zatkiller/ped/issues/4), [2](https://github.com/zatkiller/ped/issues/2), [3](https://github.com/zatkiller/ped/issues/7)) + + diff --git a/docs/tutorials/AddRemark.md b/docs/tutorials/AddRemark.md deleted file mode 100644 index 64c9b1f91de..00000000000 --- a/docs/tutorials/AddRemark.md +++ /dev/null @@ -1,394 +0,0 @@ ---- -layout: page -title: "Tutorial: Adding a command" ---- - -Let's walk you through the implementation of a new command — `remark`. - -This command allows users of the AddressBook application to add optional remarks to people in their address book and edit it if required. The command should have the following format: - -`remark INDEX r/REMARK` (e.g., `remark 2 r/Likes baseball`) - -We’ll assume that you have already set up the development environment as outlined in the Developer’s Guide. - - -## Create a new `remark` command - -Looking in the `logic.command` package, you will notice that each existing command have their own class. All the commands inherit from the abstract class `Command` which means that they must override `execute()`. Each `Command` returns an instance of `CommandResult` upon success and `CommandResult#feedbackToUser` is printed to the `ResultDisplay`. - -Let’s start by creating a new `RemarkCommand` class in the `src/main/java/seedu/address/logic/command` directory. - -For now, let’s keep `RemarkCommand` as simple as possible and print some output. We accomplish that by returning a `CommandResult` with an accompanying message. - -**`RemarkCommand.java`:** - -``` java -package seedu.address.logic.commands; - -import seedu.address.model.Model; - -/** - * Changes the remark of an existing person in the address book. - */ -public class RemarkCommand extends Command { - - public static final String COMMAND_WORD = "remark"; - - @Override - public CommandResult execute(Model model) { - return new CommandResult("Hello from remark"); - } -} -``` - -### Hook `RemarkCommand` into the application - -Now that we have our `RemarkCommand` ready to be executed, we need to update `AddressBookParser#parseCommand()` to recognize the `remark` keyword. Add the new command to the `switch` block by creating a new `case` that returns a new instance of `RemarkCommand`. - -You can refer to the changes in this [diff](https://github.com/se-edu/addressbook-level3/commit/35eb7286f18a029d39cb7a29df8f172a001e4fd8#diff-34ace715a8a8d2e5a66e71289f017b47). - -### Run the application - -Run `Main#main` and try out your new `RemarkCommand`. If everything went well, you should see something like this: - -![Output displayed](../images/add-remark/RemarkHello.png) - -## Change `RemarkCommand` to throw an exception - -While we have successfully printed a message to `ResultDisplay`, the command does not do what it is supposed to do. Let’s change the command to throw a `CommandException` to accurately reflect that our command is still a work in progress. - -![The relationship between RemarkCommand and Command](../images/add-remark/CommandInterface.png) - -Following the convention in other commands, we add relevant messages as constants and use them. - -**`RemarkCommand.java`:** - -``` java - public static final String MESSAGE_USAGE = COMMAND_WORD + ": Edits the remark of the person identified " - + "by the index number used in the last person listing. " - + "Existing remark will be overwritten by the input.\n" - + "Parameters: INDEX (must be a positive integer) " - + "r/ [REMARK]\n" - + "Example: " + COMMAND_WORD + " 1 " - + "r/ Likes to swim."; - - public static final String MESSAGE_NOT_IMPLEMENTED_YET = "Remark command not implemented yet"; - - @Override - public CommandResult execute(Model model) throws CommandException { - throw new CommandException(MESSAGE_NOT_IMPLEMENTED_YET); - } -``` - -## Enhancing `RemarkCommand` - -Let’s change `RemarkCommand` to parse input from the user. - -### Make the command accept parameters - -We start by modifying the constructor of `RemarkCommand` to accept an `Index` and a `String`. While we are at it, let’s change the error message to echo the values. While this is not a replacement for tests, it is an obvious way to tell if our code is functioning as intended. - -``` java -import static seedu.address.commons.util.CollectionUtil.requireAllNonNull; -//... -public class RemarkCommand extends Command { - //... - public static final String MESSAGE_ARGUMENTS = "Index: %1$d, Remark: %2$s"; - - private final Index index; - private final String remark; - - /** - * @param index of the person in the filtered person list to edit the remark - * @param remark of the person to be updated to - */ - public RemarkCommand(Index index, String remark) { - requireAllNonNull(index, remark); - - this.index = index; - this.remark = remark; - } - @Override - public CommandResult execute(Model model) throws CommandException { - throw new CommandException(String.format(MESSAGE_ARGUMENTS, index.getOneBased(), remark)); - } - - @Override - public boolean equals(Object other) { - // short circuit if same object - if (other == this) { - return true; - } - - // instanceof handles nulls - if (!(other instanceof RemarkCommand)) { - return false; - } - - // state check - RemarkCommand e = (RemarkCommand) other; - return index.equals(e.index) - && remark.equals(e.remark); - } -} -``` - -Your code should look something like [this](https://github.com/se-edu/addressbook-level3/commit/35eb7286f18a029d39cb7a29df8f172a001e4fd8#diff-34ace715a8a8d2e5a66e71289f017b47) after you are done. - -### Parse user input - -Now let’s move on to writing a parser that will extract the index and remark from the input provided by the user. - -Create a `RemarkCommandParser` class in the `seedu.address.logic.parser` package. The class must extend the `Parser` interface. - -![The relationship between Parser and RemarkCommandParser](../images/add-remark/ParserInterface.png) - -Thankfully, `ArgumentTokenizer#tokenize()` makes it trivial to parse user input. Let’s take a look at the JavaDoc provided for the function to understand what it does. - -**`ArgumentTokenizer.java`:** - -``` java -/** - * Tokenizes an arguments string and returns an {@code ArgumentMultimap} - * object that maps prefixes to their respective argument values. Only the - * given prefixes will be recognized in the arguments string. - * - * @param argsString Arguments string of the form: - * {@code preamble value value ...} - * @param prefixes Prefixes to tokenize the arguments string with - * @return ArgumentMultimap object that maps prefixes to their - * arguments - */ -``` - -We can tell `ArgumentTokenizer#tokenize()` to look out for our new prefix `r/` and it will return us an instance of `ArgumentMultimap`. Now let’s find out what we need to do in order to obtain the Index and String that we need. Let’s look through `ArgumentMultimap` : - -**`ArgumentMultimap.java`:** - -``` java -/** - * Returns the last value of {@code prefix}. - */ -public Optional getValue(Prefix prefix) { - List values = getAllValues(prefix); - return values.isEmpty() ? Optional.empty() : - Optional.of(values.get(values.size() - 1)); -} -``` - -This appears to be what we need to get a String of the remark. But what about the Index? Let's take a quick peek at existing `Command` that uses an index to see how it is done. - -**`DeleteCommandParser.java`:** - -``` java -Index index = ParserUtil.parseIndex(args); -return new DeleteCommand(index); -``` - -There appears to be another utility class that obtains an `Index` from the input provided by the user. - -Now that we have the know-how to extract the data that we need from the user’s input, we can parse the user command and create a new instance of `RemarkCommand`, as given below. - -**`RemarkCommandParser.java`:** - -``` java -public RemarkCommand parse(String args) throws ParseException { - requireNonNull(args); - ArgumentMultimap argMultimap = ArgumentTokenizer.tokenize(args, - PREFIX_REMARK); - - Index index; - try { - index = ParserUtil.parseIndex(argMultimap.getPreamble()); - } catch (IllegalValueException ive) { - throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, - RemarkCommand.MESSAGE_USAGE), ive); - } - - String remark = argMultimap.getValue(PREFIX_REMARK).orElse(""); - - return new RemarkCommand(index, remark); -} -``` - -
- -:information_source: Don’t forget to update `AddressBookParser` to use our new `RemarkCommandParser`! - -
- -If you are stuck, check out the sample -[here](https://github.com/se-edu/addressbook-level3/commit/dc6d5139d08f6403da0ec624ea32bd79a2ae0cbf#diff-fc19ecee89c3732a62fbc8c840250508). - -## Add `Remark` to the model - -Now that we have all the information that we need, let’s lay the groundwork for propagating the remarks added into the in-memory storage of person data. We achieve that by working with the `Person` model. Each field in a Person is implemented as a separate class (e.g. a `Name` object represents the person’s name). That means we should add a `Remark` class so that we can use a `Remark` object to represent a remark given to a person. - -### Add a new `Remark` class - -Create a new `Remark` in `seedu.address.model.person`. Since a `Remark` is a field that is similar to `Address`, we can reuse a significant bit of code. - -A copy-paste and search-replace later, you should have something like [this](https://github.com/se-edu/addressbook-level3/commit/4516e099699baa9e2d51801bd26f016d812dedcc#diff-af2f075d24dfcd333876f0fbce321f25). Note how `Remark` has no constrains and thus does not require input -validation. - -### Make use of `Remark` - -Let’s change `RemarkCommand` and `RemarkCommandParser` to use the new `Remark` class instead of plain `String`. These should be relatively simple changes. - -## Add a placeholder element for remark to the UI - -Without getting too deep into `fxml`, let’s go on a 5 minute adventure to get some placeholder text to show up for each person. - -Simply add the following to [`seedu.address.ui.PersonCard`](https://github.com/se-edu/addressbook-level3/commit/850b78879582f38accb05dd20c245963c65ea599#diff-0c6b6abcfac8c205e075294f25e851fe). - -**`PersonCard.java`:** - -``` java -@FXML -private Label remark; -``` - - -`@FXML` is an annotation that marks a private or protected field and makes it accessible to FXML. It might sound like Greek to you right now, don’t worry — we will get back to it later. - -Then insert the following into [`main/resources/view/PersonListCard.fxml`](https://github.com/se-edu/addressbook-level3/commit/850b78879582f38accb05dd20c245963c65ea599#diff-12580431f55d7880578aa4c16f249e71). - -**`PersonListCard.fxml`:** - -``` xml -