Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CS2103-F10-1] TAddressBook #58

Open
wants to merge 569 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
569 commits
Select commit Hold shift + click to select a range
62f5616
Merge pull request #83 from bryans17/branch-updateDG
channne Mar 24, 2022
22c5dbe
Merge pull request #82 from bryans17/branch-fixUI
channne Mar 24, 2022
4a32d8b
Add guard clause for empty student list
Mar 24, 2022
b43f38e
Update empty student list message
Mar 24, 2022
f3eafba
Add tests for empty student list
Mar 24, 2022
0d2f296
Fix error
Mar 24, 2022
23e901c
Edit User Stories and Use Cases based on discussed implementation
channne Mar 24, 2022
251f112
Change behavior if list is empty
Mar 24, 2022
eaafaf3
Update tests to fit new expected behavior
Mar 24, 2022
b04611e
Merge pull request #85 from channne/branch-update-DG
bryans17 Mar 24, 2022
4f79e91
add FilterCommandSequence diagram
geetengtan Mar 24, 2022
33e1aa5
refine UC: Filter Students
geetengtan Mar 24, 2022
8d75227
Merge branch 'master' into update-DG-FilterCommand
geetengtan Mar 24, 2022
9e27957
add exception handling for lab not found in masterList
geetengtan Mar 24, 2022
d2c4e53
Merge pull request #86 from geetengtan/update-DG-FilterCommand
channne Mar 24, 2022
51169a1
Merge pull request #84 from bryans17/branch-extension2a
channne Mar 24, 2022
84aa0c1
Fix checkstyle issues
channne Mar 24, 2022
bc1fe73
Merge pull request #88 from channne/branch-fix-CI
bryans17 Mar 24, 2022
9b06357
Merge branch 'master' into branch-fixUI
Mar 25, 2022
72d83af
Update UI student attributes
Mar 25, 2022
a006d42
fix checkstyle
geetengtan Mar 25, 2022
7533ecc
Merge pull request #87 from geetengtan/enhance-FilterCommand
bryans17 Mar 25, 2022
557bc0a
Remove duplicate lines
Mar 25, 2022
a25c9c0
add ViewCommand and ViewCommandParser
geetengtan Mar 25, 2022
2c2df3e
Add invalid `Lab` message to `Messages`
channne Mar 25, 2022
ac7fa31
Add `EditLabCommand`, `GradeLabCommand`, `SubmitLabCommand`
channne Mar 25, 2022
ae087fa
Add parsers for new commands
channne Mar 25, 2022
edc08de
Put checking prefix methods under `ArgumentTokenizer`
channne Mar 25, 2022
fc832a6
Add `LabMark` class to represent marks
channne Mar 25, 2022
8c3bc72
Refactor `Lab#of` methods to reject `LabStatus.GRADED`
channne Mar 25, 2022
5d40361
Refactor commands to improve OOP
channne Mar 25, 2022
a2b03cb
Add tests for Parsers and `LabMark`
channne Mar 25, 2022
e6214e0
Add constructor taking in `labNumber` and `labMark` only
channne Mar 25, 2022
83df3fd
Update commands
channne Mar 25, 2022
4424dbe
Update `Lab` and `LabTest`
channne Mar 25, 2022
bc952e4
Add tests for new commands
channne Mar 25, 2022
27e6495
Update to follow LOD
Mar 26, 2022
fc42970
Add tests for isEmpty()
Mar 26, 2022
25a03ce
Edit classes to pass all test cases except `Storage` ones
channne Mar 26, 2022
38d1e73
I love Json
channne Mar 26, 2022
7cefe75
Edit documentation
channne Mar 26, 2022
2542f42
Fix issues
channne Mar 26, 2022
914cb81
Fix careless mistake
channne Mar 26, 2022
3f20395
Merge pull request #91 from channne/branch-Add-Marks
bryans17 Mar 26, 2022
842ff5e
Merge branch 'master' into branch-fixUI
bryans17 Mar 26, 2022
2fca478
Merge pull request #89 from bryans17/branch-fixUI
bryans17 Mar 26, 2022
3e85205
Update JSON
bryans17 Mar 26, 2022
6f0f461
Update JSON to include default values
bryans17 Mar 26, 2022
060ca9c
Add Tests
bryans17 Mar 26, 2022
aab442d
Add more Tests
bryans17 Mar 26, 2022
ee57c91
I really love JSON
bryans17 Mar 26, 2022
bc638c4
Remove unnecessary SafeVarargs annotation
bryans17 Mar 27, 2022
3bfc9e6
Clean up code
bryans17 Mar 27, 2022
ffc5e18
Improve CodeCoverage
bryans17 Mar 27, 2022
9aafb90
Fix typos
bryans17 Mar 27, 2022
4e1d366
Merge branch 'master' into branch-ViewCommand
geetengtan Mar 27, 2022
e97c925
Add ViewCommand into AddressBook Parser
geetengtan Mar 27, 2022
c36bf8e
Replace placeholder for studentDetails
geetengtan Mar 27, 2022
a3cf3db
code quality
geetengtan Mar 27, 2022
57c192a
Make ViewCommand pop a new window when executed
geetengtan Mar 27, 2022
57be6e3
change variable name to fit better
geetengtan Mar 27, 2022
668f635
add equals method
geetengtan Mar 27, 2022
f62b08b
fix bugs on other tests
geetengtan Mar 27, 2022
ec929a4
add tests for ViewCommand and ViewDetails
geetengtan Mar 27, 2022
478a71b
fix checkstyle
geetengtan Mar 27, 2022
0e468ee
checkstyle again
geetengtan Mar 27, 2022
cad8455
improve code quality for LabStatus
geetengtan Mar 27, 2022
33e0df0
add tests
geetengtan Mar 27, 2022
f46251e
add tests
geetengtan Mar 27, 2022
5bd8c10
fix checkstyle
geetengtan Mar 27, 2022
b3ef6e1
fix bug on tests
geetengtan Mar 27, 2022
8c521f6
fix minor bug
geetengtan Mar 27, 2022
9a6b2a2
i hate checkstyle so much
geetengtan Mar 27, 2022
67141c6
fix bugs for FilterCommand
geetengtan Mar 28, 2022
50254fa
add some more tests
geetengtan Mar 28, 2022
dc7d504
enhance FilterCommand by enabling stacking of filter commands
geetengtan Mar 28, 2022
cdf40b9
add tests
geetengtan Mar 28, 2022
52da9ae
Add alignment of lablists
bryans17 Mar 29, 2022
040e8ca
Fix Checkstyle
bryans17 Mar 29, 2022
e526d82
update userguide
geetengtan Mar 29, 2022
8c096b4
improve code quality
geetengtan Mar 29, 2022
7efc8fe
fix UserGuide
geetengtan Mar 29, 2022
79ad2dc
Fix error
bryans17 Mar 29, 2022
194a47c
Rework ViewCommand
geetengtan Mar 29, 2022
ef81bd2
update UserGuide
geetengtan Mar 29, 2022
67b1329
Update UG
bryans17 Mar 30, 2022
43984e0
Fix Errors
bryans17 Mar 30, 2022
3d3a58e
Merge pull request #93 from bryans17/branch-refactorJSON
geetengtan Mar 30, 2022
b9dc6b6
Merge branch 'master' into branch-FilterCommandEnhancement
geetengtan Mar 30, 2022
091d477
change FilterCommand using GRADED labs with no marks to GRADED labs
geetengtan Mar 30, 2022
e75da6b
add checks to prevent creation of GRADED Labs without labMarks
geetengtan Mar 30, 2022
602f85e
Fix minor errors
bryans17 Mar 30, 2022
3960911
refactor Lab related exceptions
geetengtan Mar 30, 2022
a0cd07b
refactor lab related exceptions again
geetengtan Mar 30, 2022
376287a
Merge branch 'master' into branch-ViewCommand
geetengtan Mar 30, 2022
7c39b7b
refactor after merge
geetengtan Mar 30, 2022
185616d
improve variable naming
geetengtan Mar 30, 2022
2c2a000
refactor again hais
geetengtan Mar 30, 2022
d59f1aa
Fix formatting error
bryans17 Mar 31, 2022
7e259a0
Move disclaimer to FAQ
bryans17 Mar 31, 2022
c35ab7b
Fix typo
bryans17 Mar 31, 2022
d53f5aa
Add tests
geetengtan Mar 31, 2022
1049c1c
checkstyle
geetengtan Mar 31, 2022
30f791e
add stupid tests for codecov
geetengtan Mar 31, 2022
586144f
Merge pull request #94 from geetengtan/branch-FilterCommandEnhancement
geetengtan Mar 31, 2022
289cbc9
Merge branch 'master' into branch-ViewCommand
geetengtan Mar 31, 2022
6b0e717
checkstyle
geetengtan Mar 31, 2022
5e0908a
updarte UserGuide
geetengtan Mar 31, 2022
0e5852b
Merge pull request #90 from geetengtan/branch-ViewCommand
geetengtan Mar 31, 2022
fd9606b
Merge branch 'master' into update-UG
bryans17 Mar 31, 2022
d522f3b
Change Ui.png
bryans17 Mar 31, 2022
79b1f75
Update version number
bryans17 Mar 31, 2022
b21d89e
Merge pull request #95 from bryans17/update-UG
bryans17 Mar 31, 2022
a87d318
Edit UG to correspond to new lab editing commands
channne Mar 31, 2022
0094af9
Merge pull request #96 from channne/branch-edit-UG
channne Mar 31, 2022
566ebb4
Merge branch 'master' into update-UG
bryans17 Apr 1, 2022
839796c
Add new screenshot for start up UI
bryans17 Apr 1, 2022
3507d5a
Update quick start
bryans17 Apr 1, 2022
2bd7c91
Merge pull request #97 from bryans17/update-UG
bryans17 Apr 1, 2022
054e68c
Update UI
bryans17 Apr 5, 2022
c38b816
Add padding to listcells
bryans17 Apr 5, 2022
576a482
Update UG
bryans17 Apr 5, 2022
1155125
Fix formatting
bryans17 Apr 5, 2022
fae44bf
Update Edit documentation
bryans17 Apr 5, 2022
640f54f
Update find documentation
bryans17 Apr 5, 2022
3722974
Update delete documentation
bryans17 Apr 5, 2022
b2b4dd2
Update UI
bryans17 Apr 5, 2022
b42baf4
Update Lab Number Constraint
bryans17 Apr 5, 2022
ee37aa8
Update user guide
bryans17 Apr 5, 2022
34b0e6e
Add test for values larger than max int
bryans17 Apr 5, 2022
e60a462
Update UG
bryans17 Apr 5, 2022
50f3d5f
change description for index out of bounds
geetengtan Apr 5, 2022
ab5e32b
remove original message
geetengtan Apr 5, 2022
89166b9
Add tests
bryans17 Apr 5, 2022
ad4893d
Update UG links
bryans17 Apr 5, 2022
2a20692
Update isValidLab
bryans17 Apr 6, 2022
a072a2f
Update javadocs
bryans17 Apr 6, 2022
175f634
Reorder command summary
bryans17 Apr 6, 2022
e1ad390
Fix checkstyle
bryans17 Apr 6, 2022
63a9c9b
Update Person to Student
bryans17 Apr 6, 2022
0858df3
Add user story for remove lab
bryans17 Apr 6, 2022
f4c27d8
Update ModelClassDiagram
bryans17 Apr 6, 2022
6174290
Update BetterModelClassDiagram
bryans17 Apr 6, 2022
a50595a
Update StorageClassDiagram
bryans17 Apr 6, 2022
c0e3144
Change Person to Student
bryans17 Apr 6, 2022
027bf7a
Update links from AB3 to F10-1
bryans17 Apr 6, 2022
9199726
Add package
bryans17 Apr 6, 2022
f5410c0
Update Person to Student in ArchitectureSequenceDiagram
bryans17 Apr 6, 2022
8739e84
Update add lab command implementation
bryans17 Apr 6, 2022
cccf65f
Merge pull request #120 from geetengtan/branch-IndexDescriptions
bryans17 Apr 7, 2022
2f57bf7
Update isStudentListEmpty() method
bryans17 Apr 7, 2022
5beb0dd
Add sequence diagram for AddLabCommand
bryans17 Apr 7, 2022
55263d2
Fix checkstyle
bryans17 Apr 7, 2022
3269a85
Add sequence diagram for LabList#add()
bryans17 Apr 7, 2022
6da0614
Fix typo
bryans17 Apr 7, 2022
d090574
Update AddLabCommandSequenceDiagram
bryans17 Apr 7, 2022
59e830d
Add Activity Diagram for Add Lab Command
bryans17 Apr 7, 2022
f3703b2
Convert puml to png
bryans17 Apr 7, 2022
c047812
Convert puml to png
bryans17 Apr 7, 2022
50565e8
Update Lab component
bryans17 Apr 7, 2022
691fc44
Add implementation detail for AddLabCommand
bryans17 Apr 7, 2022
6aff6e7
Update Note
bryans17 Apr 7, 2022
ef1da15
Merge pull request #118 from bryans17/fix-1.4
channne Apr 7, 2022
cbf9e86
Merge pull request #119 from bryans17/update-validLabNumber
channne Apr 7, 2022
5480ef6
Fix typos
bryans17 Apr 7, 2022
ac6bced
Change Person to Student in UiClassDiagram
bryans17 Apr 7, 2022
91a2528
Convert puml to png
bryans17 Apr 7, 2022
d77b036
Fix UG-related PED issues (#101, #107, #111, #112, #117)
channne Apr 8, 2022
aea43bd
Edit more stuff
channne Apr 8, 2022
e4a8e6d
Implement maximum value for `LabMark` (Fix #113)
channne Apr 8, 2022
d7ef7d2
Change `isSameStudent` such that it compares ID rather than name
channne Apr 8, 2022
1d17df2
Merge pull request #122 from channne/branch-fix-1.4
channne Apr 8, 2022
c560986
Add description
bryans17 Apr 8, 2022
e1390b4
Turn `PPP Draft` green
channne Apr 8, 2022
9bc09ca
Merge pull request #124 from bryans17/branch-updatePPP
channne Apr 8, 2022
83ffbda
Merge pull request #125 from channne/branch-PPP-draft
bryans17 Apr 8, 2022
6d400a5
update PPP
geetengtan Apr 8, 2022
5400ae4
fix checkstyle
geetengtan Apr 8, 2022
df2e535
add newline at EOF
geetengtan Apr 8, 2022
c4eec0c
Merge pull request #126 from geetengtan/branch-updatePPP
channne Apr 8, 2022
0645d96
Improve readability
bryans17 Apr 9, 2022
0acecd2
Merge branch 'master' into branch-AddLabCommandDG
bryans17 Apr 9, 2022
0f223fd
Update for LOD
bryans17 Apr 9, 2022
1a5ced9
Update LabList#add() explanation
bryans17 Apr 9, 2022
f68dca1
Update documentation
bryans17 Apr 10, 2022
670e1c7
Merge pull request #121 from bryans17/branch-AddLabCommandDG
bryans17 Apr 10, 2022
02c2efe
Update link
bryans17 Apr 10, 2022
90f9231
Merge pull request #127 from bryans17/branch-AddLabCommandDG
bryans17 Apr 10, 2022
096d32a
Fix typos
bryans17 Apr 10, 2022
97d56bd
Merge pull request #128 from bryans17/branch-AddLabCommandDG
bryans17 Apr 10, 2022
8ab3412
Add UC6 remove lab
bryans17 Apr 10, 2022
9c72a80
Update test cases
bryans17 Apr 10, 2022
f8cce96
Merge pull request #129 from bryans17/branch-AddLabCommandDG
bryans17 Apr 10, 2022
5749f3c
Merge branch 'master' into branch-updatePPP
bryans17 Apr 10, 2022
a3c6cd7
Add details
bryans17 Apr 10, 2022
c351c86
Update description
bryans17 Apr 10, 2022
be8f2f5
Merge pull request #130 from bryans17/branch-updatePPP
bryans17 Apr 10, 2022
105ada6
Update UG
bryans17 Apr 10, 2022
d79b64b
Merge pull request #131 from bryans17/branch-updatePPP
bryans17 Apr 10, 2022
4be6c8e
Merge branch 'master' into branch-AddLabCommandDG
bryans17 Apr 10, 2022
13c1707
Fix typos
bryans17 Apr 10, 2022
81381cb
Merge pull request #132 from bryans17/branch-AddLabCommandDG
bryans17 Apr 10, 2022
d32c49e
Make changes to `index.md`
channne Apr 10, 2022
0d5dce7
Refactor tag names
channne Apr 10, 2022
347a885
Change UI images (because tags changed)
channne Apr 10, 2022
bbab254
Update UG
channne Apr 10, 2022
6eab5bf
Change name when converting to PDF
channne Apr 10, 2022
af6d0ee
Merge pull request #133 from channne/branch-Edit-Documentation
channne Apr 10, 2022
7d9f81a
Edit filenames
channne Apr 10, 2022
0e09470
Merge pull request #134 from channne/branch-Edit-Documentation
channne Apr 10, 2022
1e517c9
Almost completed PPP. Add more PR links when I actually do them
channne Apr 10, 2022
cbe697d
Reoder stuff
bryans17 Apr 11, 2022
25ac5e0
Merge pull request #136 from bryans17/branch-AddLabCommandDG
bryans17 Apr 11, 2022
ce0c4cb
Improve readability
bryans17 Apr 11, 2022
ce93209
Merge pull request #137 from bryans17/branch-AddLabCommandDG
bryans17 Apr 11, 2022
e331359
Fix return arrow error
bryans17 Apr 11, 2022
bdd7ee1
Convert puml to png
bryans17 Apr 11, 2022
4245fb9
Merge pull request #138 from bryans17/branch-AddLabCommandDG
bryans17 Apr 11, 2022
e782e57
Edit to try to increase resolution
channne Apr 11, 2022
4abffe8
Merge pull request #139 from channne/branch-edit-images
channne Apr 11, 2022
49ae2f6
Change AddressBook to TAddressBook
bryans17 Apr 11, 2022
c3a6e09
Merge pull request #140 from bryans17/branch-AddLabCommandDG
bryans17 Apr 11, 2022
0d271ca
Change `deletePerson` to `deleteStudent`
channne Apr 11, 2022
3159f40
Edit current DG
channne Apr 11, 2022
724501d
Merge pull request #141 from channne/branch-edit-DG
channne Apr 11, 2022
9b488c9
Add how `labedit` is implemented
channne Apr 11, 2022
6ab793a
minor fix
geetengtan Apr 11, 2022
ed8a6d8
update PPP
geetengtan Apr 11, 2022
d85b04a
update UML of filter
geetengtan Apr 11, 2022
8d71bbb
Add new UML diagrams
channne Apr 11, 2022
474c1e8
Add PR link
channne Apr 11, 2022
003d418
Fix CI issues
channne Apr 11, 2022
4292798
add more UML and update DG
geetengtan Apr 11, 2022
970a537
Add manual testing details for `labedit`
channne Apr 11, 2022
679f4cf
update PPP agn
geetengtan Apr 11, 2022
1e14a81
checkstyle
geetengtan Apr 11, 2022
1534649
and another one
geetengtan Apr 11, 2022
b4af6a9
Merge pull request #135 from channne/branch-PPP
channne Apr 11, 2022
09c1f5d
Edit headings to fit page limit
channne Apr 11, 2022
b4a10ac
add another UML and update DG
geetengtan Apr 11, 2022
dca70f3
cs
geetengtan Apr 11, 2022
e116eba
Merge pull request #142 from geetengtan/branch-updateDocumentation
geetengtan Apr 11, 2022
b61069e
fix
geetengtan Apr 11, 2022
d345c96
Merge branch 'master' into branch-add-DG
channne Apr 11, 2022
54811ed
Merge pull request #143 from channne/branch-add-DG
channne Apr 11, 2022
80e69d5
Merge pull request #144 from channne/branch-edit-PPP-final
channne Apr 11, 2022
c159ea1
small issue
geetengtan Apr 11, 2022
131bb05
Merge pull request #145 from geetengtan/branch-foundsmallissue
geetengtan Apr 11, 2022
037e22d
fix PPP
geetengtan Apr 11, 2022
4c57728
Merge pull request #146 from geetengtan/branch-fixPPP
geetengtan Apr 11, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add how labedit is implemented
  • Loading branch information
channne committed Apr 11, 2022
commit 9b488c9a8653685a9e97e7405be46a79b4100d9e
47 changes: 47 additions & 0 deletions docs/DeveloperGuide.md
Original file line number Diff line number Diff line change
@@ -217,6 +217,7 @@ The following **UML activity diagram** shows what happens when a user executes a

<img src="images/AddLabCommandActivityDiagram.png" width="600" />


### Filter Feature

#### Proposed Implementation
@@ -230,6 +231,52 @@ Given below is an example usage scenario and how the filter mechanism behaves at
Step 1. The user executes `filter l/1 s/s` command.


### `labedit`: Edit Lab Feature

#### Implementation
The `labedit` feature allows for editing of the `LabStatus` and/or `LabMark` of a specified `Lab` in the TAddressBook.<br>
The format of this command is `labedit INDEX l/LAB_NUMBER (s/LAB_STATUS) (m/LAB_MARK)`, where:
* `INDEX` corresponds to the index number of a student, according to the currently displayed student list
* `LAB_NUMBER` corresponds to an existing lab in the TAddressBook
* `LAB_STATUS` is either `u`/`s`/`g` (`UNSUBMITTED`/`SUBMITTED`/`GRADED`)
* `LAB_MARK` is an integer from 0 to 100 inclusive
* The parentheses indicate that at least one of `s/LAB_STATUS` and `m/LAB_MARK` must be provided

The implementation of `labedit` is as follows:
1. When `AddressBookParser#parseCommand` detects `labedit` as the command word, it creates a new `EditLabCommandParser` with the given arguments.
2. `EditLabCommandParser` parses the parameters and throws a `ParseException` if any invalid values are encountered.
3. `EditLabCommand#execute(Model)` will then execute with the current `Model` in the system.
4. The `EditLabCommand` object checks if the given `INDEX` is out of bounds.
5. The `EditLabCommand` object checks if the given combination of `LAB_STATUS` and `LAB_MARK` is valid.

<div markdown="span" class="alert alert-info">:information_source: **Note:** The valid combinations are:
* `LAB_STATUS` and no `LAB_MARK`
* `LAB_MARK` and no `LAB_STATUS`
* `LAB_MARK` and `LAB_STATUS` of `GRADED`
</div>

6. The `EditLabCommand` calls `LabList#setLab` of the student specified by the given `INDEX`, which edits the target `Lab` to the new `Lab`.

The following sequence diagram shows the interactions between components during the execution of the `labedit` command:

<img src="images/EditLabCommandSequenceDiagram.png" width="850" />

<div markdown="span" class="alert alert-info">:information_source: **Note:** In the sequence diagram, the details of `LabList#setLab` have been intentionally omitted. They can be found in the sequence diagram below.
</div>

The following sequence diagram shows how `LabList#setLab` is implemented:

<img src="images/LabListSetLabSequenceDiagram.png" width="550" />

The detailed steps are as follows:
1. `LabList#setLab` checks if the edited `Lab` is the same as the original `Lab`, and whether the target `Lab` exists in the `LabList`.
2. `LabList#setLab` edits the target `Lab` to the new `Lab` with different `LabStatus` and/or `LabMark`.

To summarize, the following activity diagram summarizes what happens when the user requests to edit a lab:

<img src="images/EditLabCommandActivityDiagram.png" width="600" />


### \[Proposed\] Undo/redo feature

#### Proposed Implementation
3 changes: 2 additions & 1 deletion docs/UserGuide.md
Original file line number Diff line number Diff line change
@@ -205,7 +205,8 @@ Example:
#### View student details : `view`
View a student's details from the TAddressBook. This includes their personal information (i.e. email, GitHub username, etc.)
as well as the status and/or marks achieved for their labs. A sample result is shown below.<br>
![viewUi](images/viewUI.png)

<img src="images/viewUI.png" width="420" />

Format: `view INDEX`