Skip to content

Commit

Permalink
Merge pull request #181 from feifeiraindrops/add-document
Browse files Browse the repository at this point in the history
Update dg diagram and bug fix
  • Loading branch information
marioalvaro authored Nov 13, 2023
2 parents 8260f3c + 15b7cd6 commit 60c9584
Show file tree
Hide file tree
Showing 6 changed files with 84 additions and 29 deletions.
Binary file modified docs/diagrams/BetterModelClassDiagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 11 additions & 10 deletions docs/diagrams/BetterModelClassDiagram.puml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,19 @@ 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
StudentBook *-right-> "1" UniqueStudentList
StudentBook *-right-> "1" UniqueTagList
UniqueTagList -[hidden]down- UniqueStudentList
UniqueTagList -[hidden]down- UniqueStudentList

UniqueTagList -right-> "*" Tag
UniquePersonList -right-> Person
UniqueStudentList -right-> Student

Person -up-> "*" Tag
Student -up-> "*" Tag

Person *--> Name
Person *--> Phone
Person *--> Email
Person *--> Address
Student *--> StudentName
Student *--> StudentId
Student *--> StudentEmail
Student *--> TutorialGroup
Student *--> StudentGrade
@enduml
Binary file modified docs/diagrams/UndoSequenceDiagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 14 additions & 14 deletions docs/diagrams/UndoSequenceDiagram.puml
Original file line number Diff line number Diff line change
Expand Up @@ -4,42 +4,42 @@ skinparam ArrowFontStyle plain

box Logic LOGIC_COLOR_T1
participant ":LogicManager" as LogicManager LOGIC_COLOR
participant ":AddressBookParser" as AddressBookParser LOGIC_COLOR
participant ":ModuLightParser" as ModuLightParser LOGIC_COLOR
participant "u:UndoCommand" as UndoCommand LOGIC_COLOR
end box

box Model MODEL_COLOR_T1
participant ":Model" as Model MODEL_COLOR
participant ":VersionedAddressBook" as VersionedAddressBook MODEL_COLOR
participant ":VersionedSscBook" as VersionedSscBook MODEL_COLOR
end box
[-> LogicManager : execute(undo)
activate LogicManager

LogicManager -> AddressBookParser : parseCommand(undo)
activate AddressBookParser
LogicManager -> ModuLightParser : parseCommand(undo)
activate ModuLightParser

create UndoCommand
AddressBookParser -> UndoCommand
ModuLightParser -> UndoCommand
activate UndoCommand

UndoCommand --> AddressBookParser
UndoCommand --> ModuLightParser
deactivate UndoCommand

AddressBookParser --> LogicManager : u
deactivate AddressBookParser
ModuLightParser --> LogicManager : u
deactivate ModuLightParser

LogicManager -> UndoCommand : execute()
activate UndoCommand

UndoCommand -> Model : undoAddressBook()
UndoCommand -> Model : undoSscBook()
activate Model

Model -> VersionedAddressBook : undo()
activate VersionedAddressBook
Model -> VersionedSscBook : undo()
activate VersionedSscBook

VersionedAddressBook -> VersionedAddressBook :resetData(ReadOnlyAddressBook)
VersionedAddressBook --> Model :
deactivate VersionedAddressBook
VersionedSscBook -> VersionedSscBook :resetData(ReadOnlySscBook)
VersionedSscBook --> Model :
deactivate VersionedSscBook

Model --> UndoCommand
deactivate Model
Expand Down
59 changes: 55 additions & 4 deletions docs/team/feifeiraindrops.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,76 @@ title: "Yufei Sun's Project Portfolio Page"


* **New Feature**: `addStu` - Add a student to the database

* **What is does**: Adds a student to the database. An empty score of the student will be added to all existing
graded components as well. It requires the student name, student id, and email, while the tutorial group and tag are optional.
* **Justification**: A student might be added after the graded components are set up, thus it is necessary to add
scores to graded components. Furthermore, a tutorial group is optional as it might be undetermined at the start of the semester.
* **Highlights**: Implementing this feature requires the creation of new classes such as tutorial groups and student id.
It requires a good understanding to make sure that they only accept the correct inputs.


* **New Feature**: `editStu` - edit the student information
* **What is does**: Edit a student's name, student id, email, tutorial group or tag, as indicated by the index. All student scores related to this student wil be updated as well.
* **Justification**: There might be changes to a student's information.
* **Highlights**: Implementing this feature requires a good understanding of the project model. Since a student score is related to a student, it has to be updated when the student is edited.


* **New Feature**: `deleteStu` - delete a student and related student scores from the database
* **What is does**: Delete a student as all related student scores as indicated by the index.
* **Justification**: A student can drop the module.
* **Highlights**: Implementing this feature requires a good understanding of the project model. Since a student score is related to a student, it should be removed when the student no longer exists.


* **New Feature**: `findStu` - find a student based on the keywords
* **What is does**: Find a student in the database based on the name, student id, tutorial group, email or tag keywords.
All student scores related to the student will be displayed as well. All graded components are displayed as they are all relevant.
* **Justification**: The user might be interested to find the students with one or many attributes. Allowing search
by attributes increases the flexibility of the search. Since student score is related to students, they are also displayed so that the user does not need rto do another search for them.
* **Highlights**: Implementing this feature requires a good design of the algorithm and understanding or the project models to show the correct student and student scores.


* **New Feature**: `findScore` - find a student score based on the keywords
* **What is does**: Find a student score in the database based on graded component name, student name, student id, tutorial group, email or tag keywords.
The student and graded component list will be emptied.
* **Justification**: A student score is related to one graded component and one student, thus it can ab found by keywords of both classes.
We assume that the user is only interested in the particular student scores when using this command. If they are interested in the students and graded components as well, findStu or findComp should be used instead.
* **Highlights**: Implementing this feature requires a good design of the algorithm and understanding or the project models to show the correct student scores.


* **New Feature**: `findComp` - find a graded component based on the keywords
* **What is does**: Find a graded component in the database based on component name. All students are displayed as they are all relevant.
All student scores related to the component will be displayed as well.
* **Justification**: Since student score is related to students, they are also displayed so that the user does not need rto do another search for them.
* **Highlights**: Implementing this feature requires a good design of the algorithm and understanding or the project models to show the correct graded components.


* **Code contributed**:
* Highlights: designed and implemented tutorial group and student id classes, which are unique to the project
* [RepoSense link](https://nus-cs2103-ay2324s1.github.io/tp-dashboard/?search=&sort=groupTitle&sortWithin=title&timeframe=commit&mergegroup=&groupSelect=groupByRepos&breakdown=true&checkedFileTypes=docs~functional-code~test-code&since=2023-09-22&tabOpen=true&tabType=authorship&tabAuthor=feifeiraindrops&tabRepo=AY2324S1-CS2103T-W08-2%2Ftp%5Bmaster%5D&authorshipIsMergeGroup=false&authorshipFileTypes=docs~functional-code~test-code&authorshipIsBinaryFileTypeChecked=false&authorshipIsIgnoredFilesChecked=false)


* **Project management**:

* **Enhancements to existing features**:
* Setting up team repository, website and relevant tools to be used
* Setting up zoom for weekly meeting


* **Documentation**:
* User Guide:
* Documented the CRUD features and find features
* Organised and formatted the content
* Added comprehensive UI demonstration

* Developer Guide:
* Documented implementation of the logic component


* **Testing**:
* Implemented testing for models, commands and parsers related to student CRUD features and the find features.


* **Community**:
* Reviewed 11 PRs
* 1 with non-trivial comment


* **Tools**:

Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,9 @@ public ScoreMatchPredicate(GcMatchPredicate gcMatchPredicate) {
public boolean test(StudentScore score) {
boolean isGcNameMatch = gcNames.isEmpty() || gcNames.stream()
.anyMatch(keyword -> score.getGcName().toString().toLowerCase().contains(keyword.toLowerCase()));
boolean isNameMatch = nameKeywords.isEmpty() || nameKeywords.stream()
.anyMatch(keyword -> score.getStudent().getName().toString().toLowerCase()
.contains(keyword.toLowerCase()));
boolean isIdMatch = idKeywords.isEmpty() || idKeywords.stream()
.anyMatch(keyword -> score.getStudentId().toString().toLowerCase().contains(keyword.toLowerCase()));
boolean isCommentMatch = commentKeywords.isEmpty() || commentKeywords.stream()
Expand All @@ -107,7 +110,7 @@ public boolean test(StudentScore score) {
.anyMatch(tag -> tagKeywords.contains(tag.tagName));
boolean isStudentMatch = studentMatchPredicate.test(score.getStudent());
boolean isGcMatch = gcMatchPredicate.test(score.getGradedComponent());
return isGcNameMatch && isIdMatch && isCommentMatch && isTutMatch && isTagMatch
return isGcNameMatch && isNameMatch && isIdMatch && isCommentMatch && isTutMatch && isTagMatch
&& isStudentMatch && isGcMatch;
}

Expand Down

0 comments on commit 60c9584

Please sign in to comment.