From a6d3e65d24b2e237e36f7402fe3cce1bcfca228f Mon Sep 17 00:00:00 2001 From: Zhouyirui <72332263+Zhouyirui@users.noreply.github.com> Date: Mon, 8 Nov 2021 14:52:43 +0800 Subject: [PATCH 1/7] Update PPP --- docs/team/rushilramesh.md | 2 +- docs/team/zhouyirui.md | 32 ++++++++++++++++++++++++++++++-- 2 files changed, 31 insertions(+), 3 deletions(-) diff --git a/docs/team/rushilramesh.md b/docs/team/rushilramesh.md index 95664587052..d7b55e58457 100644 --- a/docs/team/rushilramesh.md +++ b/docs/team/rushilramesh.md @@ -11,7 +11,7 @@ Given below are my contributions to the project. * **Code contributed**: Check out my contributions [here](https://nus-cs2103-ay2122s1.github.io/tp-dashboard/) -* **Enchancements Implemented**: +* **Enhancements Implemented**: * New Feature: Added the ability to add tutorial classes: * PR [\#94](https://github.com/AY2122S1-CS2103T-W15-1/tp/pull/94), [\#97](https://github.com/AY2122S1-CS2103T-W15-1/tp/pull/97) * Allows the user to create a tutorial class with a class code and schedule (and optional tags) so that diff --git a/docs/team/zhouyirui.md b/docs/team/zhouyirui.md index e7db91c06f0..df391ba3d84 100644 --- a/docs/team/zhouyirui.md +++ b/docs/team/zhouyirui.md @@ -11,9 +11,37 @@ Given below are my contributions to the project. * **Code contributed**: [RepoSense link](https://nus-cs2103-ay2122s1.github.io/tp-dashboard/) +* **Enhancements Implemented** + * Added a new parameter ClassCode for Students, Tutorial Group and Tutorial Classes + * PR [\#113](https://github.com/AY2122S1-CS2103T-W15-1/tp/pull/113), PR [\#131](https://github.com/AY2122S1-CS2103T-W15-1/tp/pull/131) + * This parameter is refers to the ClassCode of the Tutorial Class that a Student belongs to. It contains a default + value that when assigned to a Student indicates the Student does not have a class. + * Updated more than 25 files in the process of implementing ClassCode. Includes changing every instance of a Student and Tutorial Class (which used ClassCode as a String initially). + * Changed the implementation of ClassCode from using INDEX to a parameter when a Student is first added. + * Challenge was when I added validation for ClassCode. This resulted in me changing 17 test files in the tedious debugging process, + and to correct the previous accepted format of ClassCode in test cases. I also added `TypicalClassmate` to allow verification of ClassCode in tests. + * The process of implementing ClassCode required in depth knowledge of the `model`, how data for test cases are created, and used for testing for classes. + * Adding Student to Tutorial Group + * PR [\#149](https://github.com/AY2122S1-CS2103T-W15-1/tp/pull/149) + * Allows Student to be assigned to a Tutorial Group within their Tutorial Class + * Referenced the implementation of `Tags` when adding `Tutorial Group` as parameter of a Student. One difference in implementation + was that `Tutorial Groups` are accumulated by default. I also made changes to UI to allow Tutorial Groups to be shown in a Student's + profile card. + * Added verification of `Tutorial Groups` to ensure Student is only added to at most 1 Tutorial Group of each Group Type. + * Deleting Student from Tutorial Group + * PR [\#150](https://github.com/AY2122S1-CS2103T-W15-1/tp/pull/150) + * Allows Student to be removed from a Tutorial Group within their Tutorial Class + * Referenced the implementation of `Tags` when adding `Tutorial Group` as parameter of a Student. One difference in implementation + was that `Tutorial Groups` can be deleted selectively. + + * **Documentation**: * User Guide: - * Added documentations for the features `addsg`,`deleteg` and `viewg` [\#55]() + * Added documentations for the features `addsg`,`deleteg` and `viewg` [\#66](https://github.com/AY2122S1-CS2103T-W15-1/tp/pull/66) + * Added and updated documentations for the features `addsg` and `deletesg` [\#154](https://github.com/AY2122S1-CS2103T-W15-1/tp/pull/154) * README: - * Added a mockup for classMATE [\#54]() + * Added a mockup for classMATE [\#70](https://github.com/AY2122S1-CS2103T-W15-1/tp/pull/70) * Added details of the project and Continuous Integration badge + * Developers Guide: + * Added documentations for the features `classCode`. PR: [\#134](https://github.com/AY2122S1-CS2103T-W15-1/tp/pull/134) + * Added documentations for the features `addsg` and `deletesg`. \ No newline at end of file From 668943f2d7064698d9bf4f672a838976003cc22c Mon Sep 17 00:00:00 2001 From: Zhouyirui <72332263+Zhouyirui@users.noreply.github.com> Date: Mon, 8 Nov 2021 16:17:06 +0800 Subject: [PATCH 2/7] Add documentation of addsg and deletesg to DG --- docs/DeveloperGuide.md | 47 +++++++++++++++++++++++++++++++++++------- docs/team/zhouyirui.md | 3 ++- 2 files changed, 42 insertions(+), 8 deletions(-) diff --git a/docs/DeveloperGuide.md b/docs/DeveloperGuide.md index 58e97a2f803..8e0c51df89a 100644 --- a/docs/DeveloperGuide.md +++ b/docs/DeveloperGuide.md @@ -319,26 +319,26 @@ Execution of the `AddMarkCommand` ### ClassCode Implementation Feature (Contributed by Zhou Yirui) -ClassMATE allows user to assign student to a tutorial class using a ClassCode. A user is able to: +ClassMATE allows user to assign a Student or a Tutorial Group to a Tutorial Class using a ClassCode. A user is able to: 1. Add ClassCode to a student 2. Edit ClassCode of a student +3. Create Tutorial Group using ClassCode +4. Create Tutorial Classes using ClassCode #### Current Implementation The class `ClassCode` facilitates all operations related to classCode. `ClassCode` is implemented such that a Tutorial Class with the corresponding ClassCode must exist before the ClassCode can be added. Tutorial Class `G00` is a -default class that do not need to be created. +default class that do not need to be created and is an empty ClassCode. It is assigned to a Student whose Tutorial Class has been deleted. Given below is an example of how classCode can be used. Step 1: After launching the application for the first time, user executes `addstu n/Abigail p/91199119 e/ab@gmail.com a/Downling Park #15-20 c/G08`. The `addstu` command calls `Model#hasTutorialClass()`, and the model component checks if the TutorialClass specified by the -class code exists. If it exists, the student is added successfully, else, an error message is given. +class code exists. If it exists, the student is added successfully with the classCode parameter `G08`, else, an error message is given. - -#### Proposed Implementation -Step 2: The user deletes TutorialClass G08 using the `deletec` command. The `deletec` command changes the ClassCode of all students -of TutorialClass `G08` to `G00`. +Step 2: The user deletes TutorialClass G08 using the `deletec c/G08` command. The `deletec` command changes the ClassCode of all students +of TutorialClass `G08` to `G00`. On ClassMATE, the UI reflects the Student to have no Tutorial Class. ### Tutorial Group Management Features This feature is split into two parts. @@ -412,6 +412,39 @@ The *Sequence Diagram* below summarizes the aforementioned steps. Storing tutorial groups as arrays in JSON is less complicated. * Cons: Searching or filtering the list of tutorial groups by group types may take a longer time. + +#### Current Implementation (Adding/Removing Student from Tutorial Group) + +Each Student contains a `Set` of `TutorialGroup` they belong to. Tutorial Groups are stored internally as a `HashSet`. The `HashSet` of +`TutorialGroup` is implemented such that there are no duplicate `TutorialGroup`, and each Student belongs to at most 1 `Tutorial Group` of +each Group Type. + +ClassMATE will then support the following command classes: + +* `AddStudentToGroupCommand(Index index, TutorialGroup tutorialGroup)` +* `DeleteStudentFromGroupCommand(Index index, TutorialGroup tutorialGroup)` + +Given below is an example of how the Add and Delete Student from Tutorial Groups features can be used: + +Step 1. The user launches the application for the first time. The existing set of `tutorialGroups` for each Student would be retrieved from the initial +ClassMATE state, and would be displayed with the details the Student. + +Step 2. The user enters `liststu` to list all the existing Students in ClassMATE + +Step 3. The user executes `addsg 1 gn/1 c/G06 type/OP1`. After the Command has been parsed, the `addsg` command calls `AddStudentToGroup#addTutorialGroup()`. +Subsequently, `Model#setStudent` and `Classmate#setStudent` are called consecutively to update the `tutorialGroups` of the Student. +During the execution of `AddStudentToGroupCommand`, a new `Student` instance with the edited set of `TutorialGroup` is created. + +#### Design Considerations +#### Aspect: Student parameters in the Command +* Alternative 1 (current choice): Identifying the Student using Index. + * Pros: Easier to implement. Less ambiguity arising from Students with the same names. + * Cons: Adding/Deleting a Student from a Tutorial Group takes a longer time. Filtering the Student list may be necessary. + +* Alternative 2: Identifying the Student using a Student ID. + * Pros: Faster to perform the action of adding/deleting a Student from Tutorial Group. + * Cons: Utility of Student ID is low as it is not used by other Commands. Also more difficult to implement. + ### Recommended workflow for setting up ClassMATE The *Activity Diagram* below provides an example of how users should set up their tutorial classes, tutorial groups and students diff --git a/docs/team/zhouyirui.md b/docs/team/zhouyirui.md index df391ba3d84..f9f81dcd115 100644 --- a/docs/team/zhouyirui.md +++ b/docs/team/zhouyirui.md @@ -44,4 +44,5 @@ Given below are my contributions to the project. * Added details of the project and Continuous Integration badge * Developers Guide: * Added documentations for the features `classCode`. PR: [\#134](https://github.com/AY2122S1-CS2103T-W15-1/tp/pull/134) - * Added documentations for the features `addsg` and `deletesg`. \ No newline at end of file + * Added documentations for the features `addsg` and `deletesg`. + * Added Use case for Adding Student to Tutorial Group. \ No newline at end of file From d40e756a50c69d8b7be64eb78fa00b82a4a7eea5 Mon Sep 17 00:00:00 2001 From: Zhouyirui <72332263+Zhouyirui@users.noreply.github.com> Date: Mon, 8 Nov 2021 17:01:02 +0800 Subject: [PATCH 3/7] Checkstyle --- docs/team/zhouyirui.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/team/zhouyirui.md b/docs/team/zhouyirui.md index f9f81dcd115..c36b3934bff 100644 --- a/docs/team/zhouyirui.md +++ b/docs/team/zhouyirui.md @@ -45,4 +45,5 @@ Given below are my contributions to the project. * Developers Guide: * Added documentations for the features `classCode`. PR: [\#134](https://github.com/AY2122S1-CS2103T-W15-1/tp/pull/134) * Added documentations for the features `addsg` and `deletesg`. - * Added Use case for Adding Student to Tutorial Group. \ No newline at end of file + * Added Use case for Adding Student to Tutorial Group. + \ No newline at end of file From 344333fee391c387d9873ae468d69517a23794f8 Mon Sep 17 00:00:00 2001 From: Zhouyirui <72332263+Zhouyirui@users.noreply.github.com> Date: Mon, 8 Nov 2021 19:12:31 +0800 Subject: [PATCH 4/7] checkstyle --- docs/team/zhouyirui.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/team/zhouyirui.md b/docs/team/zhouyirui.md index c36b3934bff..442561aab4f 100644 --- a/docs/team/zhouyirui.md +++ b/docs/team/zhouyirui.md @@ -33,8 +33,7 @@ Given below are my contributions to the project. * Allows Student to be removed from a Tutorial Group within their Tutorial Class * Referenced the implementation of `Tags` when adding `Tutorial Group` as parameter of a Student. One difference in implementation was that `Tutorial Groups` can be deleted selectively. - - + * **Documentation**: * User Guide: * Added documentations for the features `addsg`,`deleteg` and `viewg` [\#66](https://github.com/AY2122S1-CS2103T-W15-1/tp/pull/66) From 59990ebed265b99f18f7be623df3ddb86d14c740 Mon Sep 17 00:00:00 2001 From: Zhouyirui <72332263+Zhouyirui@users.noreply.github.com> Date: Mon, 8 Nov 2021 19:21:20 +0800 Subject: [PATCH 5/7] no message --- docs/team/zhouyirui.md | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/docs/team/zhouyirui.md b/docs/team/zhouyirui.md index 442561aab4f..74f9efcafc7 100644 --- a/docs/team/zhouyirui.md +++ b/docs/team/zhouyirui.md @@ -35,14 +35,13 @@ Given below are my contributions to the project. was that `Tutorial Groups` can be deleted selectively. * **Documentation**: - * User Guide: - * Added documentations for the features `addsg`,`deleteg` and `viewg` [\#66](https://github.com/AY2122S1-CS2103T-W15-1/tp/pull/66) - * Added and updated documentations for the features `addsg` and `deletesg` [\#154](https://github.com/AY2122S1-CS2103T-W15-1/tp/pull/154) - * README: - * Added a mockup for classMATE [\#70](https://github.com/AY2122S1-CS2103T-W15-1/tp/pull/70) - * Added details of the project and Continuous Integration badge - * Developers Guide: - * Added documentations for the features `classCode`. PR: [\#134](https://github.com/AY2122S1-CS2103T-W15-1/tp/pull/134) - * Added documentations for the features `addsg` and `deletesg`. - * Added Use case for Adding Student to Tutorial Group. - \ No newline at end of file + * User Guide: + * Added documentations for the features `addsg`,`deleteg` and `viewg` [\#66](https://github.com/AY2122S1-CS2103T-W15-1/tp/pull/66) + * Added and updated documentations for the features `addsg` and `deletesg` [\#154](https://github.com/AY2122S1-CS2103T-W15-1/tp/pull/154) + * README: + * Added a mockup for classMATE [\#70](https://github.com/AY2122S1-CS2103T-W15-1/tp/pull/70) + * Added details of the project and Continuous Integration badge + * Developers Guide: + * Added documentations for the features `classCode`. PR: [\#134](https://github.com/AY2122S1-CS2103T-W15-1/tp/pull/134) + * Added documentations for the features `addsg` and `deletesg`. + From 8456dba3c362940f7ced692bb4606ec2d5a55bba Mon Sep 17 00:00:00 2001 From: Zhouyirui <72332263+Zhouyirui@users.noreply.github.com> Date: Mon, 8 Nov 2021 19:22:03 +0800 Subject: [PATCH 6/7] no message --- docs/team/zhouyirui.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/team/zhouyirui.md b/docs/team/zhouyirui.md index 74f9efcafc7..48e51eadda8 100644 --- a/docs/team/zhouyirui.md +++ b/docs/team/zhouyirui.md @@ -44,4 +44,5 @@ Given below are my contributions to the project. * Developers Guide: * Added documentations for the features `classCode`. PR: [\#134](https://github.com/AY2122S1-CS2103T-W15-1/tp/pull/134) * Added documentations for the features `addsg` and `deletesg`. + * Added Use case for Adding Student to Tutorial Group. From 9e700a5c60d375caef0a1652c137f56e299a3477 Mon Sep 17 00:00:00 2001 From: Zhouyirui <72332263+Zhouyirui@users.noreply.github.com> Date: Mon, 8 Nov 2021 19:27:23 +0800 Subject: [PATCH 7/7] Update PPP --- docs/team/zhouyirui.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/team/zhouyirui.md b/docs/team/zhouyirui.md index 48e51eadda8..6d2c5efb568 100644 --- a/docs/team/zhouyirui.md +++ b/docs/team/zhouyirui.md @@ -38,6 +38,7 @@ Given below are my contributions to the project. * User Guide: * Added documentations for the features `addsg`,`deleteg` and `viewg` [\#66](https://github.com/AY2122S1-CS2103T-W15-1/tp/pull/66) * Added and updated documentations for the features `addsg` and `deletesg` [\#154](https://github.com/AY2122S1-CS2103T-W15-1/tp/pull/154) + * Added an overview of the structure of User Guide to introduction. * README: * Added a mockup for classMATE [\#70](https://github.com/AY2122S1-CS2103T-W15-1/tp/pull/70) * Added details of the project and Continuous Integration badge