Skip to content

Commit

Permalink
Merge pull request #245 from Zhouyirui/branch_debug_v1.4
Browse files Browse the repository at this point in the history
Update PPP and DG
  • Loading branch information
juliussneezer04 authored Nov 8, 2021
2 parents 11fefbe + 9e700a5 commit b6a0ddf
Show file tree
Hide file tree
Showing 3 changed files with 76 additions and 13 deletions.
47 changes: 40 additions & 7 deletions docs/DeveloperGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -415,26 +415,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/[email protected] 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.
Expand Down Expand Up @@ -518,6 +518,39 @@ The *Sequence Diagram* below shows how `UniqueTutorialClassList` retrieves the
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
Expand Down
2 changes: 1 addition & 1 deletion docs/team/rushilramesh.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
40 changes: 35 additions & 5 deletions docs/team/zhouyirui.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,39 @@ 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]()
* README:
* Added a mockup for classMATE [\#54]()
* Added details of the project and Continuous Integration badge
* 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
* 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.

0 comments on commit b6a0ddf

Please sign in to comment.