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-T12-2] Big-PP #23

Open
wants to merge 615 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 250 commits
Commits
Show all changes
615 commits
Select commit Hold shift + click to select a range
e4b5861
Add functionality for compatibility checks
Magmanat Mar 29, 2023
316846c
Update EXPECTED.TXT
Magmanat Mar 29, 2023
f5bd246
Merge pull request #148 from Reynold-SL/branch_developer_guide_sequence
Magmanat Mar 29, 2023
4f29b9b
Resolve merge conflicts
Magmanat Mar 29, 2023
86bb4b8
Merge pull request #149 from Magmanat/compatibility_check
Magmanat Mar 29, 2023
1c7a6e6
Update UserGuide.md
Magmanat Mar 31, 2023
5c781fc
Update UserGuide.md
Magmanat Mar 31, 2023
416cb23
Update UserGuide.md
Magmanat Mar 31, 2023
e496b7a
Update UG
Mar 31, 2023
da30704
Refactor table of contents
Mar 31, 2023
cc0fbe7
Merge pull request #154 from typingpanda/user-guide
Magmanat Mar 31, 2023
8faf6bc
Add exception to account for interger overflow
Apr 1, 2023
a8f0e19
Add limit to integer size
Apr 1, 2023
88a3e84
handle integer overflow
Apr 1, 2023
a90d551
Protect from integer overflow
Apr 1, 2023
faa6b7b
Fix grammer errors
Apr 1, 2023
a8da41e
Fix checkstyle
Apr 1, 2023
e73566f
Magmanat
Apr 1, 2023
22ddb05
Add changes required to follow user guide
Magmanat Apr 1, 2023
3e8a24d
Update ViewerFilterCommand to account for invalid inputs and empty co…
Reynold-SL Apr 1, 2023
9f6c433
Update checkstyle of code
Reynold-SL Apr 1, 2023
f22d6c9
Solve clear screen bug for windows cmd terminal
Magmanat Apr 1, 2023
f9f2695
Add getDetails which will improve the list quality
Magmanat Apr 1, 2023
386a95d
Ensure only selected sockets can be added
Magmanat Apr 1, 2023
076d731
Remove log file
Magmanat Apr 1, 2023
ceadd69
Solve bug with custom cpu and motherboard not adding because of socket
Magmanat Apr 1, 2023
287f1f4
Revert docs change
Magmanat Apr 1, 2023
5f0879c
Remove random ' from storage toString method
Magmanat Apr 1, 2023
79a459d
Merge pull request #191 from typingpanda/fix-bugs
Magmanat Apr 1, 2023
30e0272
Merge pull request #193 from Reynold-SL/branch_viewer_filter_bugs
Magmanat Apr 1, 2023
660b066
last changed at Apr 2, 2023 4:31 AM, pushed by Magmanat
Apr 1, 2023
2575772
Fix Junit test to actual output
Magmanat Apr 1, 2023
3fb24d8
Handle merge conflicts
Magmanat Apr 1, 2023
8efffa2
Disable shadowjar
Magmanat Apr 1, 2023
891e2f1
Enable shadowjar
Magmanat Apr 1, 2023
cf5629a
Edit EXPECTED.TXT to fit the new changes
Magmanat Apr 1, 2023
24ac54a
Merge pull request #197 from AY2223S2-CS2113-T12-2/user-guide-update
keanecxz Apr 2, 2023
85e4f37
Add psu filter
Apr 2, 2023
5c3c6a4
Fix checkstyle
Apr 2, 2023
c59a3fc
Rearrange tests
Magmanat Apr 2, 2023
9232286
Fix viewer filter to desplay accurate error message
Reynold-SL Apr 2, 2023
73e28dd
Remove commands from input.txt
Magmanat Apr 2, 2023
244cd83
Merge pull request #198 from typingpanda/fix-bugs
Magmanat Apr 2, 2023
6a1b9f9
Update README.md
Magmanat Apr 2, 2023
9f00059
Merge pull request #199 from Reynold-SL/branch_viewer_2_filter_bugs
keanecxz Apr 2, 2023
5cedb7e
Update UserGuide.md
Magmanat Apr 2, 2023
62592c0
Merge pull request #192 from Magmanat/master
keanecxz Apr 2, 2023
94076d9
Add appropriate nextlines
Magmanat Apr 2, 2023
2b4db1d
Update UserGuide.md
Magmanat Apr 2, 2023
a7fb910
Update User Guide Glossary Bug
Apr 2, 2023
bcd59ea
Merge branch 'master' into user-guide-update
Ryujikjs Apr 2, 2023
2c3d88d
Merge pull request #200 from AY2223S2-CS2113-T12-2/user-guide-update
Magmanat Apr 2, 2023
109e031
Update list component userguide
Apr 2, 2023
2f4b4cb
Add spacing
Apr 2, 2023
83fc0e1
Add input formatting
Apr 2, 2023
9d2b21c
Add Prince PSU component
Apr 2, 2023
ede36ff
Remove Prince of Pereira
Apr 2, 2023
46696cb
Merge pull request #201 from typingpanda/user-guide
Magmanat Apr 3, 2023
eae6794
Update user guide with @@author
Magmanat Apr 3, 2023
65dfbf0
Merge pull request #202 from Magmanat/master
Magmanat Apr 3, 2023
dffd1e9
Edit author tags to appropriate format
Magmanat Apr 4, 2023
86face8
Add Thomas project portfolio
superkaiba Apr 6, 2023
2ebe536
Improve visibility of headings in DG
superkaiba Apr 6, 2023
53ef756
Add color and indentation and bold/italics to PC viewer menu
superkaiba Apr 6, 2023
21364b0
Reformat help commands to be more readable
Ryujikjs Apr 7, 2023
0a2292c
Fix checkstyle error
Ryujikjs Apr 7, 2023
7f9e288
Merge pull request #203 from superkaiba/add-thomas-project-portfolio
Magmanat Apr 7, 2023
55dedeb
Merge pull request #206 from Ryujikjs/format-help-command
Magmanat Apr 7, 2023
db32b80
Merge pull request #204 from superkaiba/improve-dg-formatting
Magmanat Apr 7, 2023
332c23e
Refactor guide to meet cs2113 standards
Apr 7, 2023
f328728
Merge pull request #207 from typingpanda/developer-docs
Magmanat Apr 7, 2023
25aa7f3
Add to componentList and PCList methods
Magmanat Apr 7, 2023
51cbc19
Merge branch 'master' of https://github.com/AY2223S2-CS2113-T12-2/tp
Magmanat Apr 7, 2023
cbd83c5
Update DataStorage class diagram
Magmanat Apr 7, 2023
6f80e44
Merge pull request #208 from Magmanat/master
Magmanat Apr 7, 2023
e5152a4
Update ViewerAddCommand to include the activation bar
Reynold-SL Apr 7, 2023
948582f
Merge branch 'master' into branch_error_developer_guide
Reynold-SL Apr 7, 2023
d629885
Reformat PC class diagram and complete user guide and instructions fo…
Ryujikjs Apr 7, 2023
0f89d67
Resolve merge conflict
Ryujikjs Apr 7, 2023
0733854
Add profile picture
Ryujikjs Apr 7, 2023
0821262
Update ListComponentCommand PUML
Magmanat Apr 7, 2023
b0108e6
Update ViewerAddCommand to follow standard requirements
Reynold-SL Apr 7, 2023
cac48b8
Add object diagram to DG
Apr 7, 2023
593d3b2
Merge pull request #209 from Reynold-SL/branch_error_developer_guide
keanecxz Apr 7, 2023
8fc6d20
Reformat PC class architecure to be more readable
Ryujikjs Apr 7, 2023
4a7fc4b
Resolve merge conflict
Ryujikjs Apr 7, 2023
7024fe5
Merge pull request #210 from Ryujikjs/developer-guide
Ryujikjs Apr 7, 2023
51ff7ca
Upgrade DataStorage sequential diagram
Magmanat Apr 7, 2023
6f62758
Update loadChassisSequential diagram png
Magmanat Apr 7, 2023
61a2c6a
Remove User from ListComponentCommand puml
Magmanat Apr 7, 2023
d9c4d71
Update getIsFilter to getIsFiltered
Magmanat Apr 7, 2023
77f582b
Fix merge conflict
Apr 7, 2023
5419481
Rearrange Developer Guide properly
Magmanat Apr 7, 2023
9503f9e
changed explanation for abstract class of UI. Used connection instead…
Apr 7, 2023
578f432
Ensure all Class in listComponentCommand has :
Magmanat Apr 7, 2023
c479fb4
Export new png listComponentCommand
Magmanat Apr 7, 2023
dc93701
Settle merge conflicts
Magmanat Apr 7, 2023
0af73c9
Remove unecessary items from TOC
Magmanat Apr 7, 2023
0d32a0f
Add line to differentiate items on DG
Magmanat Apr 7, 2023
9d683c1
Merge pull request #213 from Magmanat/master
Ryujikjs Apr 8, 2023
0403d6e
Merge branch 'master' of https://github.com/AY2223S2-CS2113-T12-2/tp …
Apr 8, 2023
c47edbd
Merge pull request #212 from typingpanda/developer-docs
Ryujikjs Apr 8, 2023
ce98880
Fix DataStorage Class Diagram to remove :
Magmanat Apr 8, 2023
1e5de24
Ensure PcDiagram correct sizing
Magmanat Apr 8, 2023
4f21290
Fix correctness of diagrams in DG
Apr 8, 2023
28009ce
Add @@author to DG
Magmanat Apr 8, 2023
f060db9
Add getting started and acknowledgements
Magmanat Apr 8, 2023
5b41f0e
Fix PC Viewer menu tests
superkaiba Apr 8, 2023
40a388c
Update Individual profile page, fix bug in user stories table and amm…
Ryujikjs Apr 8, 2023
cb4e3bb
Add PPP
Apr 8, 2023
4c109b7
Add fictional data for all components in resources
Magmanat Apr 8, 2023
84e0a6d
Merge pull request #214 from Ryujikjs/PPP
keanecxz Apr 8, 2023
0145d43
Solve merge conflicts
Magmanat Apr 8, 2023
6daabe4
Update PPP
Apr 8, 2023
d26604b
Merge branch 'master' of https://github.com/AY2223S2-CS2113-T12-2/tp …
Apr 8, 2023
54d55d4
Fix spelling errors
Ryujikjs Apr 8, 2023
3baff45
Revert accidental change of PcDiagram
Magmanat Apr 8, 2023
9b6fda9
Merge pull request #217 from Ryujikjs/PPP
Magmanat Apr 8, 2023
bddeedf
Merge branch 'master' of https://github.com/AY2223S2-CS2113-T12-2/tp …
Magmanat Apr 8, 2023
932d5b7
Fix Object diagram
Apr 8, 2023
b6878c1
Merge pull request #215 from typingpanda/developer-docs
Magmanat Apr 8, 2023
aea28f8
Merge branch 'master' of https://github.com/AY2223S2-CS2113-T12-2/tp …
Magmanat Apr 8, 2023
54b43d1
Settle merge conflicts and add items to PPP
Magmanat Apr 8, 2023
c196bf0
Add @@author for appendix
Magmanat Apr 8, 2023
e192400
Merge branch 'master' of https://github.com/AY2223S2-CS2113-T12-2/tp
Magmanat Apr 8, 2023
859cd5e
Merge pull request #216 from Magmanat/master
Ryujikjs Apr 8, 2023
b58ebc7
Merge branch 'master' of https://github.com/AY2223S2-CS2113-T12-2/tp …
Magmanat Apr 8, 2023
eb31fbd
Add Prince PPP to ensure all the details are added
Magmanat Apr 8, 2023
22f5c74
change aboutUs to reflect correct portfolio
Magmanat Apr 8, 2023
ed76554
Fix more PC Viewer menu tests
superkaiba Apr 8, 2023
9ebad4c
remove text-ui-test
superkaiba Apr 8, 2023
e93949d
Remove dos2unix
superkaiba Apr 8, 2023
28ad965
Add Reviewing/Mentoring Contributions
Magmanat Apr 8, 2023
4f9934a
Add team contributions section
Magmanat Apr 8, 2023
62eab20
Update ViewerAddCommand in the developer guide.
Reynold-SL Apr 8, 2023
ec38410
Merge pull request #219 from Reynold-SL/branch_viewer_developer_guide
superkaiba Apr 8, 2023
7e82f53
Merge pull request #218 from Magmanat/Prince-PPP
superkaiba Apr 8, 2023
4dbf2e9
Resolve merge conflicts
Magmanat Apr 8, 2023
56eedb5
Change to lowercase for PPP
Magmanat Apr 8, 2023
d419655
Merge pull request #220 from Magmanat/master
Magmanat Apr 8, 2023
ad3c33b
Remove color from terminal
superkaiba Apr 8, 2023
c6c0cdf
Remove conflict marker
Magmanat Apr 8, 2023
52f8327
Change to lowercase
Magmanat Apr 8, 2023
6da1178
Merge pull request #205 from superkaiba/format-pc-viewer-menu-better
Magmanat Apr 8, 2023
9a02d42
Modify Thomas PPP
superkaiba Apr 9, 2023
1dd88ea
Update userguide for budget command
Apr 9, 2023
5a9fb66
Add documentation for componentlistcommand
Apr 9, 2023
0bfecf2
Modify PPP
Apr 9, 2023
7d77cd4
Update portfolio
Reynold-SL Apr 9, 2023
c2d0977
Update portfolio to add team based tasks
Reynold-SL Apr 9, 2023
f6acd54
Merge pull request #224 from Reynold-SL/branch_portfolio
superkaiba Apr 9, 2023
ac85eb1
Merge pull request #223 from typingpanda/documentation
superkaiba Apr 9, 2023
12309ff
Merge pull request #222 from typingpanda/user-guide
superkaiba Apr 9, 2023
3025c33
Merge pull request #221 from superkaiba/modify-thomas-ppp
Magmanat Apr 9, 2023
293da0a
Update AboutUs.md
Magmanat Apr 9, 2023
c051b38
Add Junit test for compare commands and change PPP file naming
Ryujikjs Apr 9, 2023
b123b88
Fix spelling error
Ryujikjs Apr 9, 2023
9b94a5a
Merge pull request #225 from Ryujikjs/More-Junit
Magmanat Apr 9, 2023
9e2891f
Rename Ryujikjs.md to ryujikjs.md
Magmanat Apr 9, 2023
dd87d6b
Update AboutUs.md
Magmanat Apr 9, 2023
064982e
Rename KeaneChan.md to typingpanda.md
Magmanat Apr 9, 2023
6b92329
Update AboutUs.md
Magmanat Apr 9, 2023
e1f43a9
Update magmanat.md
Magmanat Apr 9, 2023
e66e3aa
Create JUnit Test
Reynold-SL Apr 9, 2023
ec67260
Update checkstyle of code
Reynold-SL Apr 9, 2023
9b16d0f
Update ViewCommandTest according to checkstyle
Reynold-SL Apr 9, 2023
c73034e
Fix errors with FilterCommandTest and EditCommandTest
Reynold-SL Apr 9, 2023
09f365f
Edit Developer Guide to include outcomes for each example
Reynold-SL Apr 9, 2023
c4e8c36
Merge pull request #226 from Reynold-SL/branch_junit_test
Magmanat Apr 10, 2023
d53fae9
Update to follow format of sequential diagram for Commands
Magmanat Apr 10, 2023
8ef0a7c
Merge pull request #228 from Magmanat/update_reynold_pr
Magmanat Apr 10, 2023
8ebea70
Update AboutUs.md
Magmanat Apr 10, 2023
1fab622
Update UserGuide.md
Magmanat Apr 10, 2023
e63b8ad
Add Page breaks to UG
Magmanat Apr 10, 2023
8de1d82
Update PPP to have page break at top and add additional information
Ryujikjs Apr 10, 2023
23a3a78
Merge pull request #229 from Ryujikjs/PPP-Update
keanecxz Apr 10, 2023
c3618ac
Update PPP
Apr 10, 2023
184072d
Fix merge conflict
Apr 10, 2023
73171b4
Update PPP
Apr 10, 2023
f0d74a6
Fix spelling error
Apr 10, 2023
9727ac2
Merge pull request #230 from typingpanda/PPP
keanecxz Apr 10, 2023
980e4fa
Remove page break for keane PPP
keanecxz Apr 10, 2023
c533fb7
Remove line break
Ryujikjs Apr 10, 2023
11ad060
Merge pull request #231 from Ryujikjs/PPP-Update
Ryujikjs Apr 10, 2023
a6aa387
Update Reynold's PPP
Reynold-SL Apr 10, 2023
b3a2906
Update UserGuide.md
Magmanat Apr 10, 2023
5038b98
Fix Formatting issue for Reynold's PPP
Reynold-SL Apr 10, 2023
78d5062
Update DeveloperGuide.md
Magmanat Apr 10, 2023
58bb431
Update DeveloperGuide.md
Magmanat Apr 10, 2023
6b934de
Update DeveloperGuide.md
Magmanat Apr 10, 2023
4c70708
Update DeveloperGuide.md
Magmanat Apr 10, 2023
eff9ed6
Rynold PPP update
Ryujikjs Apr 10, 2023
3acd9f5
Merge remote-tracking branch 'origin/master'
Reynold-SL Apr 10, 2023
b6646df
Merge pull request #232 from Ryujikjs/PPP-Update
Reynold-SL Apr 10, 2023
d355f12
Update DeveloperGuide.md
Magmanat Apr 10, 2023
8373ddc
Update magmanat.md
Magmanat Apr 10, 2023
8a26622
Update magmanat.md
Magmanat Apr 10, 2023
4e05cc2
Update magmanat.md
Magmanat Apr 10, 2023
2feae19
Update magmanat.md
Magmanat Apr 10, 2023
19594e1
Update magmanat.md
Magmanat Apr 10, 2023
c47b926
Add Exception handling for DataStorage
Magmanat Apr 10, 2023
fb532d6
Update for DataStorage loading exception
Magmanat Apr 10, 2023
5806489
New checks to ensure tampering with data file is handled properly
Magmanat Apr 10, 2023
45510e6
Merge pull request #233 from Magmanat/master
Magmanat Apr 10, 2023
3e00a8d
Update UserGuide.md
Magmanat Apr 10, 2023
b913eab
Update UserGuide.md
Magmanat Apr 10, 2023
a7a5431
Ensure efficiency can only be gold, silver, bronze
Magmanat Apr 10, 2023
0d17868
Update UserGuide.md
Magmanat Apr 10, 2023
35f49cf
Merge remote-tracking branch 'upstream/master'
Reynold-SL Apr 10, 2023
34121dd
Ensure custom commands line up with UG
Magmanat Apr 10, 2023
c63be88
New Updates to Reynold's PPP
Reynold-SL Apr 10, 2023
d91fd44
Merge branch 'master' of https://github.com/AY2223S2-CS2113-T12-2/tp
Magmanat Apr 10, 2023
c955ea8
Merge pull request #234 from Reynold-SL/branch_error_Reynold_PPP
Magmanat Apr 10, 2023
db9f026
Merge branch 'master' of https://github.com/AY2223S2-CS2113-T12-2/tp
Magmanat Apr 10, 2023
5c8ed9a
Change PC VIEWER to PC viewer
Magmanat Apr 10, 2023
215bbe7
Update UserGuide.md
Magmanat Apr 10, 2023
aa2e1ee
Update DeveloperGuide.md
Magmanat Apr 10, 2023
4710b81
Change the space divider for split
Magmanat Apr 10, 2023
340e224
Solve some bugs on IO
Magmanat Apr 10, 2023
99f74e7
Merge pull request #235 from Magmanat/master
Magmanat Apr 10, 2023
d49ac7e
Ensure random input after valid delete, view, edit is handled
Magmanat Apr 10, 2023
38eb8eb
Change how custom command handles price
Magmanat Apr 10, 2023
b6ea031
Add funny message for too high of a price
Magmanat Apr 10, 2023
0134a08
Fix exception messages
Apr 10, 2023
27b5865
Remove float price from custom gpu accidentally
Magmanat Apr 10, 2023
f4a2229
Merge pull request #236 from Magmanat/master
Magmanat Apr 10, 2023
9e86469
Fix test exception messsage
Apr 10, 2023
3739ecc
Fix ram json memory correctness
Apr 10, 2023
ee1c0ad
Fix list ram memory flag
Apr 10, 2023
74dff1f
Fix ram exception message
Apr 10, 2023
e0dec08
Fix ram excecption message again
Apr 10, 2023
0d090a8
Handle ParseFloat infinity
Magmanat Apr 10, 2023
d71cc68
Merge pull request #237 from typingpanda/fix-bugs
Magmanat Apr 10, 2023
823f47c
Change some formatting errors
Magmanat Apr 10, 2023
af9c6af
Fix userguide and Dg
Reynold-SL Apr 10, 2023
057bd92
Merge pull request #239 from Reynold-SL/branch_update_user_guide
Reynold-SL Apr 10, 2023
f50a93e
Change regex expression
Magmanat Apr 10, 2023
43976a8
Merge pull request #238 from Magmanat/master
Magmanat Apr 10, 2023
11f9d01
Fix out of bounds error
Apr 10, 2023
2ec233d
Fix naming error
Apr 10, 2023
18baad9
Fix float parsing
Apr 10, 2023
f39743b
Fix Junit test
Apr 10, 2023
69ecfb2
Fix merge conflict
Apr 10, 2023
6cb8e79
Fix parsing for integers and floats
Apr 10, 2023
e48b781
Fix ranges
Apr 10, 2023
850f273
Fix ranges
Apr 10, 2023
d950a20
Update user guide flags
Ryujikjs Apr 10, 2023
c5eb1c0
Fix errors
Apr 10, 2023
baf7e23
Update user guide flags
Ryujikjs Apr 10, 2023
579cb52
Merge pull request #240 from typingpanda/fix-bugs
Magmanat Apr 10, 2023
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
11 changes: 11 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,14 @@ bin/

/text-ui-test/ACTUAL.TXT
text-ui-test/EXPECTED-UNIX.TXT
.vscode/settings.json

# ignore class files
*.class
*.log

#ignore formatter
*.xml

#ignore user files
user.json
29 changes: 25 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ repositories {
}

dependencies {
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-api', version: '5.5.0'
testRuntimeOnly group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: '5.5.0'
implementation 'com.google.code.gson:gson:2.10.1'
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-api', version: '5.7.0'
testRuntimeOnly group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: '5.7.0'
}

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

application {
mainClass = "seedu.duke.Duke"
mainClass = "seedu.bigpp.BigPP"
}

shadowJar {
archiveBaseName = "duke"
archiveBaseName = "bigpp"
archiveClassifier = null
}

Expand All @@ -43,4 +44,24 @@ checkstyle {

run{
standardInput = System.in
enableAssertions = true
}

jar {
manifest {
attributes "Main-Class": "seedu.bigpp.BigPP"
}

from {
configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
}
}

tasks.withType(Copy).all { duplicatesStrategy 'exclude' }

sourceSets {
main.java.srcDirs 'src/main/java'
main.resources.srcDirs 'src/main/resources'
test.java.srcDirs 'src/test/java'
test.resources.srcDirs 'src/test/resources'
}
14 changes: 7 additions & 7 deletions docs/AboutUs.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# 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) | Thomas Jiralerspong | [Github](https://github.com/superkaiba) | [Portfolio](team/thomasjiralerspong.md) |
| ![](https://programmerhumor.io/wp-content/uploads/2023/01/programmerhumor-io-java-memes-backend-memes-125b7f839a0c6f1-889x1024.jpg) | Pereira Prince Matthew James | [Github](https://github.com/Magmanat) | [Portfolio](team/PrincePereira.md) |
| ![](myphoto) | Ryuji Kow | [Github](https://github.com/Ryujikjs) | [Portfolio](team/RyujiKow.md) |
| ![](NoPhotos) | Reynold Samel Lam | [Github](https://github.com/Reynold-SL) | [Portfolio](team/reynoldlam.md) |
| ![](NoPhotos) | Keane Chan | [Github](https://github.com/typingpanda) | [Portfolio](team/KeaneChan.md) |
189 changes: 176 additions & 13 deletions docs/DeveloperGuide.md
Original file line number Diff line number Diff line change
@@ -1,38 +1,201 @@
<!-- omit in toc -->
# Developer Guide
<!-- omit in toc -->
Magmanat marked this conversation as resolved.
Show resolved Hide resolved
## Table of contents
Magmanat marked this conversation as resolved.
Show resolved Hide resolved

- [General Overview](#general-overview)
- [Design \& implementation](#design--implementation)
Magmanat marked this conversation as resolved.
Show resolved Hide resolved
Magmanat marked this conversation as resolved.
Show resolved Hide resolved
- [UI class](#ui-class)
- [DataStorage class](#datastorage-class)
- [loadChassis() method](#loadchassis-method)
- [Parser class](#parser-class)
- [PC Class Architecture](#pc-class-architecture)
- [Command class](#command-class)
- [`list [COMPONENT]` Command (builder mode)](#list-component-command-builder-mode)
- [Appendix: Requirements](#appendix-requirements)
- [Product scope](#product-scope)
- [Target user profile](#target-user-profile)
- [Value proposition](#value-proposition)
- [User Stories](#user-stories)
- [Non-Functional Requirements](#non-functional-requirements)
- [Glossary](#glossary)
- [Instructions for manual testing](#instructions-for-manual-testing)


## General Overview
below is the overall architecture diagram for how BigPP works.

![Architecture Diagram](uml-pictures/ArchitectureDiagram.png)
Magmanat marked this conversation as resolved.
Show resolved Hide resolved

The program will first load the `UserJson` and files in the `Resources` folder to populate its internal memory of `PCLists` and `ComponentLists`. This will be stored in its `DataStorage`. The `User`'s interaction with the `UI` will be `parsed` into a `command` which would update the `DataStorage` and eventually update the `Menu` which is displayed back to the `User`. This would continue until the `User` exits the program, which would result in the data stored in `DataStorage` being saved into the `UserJson`.

## Acknowledgements
## Design & implementation

{list here sources of all reused/adapted ideas, code, documentation, and third-party libraries -- include links to the original source as well}
### UI class

Choose a reason for hiding this comment

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

Maybe a multiplicity needs to be added between UI and UIState as well.

Below is the Class diagram for the UI class

## Design & implementation
![UI Class Diagram](uml-pictures/UIClassDiagram.png)
Magmanat marked this conversation as resolved.
Show resolved Hide resolved

The `UI` Class serves as the interface between the user and BigPP. It is responsible for the following key actions
Magmanat marked this conversation as resolved.
Show resolved Hide resolved

1. **Initialization**: Upon start up of BigPP, the instance of `DataStorage` is parsed into the `updateUI` method of `UI` to give it the ability to access resources for BigPP. `UIState` is set to be `PCViewer`.

2. **Functionality**
- Shows welcome message to the user
- Gets input from the user
- Sets the `UIState` of BigPP depending on user command
- Updates the user interface to show the menu depending on the `UIState`
- Clears the terminal after every user command
- Shows feedback to the user after every user command

3. **Behavior**: The `UI` Class acts as the intermediary between the user and BigPP. `UIState` of `UI` can change between `PCViewer` and `PCBuilder` which would result in different commands available to the user. This makes the possible commands that can be given clear to the user.

In summary, UI gives crucial feedback to the user such as the menu of possible commands based on the current menu and results of a given command.

### DataStorage class
Below is the Class diagram for the DataStorage class:

![DataStorage Class Diagram](uml-pictures/DataStorageClass.png)
Magmanat marked this conversation as resolved.
Show resolved Hide resolved

The `DataStorage` class serves as a centralized storage and management system for lists of components and PC builds in the application. It is responsible for the following key actions:

1. **Initialization**: Upon creation, the `DataStorage` class initializes its `stringToComponentListMap` and `pcList` properties, which contain instances of `ComponentList` and `PCList`, respectively. These lists are used to manage components and PC builds within the application.

2. **Functionality**: The `DataStorage` class

- Loads the entire `user.json` file that is saved in the storage of the user's computer. This json file will contain all of the PC builds that the user has made in his prior usages of BigPP.
- Loads all of the pre-built PC builds that are in the `Resources` folder that have been pre-set by us for the user to view.
- Loads all of the data that is in the `Resources` folder which stores pre-loaded data of BigPP which includes all of the component data that is available in our database.
- Saves all the user data into `user.json` file that is saved in the storage of user's computer when the user inputs the "bye" command.

3. **Behavior**: The `DataStorage` class acts as an intermediary between the application and the stored lists of components and PC builds. It helps to maintain a clean separation of concerns by providing a unified interface for handling data storage and retrieval. This allows the rest of the application to interact with the data easily.

In summary, the `DataStorage` class is responsible for managing lists of components and PC builds, providing methods to load all the data needed, and interact with this loaded data.

#### loadChassis() method
This Sequential analysis will show how the loadChassis() method works, this will also serve as an example for all the other load methods that the DataStorage class has.

The `loadChassis` method reads chassis information from a JSON file and populates a `ChassisList` with the data.

When the `loadChassis` method is called with a file path as its argument, it first gets a `ClassLoader` instance from the `DataStorage` class and uses it to create an `InputStream` for the specified file. A `BufferedReader` is then created to read the contents of the file.

The JSON file is read and concatenated into a single string using `reduce`. The GSON library is then used to deserialize the JSON string into a `Map<String, Chassis>`, with the key being the name of the chassis and the value being a `Chassis` object.

Next, the method iterates over the `chassisMap` and sets the name attribute of each `Chassis` object to its corresponding key in the map.

Finally, the method iterates over the `chassisMap` again, adding each `Chassis` object to the `ChassisList` stored in the `stringToComponentListMap` HashMap.

A UML sequence diagram showing the interactions between the different objects involved in handling this method can be
found below:

![load Chassis Sequential Diagram](uml-pictures/loadChassisSequential.png)
Magmanat marked this conversation as resolved.
Show resolved Hide resolved
Magmanat marked this conversation as resolved.
Show resolved Hide resolved
Magmanat marked this conversation as resolved.
Show resolved Hide resolved

### Parser class
The UML class diagram shows the features of the Parser class:

![Parser Class Diagram](uml-pictures/ParserClass.png)

The purpose of the Parser class is to parse the user input into commands for execution. With reference to the diagram,
the Parser class does not have any attributes and only contains public methods for parsing of the user input.
The methods in the Parser class creates a subclass which inherits from the abstract superclass Command class.
From the diagram, Command class has a private attribute named arguments which stores the user inputs as a String. The Command class
contains methods that help to set and retrieve the private attribute in the class.
Overall, this class diagram provides an overview of the purpose of the Parser class.

#### ViewerAddCommand() method
This Sequential analysis will show how the ViewerAddCommand() method works, this will also serve as an example for the ViewerDeleteCommand and ViewerViewCommand.
During the ParseCommand, when a add command is detected in the user input, it will call the `ViewerAddCommand` method with
Magmanat marked this conversation as resolved.
Show resolved Hide resolved
a name as its argument. The `ViewerAddCommand` then calls a method to retrieve the argument.The `ViewerAddCommand`
checks if the argument is empty and throws an `PPException` if it is empty. A `PC` object is created with the argument as
an input. The `add` method is called by accessing the `dataStorage` and `pcList` classes to add the `PC` object to the list.
Finally, a message is returned to inform the user that the `ViewerAddCommand` method has been executed successfully.

A UML sequence diagram showing the interactions between the different objects involved in handling this method can be
found below:
![Viewer Add Command Sequential Diagram](uml-pictures/ViewerAddCommand.png)
Magmanat marked this conversation as resolved.
Show resolved Hide resolved
### PC Class Architecture

![PC Class Diagram](uml-pictures/PcDiagram.png)
Magmanat marked this conversation as resolved.
Show resolved Hide resolved
Magmanat marked this conversation as resolved.
Show resolved Hide resolved
Magmanat marked this conversation as resolved.
Show resolved Hide resolved
Magmanat marked this conversation as resolved.
Show resolved Hide resolved

Choose a reason for hiding this comment

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

image
image

In the DG, the Component class is said to be an abstract class but in the diagram, it isn't shown as an abstract class. If I didn't misunderstand the diagram, perhaps this is a mistake?

Magmanat marked this conversation as resolved.
Show resolved Hide resolved
Magmanat marked this conversation as resolved.
Show resolved Hide resolved

This UML class diagram shows the classes and their relationships in a computer system, which is represented by the `PC` class. The PC class has several attributes, including name, isPrebuilt, cpu, cpuCooler, gpu, motherboard, ram, storage, psu, chassis, and budget.

The `CPU`, `CPUCooler`, `GPU`, `Motherboard`, `RAM`, `Chassis`, `PSU` and `Storage` classes are components that can be used to build a `PC` object. Each component class has its own attributes and methods specific to that component.

The `Component` class is an abstract class that represents a generic computer component. It has attributes such as name, brand, and price, as well as methods to get and set those attributes.

The `PC` class has methods to set and get the components of a `PC` object, as well as methods to set and get the name, isPrebuilt, and budget attributes.

Overall, this class diagram provides a high-level overview of the components that make up a computer system and their relationships to each other.

### Command class
Magmanat marked this conversation as resolved.
Show resolved Hide resolved
Magmanat marked this conversation as resolved.
Show resolved Hide resolved
#### `list [COMPONENT]` Command (builder mode)
Magmanat marked this conversation as resolved.
Show resolved Hide resolved
The `list [COMPONENT]` command prints out a formatted list of all available components of type `[COMPONENT]`.

When the user inputs a command of the form `list [COMPONENT]` in builder mode,
Magmanat marked this conversation as resolved.
Show resolved Hide resolved
it is parsed by the `Parser.parseBuilderCommand` method which recognizes the first word as
`list` and creates a new `BuilderListComponentCommand` object while passing as argument the component
which was part of the command.

The `BuilderListComponentCommand.executeCommand()` method is then executed as part of the loop
inside `BigPP.runLoopUntilExit()`.

It first verifies:
- That the component argument is not empty. If it is then it throws a `BuilderMissingComponentException()`
- That the component given by the user exists in the database. If it doesn't then it throws a
`BuilderMissingComponentException()`

It then uses the `stringToComponentListMap` HashMap from data storage to get the ComponentList associated
with the component string input by the user (e.g. `cpu`). The `stringToComponentListMap` HashMap is initialized and
filled when the program is first run using `DataStorage.initStringToComponentListMap()` and maps component names
(e.g. `cpu`) to their corresponding `ComponentList` object (e.g. an object of type `CPUList`).

The `ComponentList` class inherits from `ArrayList` but additionally implements the `getListString()` method which
returns a formatted list of all the components in the `ComponentList` object.

The `ComponentList` objects for each component are instantiated and populated in the `DataStorage.loadAll` method
by loading the data in `resources/COMPONENT_NAME.json` using the `GSON` library.

The program then checks if the user provided any flags to filter the output of the component command (e.g. by name,
brand, price, etc.). If they did, then the program filters out the components not meeting the provided flags and
creates a `ComponentList` containing all the components which do meet the provided flags.

The program then uses the `ComponentList.getListString()` method to get a formatted list of the components
of the desired type, which it then outputs to the user.

A UML sequence diagram showing the interactions between the different objects involved in handling this command can be
found below:

{Describe the design and implementation of the product. Use UML diagrams and short code snippets where applicable.}
![List Component Command](./uml-pictures/listComponentCommand.png)
Magmanat marked this conversation as resolved.
Show resolved Hide resolved
Magmanat marked this conversation as resolved.
Show resolved Hide resolved
Magmanat marked this conversation as resolved.
Show resolved Hide resolved
Magmanat marked this conversation as resolved.
Show resolved Hide resolved


## Product scope
### Target user profile
## Appendix: Requirements
### Product scope
#### Target user profile

{Describe the target user profile}
People who want to build PC's and keep track of their builds.

### Value proposition
#### Value proposition

{Describe the value proposition: what problem does it solve?}
- Saves time and effort in selecting PC components
- Helps users avoid compatibility issues or mistakes
- Enables users to build cost-effective systems.
- Prebuilt PCs

## User Stories
### User Stories

|Version| As a ... | I want to ... | So that I can ...|
|--------|----------|---------------|------------------|
|v1.0|new user|see usage instructions|refer to them when I forget how to use the application|
Magmanat marked this conversation as resolved.
Show resolved Hide resolved
|v2.0|user|find a to-do item by name|locate a to-do without having to go through the entire list|
Magmanat marked this conversation as resolved.
Show resolved Hide resolved

Magmanat marked this conversation as resolved.
Show resolved Hide resolved
## Non-Functional Requirements
### Non-Functional Requirements

{Give non-functional requirements}

## Glossary
### Glossary

* *glossary item* - Definition

## Instructions for manual testing
### Instructions for manual testing

{Give instructions on how to do a manual product testing e.g., how to load sample data to be used for testing}
Magmanat marked this conversation as resolved.
Show resolved Hide resolved
Loading