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

[CS2113-W12-2] FindOurSEP #8

Open
wants to merge 520 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 130 commits
Commits
Show all changes
520 commits
Select commit Hold shift + click to select a range
e1ad270
Add Filter and Find Sequence Diagrams
Holy-An Oct 30, 2024
348818f
Delete allocation_results.csv
Holy-An Oct 30, 2024
aac7d97
Merge pull request #88 from paulktham/DG-branch-2
isaacsaw25 Oct 30, 2024
1fa650f
Merge pull request #94 from Holy-An/UML-Diagram
paulktham Oct 30, 2024
5d5630c
Merge pull request #91 from ThisisXXZ/master
isaacsaw25 Oct 30, 2024
14b9589
change c to C
paulktham Oct 30, 2024
e7266ff
revert and generate
paulktham Oct 30, 2024
051bb1a
Merge pull request #95 from paulktham/master
ThisisXXZ Oct 30, 2024
3697b9b
Commands
paulktham Oct 30, 2024
b17b59f
Merge pull request #96 from paulktham/master
ThisisXXZ Oct 30, 2024
f0cf7e8
Adjust GenerateCommand sequence diagram arrowheads
isaacsaw25 Oct 31, 2024
840135c
DeveloperGuide.md: Refactor UI class explanation
isaacsaw25 Oct 31, 2024
2e20232
Remove unnecessary colon from return value
isaacsaw25 Oct 31, 2024
5083f45
Adjust return arrows
isaacsaw25 Oct 31, 2024
60b41f6
Add underlines for static variables
isaacsaw25 Oct 31, 2024
d0f8fe8
Refactor DeleteCommand.drawio.svg
isaacsaw25 Oct 31, 2024
ba4501f
Refactor AddCommand.drawio.svg
isaacsaw25 Oct 31, 2024
93f21a2
Move return arrows to leave more gap in bar
isaacsaw25 Oct 31, 2024
1e51dc6
Merge pull request #97 from isaacsaw25/master
ThisisXXZ Oct 31, 2024
bf08242
Add sequence diagram for the Exit Command
ehz0ah Oct 31, 2024
c92eee7
Handle merge conflicts
ehz0ah Oct 31, 2024
25bbffe
Add help/exit/unknown commands into DG
ehz0ah Oct 31, 2024
0da562c
Fix small bus in DG
ehz0ah Oct 31, 2024
17b8b8f
Add sequence diagram for filehandler component
ehz0ah Oct 31, 2024
83ef693
Update IO redirection test
ehz0ah Oct 31, 2024
14a2723
Merge pull request #99 from ehz0ah/dg
Holy-An Oct 31, 2024
47276bd
Merge branch 'master' into ppp
ehz0ah Oct 31, 2024
c5ba304
Add save CSV Feature
Holy-An Oct 31, 2024
470ee52
Refactor printFileLoadSuccessMessage()
Holy-An Oct 31, 2024
1d3b021
Add savetoCSV javadoc comments
Holy-An Oct 31, 2024
4f8c0b7
Refactor filter comments
Holy-An Oct 31, 2024
205c4c0
Refactor Ui.java
Holy-An Oct 31, 2024
f033b3c
Update I/O redirection test
Holy-An Oct 31, 2024
92152d2
Merge pull request #100 from Holy-An/csv
ehz0ah Oct 31, 2024
1ab484e
Merge branch 'master' into ppp
ehz0ah Oct 31, 2024
131585b
Update project portfolio page for ehz0ah
ehz0ah Oct 31, 2024
aa7526b
Update ppp with PRs link
ehz0ah Nov 1, 2024
e542181
Add find and filter to DG
Holy-An Nov 1, 2024
0ee0e65
Merge pull request #101 from ehz0ah/ppp
isaacsaw25 Nov 1, 2024
f0b7d45
Add find and filter to UG
Holy-An Nov 1, 2024
c9d5a16
Handle merge conflicts
Holy-An Nov 1, 2024
fd7f230
Update PPP
Holy-An Nov 1, 2024
64e349d
Merge pull request #102 from Holy-An/DG
isaacsaw25 Nov 1, 2024
baa545f
Update AllocatorClass.drawio.svg
ThisisXXZ Nov 1, 2024
c61453e
Update AllocatorSequence.drawio.svg
ThisisXXZ Nov 1, 2024
5b7ecdb
Update ViewQuotaSequence.drawio.svg
ThisisXXZ Nov 1, 2024
43db8d6
Rename PPP
ThisisXXZ Nov 1, 2024
7583b5f
Update AllocatorSequence.drawio.svg
ThisisXXZ Nov 1, 2024
9aea85f
Merge pull request #106 from ThisisXXZ/master
isaacsaw25 Nov 1, 2024
1fc7d2a
GenerateReportsd: Add activation bars
isaacsaw25 Nov 1, 2024
2a7c81b
Merge branch 'master' of https://github.com/AY2425S1-CS2113-W12-2/tp
isaacsaw25 Nov 1, 2024
3cb447a
Merge pull request #107 from isaacsaw25/master
paulktham Nov 1, 2024
d413751
Add JUnit test for reading in files
ehz0ah Nov 1, 2024
6dfeb39
Fix invalid file path bug
ehz0ah Nov 1, 2024
f7221a9
Fix filter command
Holy-An Nov 1, 2024
71f5e92
Merge branch 'AY2425S1-CS2113-W12-2:master' into filter-fix
Holy-An Nov 1, 2024
7370cb1
Handle merge conflicts
Holy-An Nov 1, 2024
9d57e56
Merge remote-tracking branch 'origin/filter-fix' into filter-fix
Holy-An Nov 1, 2024
0734bf0
Fix RevertCommand bug
isaacsaw25 Nov 1, 2024
6a5d6da
RevertCommand.java: Fix logging level
isaacsaw25 Nov 1, 2024
2930749
Merge remote-tracking branch 'origin/master'
isaacsaw25 Nov 1, 2024
54fe49a
Merge pull request #113 from Holy-An/filter-fix
isaacsaw25 Nov 1, 2024
76bfbfc
Merge branch 'master' of https://github.com/AY2425S1-CS2113-W12-2/tp
isaacsaw25 Nov 1, 2024
3311f25
Add JUnit test for saving to external file
ehz0ah Nov 1, 2024
305f4dd
Merge pull request #114 from isaacsaw25/master
Holy-An Nov 1, 2024
cad578b
Fix syntax errors
ehz0ah Nov 1, 2024
2266638
Rearrange static variables
ehz0ah Nov 1, 2024
64737a0
Merge pull request #115 from ehz0ah/test
isaacsaw25 Nov 1, 2024
d74aeb8
Fix CriteriaCommand bug
ThisisXXZ Nov 3, 2024
ec2aefd
Merge pull request #116 from ThisisXXZ/criteria_fix
isaacsaw25 Nov 3, 2024
45fbe0a
Fix multiple allocation bug
ThisisXXZ Nov 4, 2024
65784e2
Merge pull request #118 from ThisisXXZ/master
isaacsaw25 Nov 4, 2024
ff0f2b4
first iteration
paulktham Nov 4, 2024
65e40c1
DeveloperGuide.md: Add user stories for v1 and v2
isaacsaw25 Nov 5, 2024
f183cf7
Add tags to table of contents
ehz0ah Nov 5, 2024
07c620f
UserGuide.md: Add FAQ
isaacsaw25 Nov 5, 2024
a212633
Add NFRs to DG
ehz0ah Nov 5, 2024
86a370c
Add instructions for manual testing
ehz0ah Nov 5, 2024
e6173f6
DG done
paulktham Nov 5, 2024
380a6d1
Merge branch 'master' of https://github.com/AY2425S1-CS2113-W12-2/tp …
isaacsaw25 Nov 5, 2024
7520f65
fixing some erorrs
paulktham Nov 5, 2024
cfa2eb3
Enhance DG
ThisisXXZ Nov 5, 2024
5344e16
Fix some logic errors and modify ToC
ThisisXXZ Nov 5, 2024
d2296d0
Add the missing s in ToC
ThisisXXZ Nov 5, 2024
1092a5f
Merge pull request #120 from ThisisXXZ/DG_enhance
ehz0ah Nov 5, 2024
72bdd35
Update DG
ehz0ah Nov 5, 2024
15a1dac
Handle merge conflicts
ehz0ah Nov 5, 2024
a6d54e5
Add FAQ to UG
ehz0ah Nov 5, 2024
0ff5678
Merge branch 'master' of https://github.com/AY2425S1-CS2113-W12-2/tp …
isaacsaw25 Nov 5, 2024
4e8f273
Merge branch 'master' of https://github.com/AY2425S1-CS2113-W12-2/tp
isaacsaw25 Nov 5, 2024
c0d3b6b
Add test files to UG
ehz0ah Nov 5, 2024
5a6910b
Merge branch 'master' into DG-branch-3
isaacsaw25 Nov 5, 2024
50d1aa6
Merge pull request #121 from isaacsaw25/DG-userstories
ehz0ah Nov 5, 2024
30c1f8b
Merge pull request #119 from paulktham/DG-branch-3
ehz0ah Nov 5, 2024
bacc72b
Clean up UG
ehz0ah Nov 5, 2024
539bebf
Handle merge conflicts
ehz0ah Nov 5, 2024
52982b6
Clean up UG
ehz0ah Nov 5, 2024
b3e4cda
Update user profile and value proposition
ehz0ah Nov 5, 2024
9eb20d5
Update IO tests
ehz0ah Nov 5, 2024
84c7899
Update IO tests
ehz0ah Nov 5, 2024
a9151b2
Update UI greetings
ehz0ah Nov 5, 2024
b2a2c90
Add tags for accpeted file format
ehz0ah Nov 5, 2024
58c8081
Update About Us
ehz0ah Nov 5, 2024
84b485f
Merge pull request #122 from ehz0ah/moredocs
isaacsaw25 Nov 5, 2024
12d673e
Update DeveloperGuide.md
Holy-An Nov 5, 2024
1cbae78
Handle merge conflicts
Holy-An Nov 5, 2024
047d3c1
Update sequence diagram
ehz0ah Nov 5, 2024
457c20b
Merge branch 'master' into moredocs
ehz0ah Nov 5, 2024
60dfe97
Update readme
ehz0ah Nov 5, 2024
2298e85
Merge pull request #123 from ehz0ah/moredocs
Holy-An Nov 5, 2024
a01933e
Add saveAllocationResults in DG
Holy-An Nov 5, 2024
69ed44b
Handle Merge Conflicts
Holy-An Nov 5, 2024
3940984
UserGuide.md: Fix minor grammar error
isaacsaw25 Nov 6, 2024
31872e5
Merge branch 'master' of https://github.com/AY2425S1-CS2113-W12-2/tp
isaacsaw25 Nov 6, 2024
bdd4ae7
Merge pull request #124 from AY2425S1-CS2113-W12-2/isaacsaw25-patch-1
ThisisXXZ Nov 6, 2024
1a52460
CriteriaCommand.java: Fix decimal rounding issue
isaacsaw25 Nov 6, 2024
88df2e8
Merge pull request #125 from isaacsaw25/master
paulktham Nov 6, 2024
bb55428
Update UserGuide.md delete feature
paulktham Nov 6, 2024
5b01f8e
Merge pull request #126 from AY2425S1-CS2113-W12-2/paulktham-patch-1
isaacsaw25 Nov 6, 2024
1a74870
Update codebase based on testing
ehz0ah Nov 6, 2024
fee9a6c
Handle merge conflicts
ehz0ah Nov 6, 2024
03148db
Handle checkstyle errors
ehz0ah Nov 6, 2024
9b50602
Update UG
ehz0ah Nov 6, 2024
f0bc2f4
UI.java: Improved format for generated report table
isaacsaw25 Nov 6, 2024
8d696ab
test.txt: Add 100 students
isaacsaw25 Nov 6, 2024
94b2244
Update JUnit test
ehz0ah Nov 6, 2024
1448a12
Merge pull request #128 from isaacsaw25/master
isaacsaw25 Nov 6, 2024
2dfb024
Handle checkstyle
ehz0ah Nov 6, 2024
f790a40
Merge pull request #127 from ehz0ah/moredocs
isaacsaw25 Nov 6, 2024
0ddbad5
Handle Merge Conflicts
Holy-An Nov 6, 2024
8f8a75b
Modify AboutUs with profolio and avatar
ThisisXXZ Nov 6, 2024
3864b3f
Update DG
ThisisXXZ Nov 6, 2024
e0c113e
Fix Readme
ThisisXXZ Nov 6, 2024
c6451a4
Add some content for FAQ
ThisisXXZ Nov 6, 2024
ff2214e
Update PPP
ThisisXXZ Nov 6, 2024
e387892
Add ListCommand seq diag and explanation
isaacsaw25 Nov 6, 2024
2f575c2
Refactor "FindMySEP" to "FindOurSEP"
isaacsaw25 Nov 6, 2024
facfbc1
Merge pull request #130 from ThisisXXZ/stat_fix
ehz0ah Nov 6, 2024
2a77be3
Merge pull request #131 from isaacsaw25/master
ehz0ah Nov 6, 2024
301345b
Handle Merge Conflicts, add FindOurSEP in DG
Holy-An Nov 7, 2024
7e0d590
Update holy-an.md
Holy-An Nov 7, 2024
590a11d
Add Find and Filter class diagrams to DG
Holy-An Nov 7, 2024
0b814b8
Update printStudentList sd in DG
Holy-An Nov 7, 2024
0204e7f
Update AboutUs.md
Holy-An Nov 7, 2024
dd82afd
Delete MANIFEST.MF
Holy-An Nov 7, 2024
6ffcc4e
Update FindOurSEP component DG
Holy-An Nov 7, 2024
040e00b
Merge pull request #133 from Holy-An/DG-Update
ehz0ah Nov 7, 2024
545c03a
Update code to match UG
ehz0ah Nov 7, 2024
afa2802
Update help message to follow UG order
ehz0ah Nov 7, 2024
b32e352
Update table of contents
ehz0ah Nov 7, 2024
58b1647
Clean up
ehz0ah Nov 7, 2024
7153ade
Merge pull request #134 from ehz0ah/addug
Holy-An Nov 7, 2024
e45c67d
Ignore result output files
isaacsaw25 Nov 7, 2024
5214ee1
Update generate command and example outputs
isaacsaw25 Nov 7, 2024
67b6bf1
Append AboutUs.md missing information
isaacsaw25 Nov 7, 2024
434a022
Undo ignore for data output files
isaacsaw25 Nov 7, 2024
47928cd
Merge pull request #135 from isaacsaw25/master
Holy-An Nov 7, 2024
c8a2eaf
Increase test input size to ~20
ehz0ah Nov 7, 2024
e845773
Merge branch 'master' into inputtest
ehz0ah Nov 7, 2024
d766704
Fix formatting issues
isaacsaw25 Nov 7, 2024
aeb4b91
Merge pull request #136 from isaacsaw25/master
isaacsaw25 Nov 7, 2024
1fd9418
Merge pull request #137 from ehz0ah/inputtest
isaacsaw25 Nov 7, 2024
a56f642
Add Paul Display picture
isaacsaw25 Nov 7, 2024
240f548
Merge pull request #138 from isaacsaw25/master
ehz0ah Nov 7, 2024
2328a81
Fix display error for viewQuota format exception #142
isaacsaw25 Nov 8, 2024
82f0951
Fix able to revert when empty #155
isaacsaw25 Nov 8, 2024
d9d7127
Fix able to revert when empty #155
isaacsaw25 Nov 8, 2024
1ed5065
Merge pull request #173 from isaacsaw25/bugfix
ehz0ah Nov 10, 2024
95fd324
Update UG to be more robust
ehz0ah Nov 10, 2024
ce47c7f
Update initialisation protocol
ehz0ah Nov 10, 2024
cb95dd5
Update UI for file handling
ehz0ah Nov 10, 2024
a33132c
Fix small indentations issues
ehz0ah Nov 10, 2024
dacd338
Merge pull request #174 from ehz0ah/pebugs
Holy-An Nov 10, 2024
61be5a8
first change
paulktham Nov 10, 2024
8f830c1
minus the comma
paulktham Nov 10, 2024
0484f6e
Add remainder message for allocator
ThisisXXZ Nov 11, 2024
0638254
Modify stats command behavior
ThisisXXZ Nov 11, 2024
7ace8a4
Fix delete command bug
ThisisXXZ Nov 11, 2024
9a1d6a2
Separate AllocatorTest and modify stats command test
ThisisXXZ Nov 11, 2024
1279967
Modify a weird test case
ThisisXXZ Nov 11, 2024
9022afa
Merge pull request #175 from paulktham/DG-branch-4
paulktham Nov 11, 2024
a300e08
Merge pull request #177 from ThisisXXZ/PE_D_bugfix
isaacsaw25 Nov 11, 2024
61ed33c
halfway done
paulktham Nov 11, 2024
36efa27
done
paulktham Nov 11, 2024
648e9d1
Merge pull request #179 from paulktham/master
paulktham Nov 11, 2024
8abddad
Fix Delete Bug
Holy-An Nov 11, 2024
76baa7e
Merge pull request #180 from Holy-An/Fix-Delete-Bug
Holy-An Nov 11, 2024
09fda35
Merge branch 'master' of https://github.com/AY2425S1-CS2113-W12-2/tp
isaacsaw25 Nov 11, 2024
32f08ab
Add indexes for uni in generated list
isaacsaw25 Nov 11, 2024
6759560
Add descriptions for command summary table
isaacsaw25 Nov 11, 2024
be2538d
Merge pull request #181 from isaacsaw25/master
isaacsaw25 Nov 11, 2024
92a7ba0
Update UG
ehz0ah Nov 11, 2024
c5b3d51
Update IO tests
ehz0ah Nov 11, 2024
610b035
Merge pull request #182 from ehz0ah/v2.1
ehz0ah Nov 11, 2024
5195a68
Remove png images
ehz0ah Nov 11, 2024
de7ecb9
Merge branch 'AY2425S1-CS2113-W12-2:master' into v2.1
ehz0ah Nov 11, 2024
d36f9e1
Merge pull request #183 from ehz0ah/v2.1
ehz0ah Nov 11, 2024
69efab7
Update DG Glossary
ehz0ah Nov 11, 2024
6d3a4dc
Fix table fault
ehz0ah Nov 11, 2024
5591400
Merge pull request #184 from ehz0ah/v2.1
ehz0ah Nov 11, 2024
955e1d1
Update table in UG
ehz0ah Nov 11, 2024
413fa21
Merge branch 'master' into v2.1
ehz0ah Nov 11, 2024
5f9d345
Update table in UG
ehz0ah Nov 11, 2024
ebe7c12
Merge pull request #185 from ehz0ah/v2.1
ehz0ah Nov 11, 2024
f8a4a20
Add page break
ehz0ah Nov 11, 2024
9c28c39
Merge pull request #186 from ehz0ah/v2.1
ehz0ah Nov 11, 2024
eacb4c1
Adjust page break
ehz0ah Nov 11, 2024
6038410
Merge branch 'master' into v2.1
ehz0ah Nov 11, 2024
1ed3ac2
Small changes
ehz0ah Nov 11, 2024
ed83d8b
Merge pull request #187 from ehz0ah/v2.1
ehz0ah Nov 11, 2024
c048ad8
Adjust page breaks
ehz0ah Nov 11, 2024
78ac0bd
Merge branch 'master' into v2.1
ehz0ah Nov 11, 2024
78101b0
Merge pull request #188 from ehz0ah/v2.1
ehz0ah Nov 11, 2024
2dc8cc7
small edits
paulktham Nov 12, 2024
dcc46d2
Merge pull request #189 from paulktham/master
paulktham Nov 12, 2024
2d2060d
changing PPP links
paulktham Nov 12, 2024
d421e7e
Merge pull request #190 from paulktham/master
paulktham Nov 12, 2024
ab4f94e
Small fixes
ehz0ah Nov 12, 2024
3bcf660
Edit PPP
ThisisXXZ Nov 12, 2024
59da8f1
Merge branch 'master' of https://github.com/ThisisXXZ/tp
ThisisXXZ Nov 12, 2024
9a49642
Merge pull request #192 from ThisisXXZ/master
ThisisXXZ Nov 12, 2024
88d4050
Add page breaks for DG
ehz0ah Nov 12, 2024
8a18329
Merge pull request #191 from ehz0ah/v2.1
ehz0ah Nov 12, 2024
4b90b35
Remove page break
ehz0ah Nov 12, 2024
75a306d
Merge branch 'master' into v2.1
ehz0ah Nov 12, 2024
5a1d007
Merge pull request #193 from ehz0ah/v2.1
ehz0ah Nov 12, 2024
a5e0693
Modify stat command help manual
ThisisXXZ Nov 12, 2024
8d23bdb
Merge branch 'AY2425S1-CS2113-W12-2:master' into master
ThisisXXZ Nov 12, 2024
b0c6599
change filename link
paulktham Nov 12, 2024
3cdc700
Merge branch 'AY2425S1-CS2113-W12-2:master' into master
paulktham Nov 12, 2024
7ffa6b7
Merge pull request #194 from ThisisXXZ/master
ThisisXXZ Nov 12, 2024
cc0605d
Merge pull request #195 from paulktham/master
paulktham Nov 12, 2024
2f78a49
Edit UG
ThisisXXZ Nov 12, 2024
7684ca5
Merge pull request #197 from ThisisXXZ/master
ThisisXXZ Nov 12, 2024
d2789cd
deletecommand last fix
paulktham Nov 12, 2024
de07cfd
Merge branch 'AY2425S1-CS2113-W12-2:master' into master
paulktham Nov 12, 2024
57d3955
Merge pull request #198 from paulktham/master
paulktham Nov 12, 2024
7bea33a
Update UG
Holy-An Nov 12, 2024
4329221
Update UG
Holy-An Nov 12, 2024
bf0550f
Merge pull request #199 from Holy-An/UG-Preferences
Holy-An Nov 12, 2024
82b8aaa
Update ppp
ehz0ah Nov 12, 2024
3e38cb5
Merge pull request #200 from ehz0ah/v2.1
ehz0ah Nov 12, 2024
a704ced
Update UG
ehz0ah Nov 12, 2024
90ca528
Merge branch 'AY2425S1-CS2113-W12-2:master' into v2.1
ehz0ah Nov 12, 2024
de1d5f8
Merge pull request #201 from ehz0ah/v2.1
ehz0ah Nov 12, 2024
40535f8
Adjust page break
ehz0ah Nov 12, 2024
65a8760
Merge pull request #202 from ehz0ah/v2.1
ehz0ah Nov 12, 2024
d5de08f
Adjust page breaks
ehz0ah Nov 12, 2024
e13502c
Merge branch 'AY2425S1-CS2113-W12-2:master' into v2.1
ehz0ah Nov 12, 2024
7e2c9b9
Merge pull request #203 from ehz0ah/v2.1
ehz0ah Nov 12, 2024
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
6 changes: 4 additions & 2 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ jobs:

- name: Perform IO redirection test (Windows)
if: always() && runner.os == 'Windows'
working-directory: ${{ github.workspace }}/text-ui-test
working-directory: ${{ github.workspace }}/text-ui-test
shell: cmd
run: runtest.bat
run: |
set JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF-8
runtest.bat
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,6 @@ bin/

/text-ui-test/ACTUAL.TXT
text-ui-test/EXPECTED-UNIX.TXT


*class
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Duke project template
# FindOurSEP project template

This is a project template for a greenfield Java project. It's named after the Java mascot _Duke_. Given below are instructions on how to use it.

Expand Down
14 changes: 12 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,18 @@ repositories {
}

dependencies {
// JUnit dependencies for testing
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-api', version: '5.10.0'
testRuntimeOnly group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: '5.10.0'

// AsciiTable dependencies for formatting tables
implementation group: 'de.vandermeer', name: 'asciitable', version: '0.3.2'

// https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-databind
implementation group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.18.0'

// https://mvnrepository.com/artifact/com.opencsv/opencsv
implementation group: 'com.opencsv', name: 'opencsv', version: '5.9'
}

test {
Expand All @@ -29,11 +39,11 @@ test {
}

application {
mainClass.set("seedu.duke.Duke")
mainClass.set("findoursep.FindOurSEP")
}

shadowJar {
archiveBaseName.set("duke")
archiveBaseName.set("FindOurSEP")
archiveClassifier.set("")
}

Expand Down
16 changes: 8 additions & 8 deletions docs/AboutUs.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# About us
# About Us

Display | Name | Github Profile | Portfolio
--------|:----:|:--------------:|:---------:
![](https://via.placeholder.com/100.png?text=Photo) | John Doe | [Github](https://github.com/) | [Portfolio](docs/team/johndoe.md)
![](https://via.placeholder.com/100.png?text=Photo) | Don Joe | [Github](https://github.com/) | [Portfolio](docs/team/johndoe.md)
![](https://via.placeholder.com/100.png?text=Photo) | Ron John | [Github](https://github.com/) | [Portfolio](docs/team/johndoe.md)
![](https://via.placeholder.com/100.png?text=Photo) | John Roe | [Github](https://github.com/) | [Portfolio](docs/team/johndoe.md)
![](https://via.placeholder.com/100.png?text=Photo) | Don Roe | [Github](https://github.com/) | [Portfolio](docs/team/johndoe.md)
Display | Name | Github Profile | Portfolio
--------|:-----:|:--------------:|:---------:
![](https://via.placeholder.com/100.png?text=Photo) | Isaac | [Github](https://github.com/isaacsaw25)
![](https://picsum.photos/seed/picsum/200/300) | Lee Hao Zhe | [Github](https://github.com/ehz0ah)
![](https://via.placeholder.com/100.png?text=Photo) | Xiong Xinzhuang | [Github](https://github.com/ThisisXXZ)
![](https://via.placeholder.com/100.png?text=Photo) | Paul Tham | [Github](https://github.com/paulktham)
![](https://via.placeholder.com/100.png?text=Photo) | Anderson Lim | [Github](https://github.com/Holy-An)
42 changes: 41 additions & 1 deletion docs/DeveloperGuide.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,48 @@
# Developer Guide

## Table of Contents

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall there are no major errors with the UML diagrams presented. Good job

- [Acknowledgements](#Acknowledgements)
- [Installation](#installation)


## Acknowledgements

{list here sources of all reused/adapted ideas, code, documentation, and third-party libraries -- include links to the original source as well}
This project utilizes the following dependencies:

- [JUnit 5.10.0](https://mvnrepository.com/artifact/org.junit.jupiter/junit-jupiter-api/5.10.0) for testing.
- [AsciiTable 0.3.2](https://mvnrepository.com/artifact/de.vandermeer/asciitable/0.3.2) for formatting tables.
- [Jackson Databind 2.18.0](https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-databind/2.18.0) for JSON processing.
- [OpenCSV 5.9](https://mvnrepository.com/artifact/com.opencsv/opencsv/5.9) for CSV parsing.

Many thanks to the developers and maintainers of these libraries for their incredible work. Their efforts have significantly contributed to the success of this project.

## Installation

To get started with this project, follow these steps:

### Prerequisites

- Java 17
- Download the latest `.jar` from [here](https://github.com/AY2425S1-CS2113-W12-2/tp/releases/tag/v1.0).

### Steps

1. **Copy the `.jar` file:**
- Move the downloaded `.jar` file into a designated folder on your computer.

2. **Prepare your data file:**
- If you want to parse a file (.CSV, .JSON, .TXT) containing student data, ensure you have the absolute path ready for that file.

3. **Run the `.jar` file:**
- Open a terminal.
- Navigate (`cd`) to the folder containing the `.jar` file.
- Execute the `.jar` file using the following command:
```shell
java -jar FindOurSEP.jar
```


🎉 Congratulations! You’re all set to dive into the wonders of this project. Enjoy the ride!

## Design & implementation

Expand Down
64 changes: 64 additions & 0 deletions src/main/java/allocator/Allocator.java

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job overall! The code is solid, and the functionality works well. I have a few minor suggestions to improve readability and maintain the single responsibility principle (SRP).

SRP: The setMinimumGPA method does a lot—validation, parsing, and setting the GPA. Consider extracting some of that logic into separate methods for clarity.

Error handling: The method setMinimumGPA collects errors in a Set. It might be clearer to use a List instead since you're expecting multiple error messages.

Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
package allocator;

import student.Student;
import studentlist.StudentList;
import university.University;
import university.UniversityRepository;

import java.util.Set;

import exceptions.SEPException;

import java.util.HashSet;

public class Allocator {

private static double minimumGPA = 0;
private StudentList studentList;


public Allocator(StudentList studentList) {
this.studentList = new StudentList(studentList); // don't want to modify the original list
}

/*
* setMinimumGPA reuses a helper function found in studentList
* The helper function validateGPA reads a string and ensures that the GPA is a valid one
* Valid referring to the GPA being within the right values of 0.0 to 5.0
* It then returns a float which we use to set the minimumGPA variable
*/

public void setMinimumGPA(String stringGpa) throws SEPException {
Set<String> errorMessages = new HashSet<>();

float gpa = studentList.validateGpa(stringGpa, errorMessages);

if (!errorMessages.isEmpty()) {
throw new SEPException(String.join("\n", errorMessages));
}

//Setting the static minimum GPA criteria to the input
minimumGPA = gpa;
}

public double getMinimumGPA(){
return minimumGPA;
}

public StudentList allocate() {
studentList.sortStudentsByGPA();
for (Student student : studentList.getList()) {
for (int uni : student.getUniPreferences()) {
University university = UniversityRepository.getUniversityByIndex(uni);
if (university.getSpotsLeft() > 0 && student.getGpa() >= minimumGPA) {
university.removeASpot();
student.setAllocatedUniversity(uni);
student.setSuccessfullyAllocated(true);
break;
}
}
}
studentList.sortStudentsById();
return studentList;
}
}
30 changes: 30 additions & 0 deletions src/main/java/command/AddCommand.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
package command;

import exceptions.SEPException;

import student.Student;
import studentlist.StudentList;
import ui.UI;

public class AddCommand extends Command {
private String input;
private UI ui;

public AddCommand(StudentList studentList, String input, UI ui) {
super(studentList);
this.input = input;
this.ui = ui;
}

@Override
public void run() {
try {
Student newStudent = super.studentList.makeStudent(this.input);
super.studentList.addStudent(newStudent);
ui.printResponse("Added " + newStudent.getId() + " successfully.\n" +
"There are " + studentList.getNumStudents() + " student(s) in the list.");
} catch (SEPException e) {
ui.printResponse(e.getMessage());
}
}
}
56 changes: 56 additions & 0 deletions src/main/java/command/AllocateCommand.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
package command;

import java.util.concurrent.ExecutionException;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.Future;

import allocator.Allocator;
import studentlist.StudentList;
import ui.UI;

public class AllocateCommand extends Command {
private Allocator allocator;
private UI ui;
private ExecutorService executor = Executors.newFixedThreadPool(2); // Create a thread pool

public AllocateCommand(StudentList studentList, UI ui) {
super(studentList);
this.ui = ui;
this.allocator = new Allocator(studentList);
}

@Override
public void run() {
try {
// Submit the allocation task
Future<StudentList> allocationTask = executor.submit(() -> {
return allocator.allocate();
});

// Submit the loading message task
Future<?> loadingTask = executor.submit(() -> {
while (!allocationTask.isDone()) {
this.ui.printAllocatingMessage();
}
});

// Check periodically if the allocation is done
while (!allocationTask.isDone()) {
Thread.sleep(100); // Small delay to avoid busy-waiting
}

// Interrupt the loading task once allocation is done
loadingTask.cancel(true);

// Retrieve the result of the allocation task
this.studentList.setStudentList(allocationTask.get());

// Shut down the executor service
executor.shutdown();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could consider only leave spaces between different groups of logics, instead of between every line or block.

} catch (InterruptedException | ExecutionException e) {
e.printStackTrace();
}
}
}
21 changes: 21 additions & 0 deletions src/main/java/command/Command.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package command;

import studentlist.StudentList;

/**
* An abstract class representing a command that can be executed by the application.
* Subclasses should override the run() method to provide the implementation of the
* command.
*/
public abstract class Command {
protected StudentList studentList;

public Command(StudentList studentList) {
this.studentList = studentList;
}

/**
* Executes the command.
*/
public abstract void run();
}
35 changes: 35 additions & 0 deletions src/main/java/command/CriteriaCommand.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
package command;

import allocator.Allocator;
import exceptions.SEPException;
import studentlist.StudentList;
import ui.UI;

public class CriteriaCommand extends Command {
private String input;
private UI ui;
private Allocator allocator;

public CriteriaCommand (StudentList studentList,String input, UI ui) {
super(studentList);
this.input = input;
this.ui = ui;
this.allocator = new Allocator(studentList);
}

/*
* Takes the input and sends the second part of the input into the setMinimumGPA function in allocator
*/

@Override
public void run() {
try{
String[] parts = input.split(" ");
allocator.setMinimumGPA(parts[1]);
ui.printResponse("Minimum requirement of GPA set to " + parts[1] + " successfully.");
} catch (SEPException e) {
ui.printResponse(e.getMessage());
}
}

}
27 changes: 27 additions & 0 deletions src/main/java/command/DeleteCommand.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
package command;

import exceptions.SEPException;
import studentlist.StudentList;
import ui.UI;

public class DeleteCommand extends Command {
private String input;
private UI ui;

public DeleteCommand(StudentList studentList, String input, UI ui) {
super(studentList);
this.input = input;
this.ui = ui;
}

@Override
public void run() {
try {
super.studentList.deleteStudent(this.input);
ui.printResponse("Removed student, " + studentList.getNumStudents() + " student(s) left");
} catch (SEPException e) {
ui.printResponse(e.getMessage());
}

}
}
18 changes: 18 additions & 0 deletions src/main/java/command/ExitCommand.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package command;

import studentlist.StudentList;
import ui.UI;

public class ExitCommand extends Command {
private UI ui;

public ExitCommand(StudentList studentList, UI ui) {
super(studentList);
this.ui = ui;
}

@Override
public void run() {
this.ui.cleanupAndExit();
}
}
Loading
Loading