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-F12-2] EquipmentManager #21

Open
wants to merge 352 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 168 commits
Commits
Show all changes
352 commits
Select commit Hold shift + click to select a range
7e8fced
Shift tests for prepareModification to ModificationCommandTest from U…
yuhaochua Mar 22, 2022
57f061c
Merge branch 'master' into branch-implementUiClass
shunyao643 Mar 22, 2022
0734b17
Merge pull request #58 from yuhaochua/branch-implementUiClass
shunyao643 Mar 22, 2022
ab4e53f
Merge branch 'master' into branch-unorderedTags
shunyao643 Mar 22, 2022
ec57a81
Merge pull request #57 from yuhaochua/branch-unorderedTags
shunyao643 Mar 22, 2022
01975b8
Update all classes for Java CI checks
shunyao643 Mar 22, 2022
1bbef72
Fix remaining pending Java CI errors
shunyao643 Mar 22, 2022
18acfc3
Merge branch 'master' of https://github.com/AY2122S2-CS2113-F12-2/tp
yuhaochua Mar 22, 2022
05c6e37
Merge branch 'master' into parser
shunyao643 Mar 22, 2022
1b93be4
Fix Java CI errors from test files
yuhaochua Mar 22, 2022
15a19c6
Merge pull request #60 from yuhaochua/master
yuhaochua Mar 22, 2022
061cdd9
Add support for parsing command word regardless of case
shunyao643 Mar 22, 2022
43fd0ef
Switch prepareAdd to extractArguments for Parser
shunyao643 Mar 22, 2022
8c8d59f
Add helper method to set argument tags to lowercase
shunyao643 Mar 22, 2022
c575044
Reformat Regex for improved readability
shunyao643 Mar 22, 2022
629ca22
Remove I/O redirection checks from github gradle build
yuhaochua Mar 22, 2022
ffc71c5
Merge branch 'master' of https://github.com/AY2122S2-CS2113-F12-2/tp
yuhaochua Mar 22, 2022
cc12f64
Include regex101.com debug link for easy maintainence
shunyao643 Mar 22, 2022
24a23c7
Merge branch 'master' into parser
shunyao643 Mar 22, 2022
106e543
Replace magic constants in Parser's prepareView and prepareDelete wit…
shunyao643 Mar 22, 2022
be99f2a
Deprecate prepareAdd entirely
shunyao643 Mar 22, 2022
c7fce04
Return type enumeration in all caps
shunyao643 Mar 22, 2022
81f1b31
Attempt to change String in value of Pair to generic wildcard class
shunyao643 Mar 22, 2022
a6f9cfb
Add documentation for architecture,
shunyao643 Mar 22, 2022
19ffe09
Merge pull request #61 from shunyao643/parser
yuhaochua Mar 23, 2022
37e38a8
Merge pull request #64 from shunyao643/developer-guide
yuhaochua Mar 23, 2022
1d77861
Merge branch 'master' of https://github.com/AY2122S2-CS2113-F12-2/tp
yuhaochua Mar 23, 2022
b3ec295
Fix bug where app ccrashes
yuhaochua Mar 23, 2022
103d600
Minor edit to make output shown to user more presentable when using A…
yuhaochua Mar 23, 2022
49b427c
Add support for lowercase argument for list command
shunyao643 Mar 23, 2022
40aedfb
Add JavaDocs to methods in UpdateCommand.
yuhaochua Mar 24, 2022
74fbb68
Update Developer Guide and add images used.
yuhaochua Mar 24, 2022
da0c19b
Add UML diagram visual paradigm file
yuhaochua Mar 24, 2022
2f8cdb5
Reorder sequence in design and implementation
yuhaochua Mar 24, 2022
5c5d02b
Merge pull request #67 from yuhaochua/branch-AddToDevGuide
yuhaochua Mar 24, 2022
628bb76
Merge pull request #66 from shunyao643/parser
yuhaochua Mar 24, 2022
a256b4a
Merge branch 'master' of https://github.com/AY2122S2-CS2113-F12-2/tp
yuhaochua Mar 24, 2022
1d8c444
Add JavaDocs
Bryan-BC Mar 24, 2022
068000d
Update DeveloperGuide
Bryan-BC Mar 24, 2022
a37eac0
Merge pull request #68 from Bryan-BC/developerGuideAndJavaDocs
Bryan-BC Mar 24, 2022
33e1561
Fix gradle
Bryan-BC Mar 24, 2022
3b1973b
Merge pull request #69 from Bryan-BC/developerGuideAndJavaDocs
Bryan-BC Mar 24, 2022
15a8567
Merge branch 'master' of https://github.com/AY2122S2-CS2113-F12-2/tp
yuhaochua Mar 25, 2022
ab30bb6
Update DeveloperGuide to apply theme
yuhaochua Mar 25, 2022
4b007a3
Update Pair class to support parsing of Double cost and EquipmentType
shunyao643 Mar 25, 2022
575ffc2
Merge branch 'master' into pair-update
shunyao643 Mar 25, 2022
5c1944f
Merge pull request #63 from shunyao643/pair-update
Bryan-BC Mar 25, 2022
d9a2260
Add Parser support for new Save command
shunyao643 Mar 25, 2022
15083e6
Fix Gradle CI/CD check for line exceeding 120 characters
shunyao643 Mar 25, 2022
d012a98
Merge branch 'master' of https://github.com/AY2122S2-CS2113-F12-2/tp
yuhaochua Mar 28, 2022
9aaa4a5
Fix developer guide table of content
yuhaochua Mar 28, 2022
4ce2fee
Update user guide, by yuhao
yuhaochua Mar 28, 2022
48091c4
Update user guide formatting
yuhaochua Mar 28, 2022
744ca10
Merge pull request #71 from shunyao643/parser
yuhaochua Mar 29, 2022
1b01955
Merge branch 'master' of https://github.com/AY2122S2-CS2113-F12-2/tp
yuhaochua Mar 29, 2022
7daddaa
Add SaveCommand
yuhaochua Mar 29, 2022
598b834
Fix error message which pops up after user inputs bye.
yuhaochua Mar 29, 2022
aff1a94
Fix checkstyle error
yuhaochua Mar 29, 2022
c899522
Fix gradle error
yuhaochua Mar 29, 2022
09ec2e0
Merge pull request #75 from yuhaochua/branch-SaveCommand
shunyao643 Mar 31, 2022
c92851b
Merge pull request #72 from yuhaochua/branch-updateUserGuide
shunyao643 Mar 31, 2022
4cc3cc9
Minor text edit for better user readability
shunyao643 Mar 31, 2022
74fb528
Rename prepareView to prepareCheck in line with rest of the applicati…
shunyao643 Mar 31, 2022
f83b455
Test Markdown block
shunyao643 Mar 31, 2022
aeea70e
Merge branch 'master' of https://github.com/AY2122S2-CS2113-F12-2/tp
yuhaochua Mar 31, 2022
193e0cd
Update UserGuide for list, update and delete commands
shunyao643 Mar 31, 2022
725c901
Implement JUnit tests for delete function of app
shunyao643 Mar 31, 2022
e7f8d80
Improve regex detection by stripping whitespace for one argument comm…
shunyao643 Mar 31, 2022
78044ed
Merge pull request #76 from shunyao643/user-guide
shunyao643 Mar 31, 2022
0871a56
Merge branch 'master' of https://github.com/AY2122S2-CS2113-F12-2/tp
yuhaochua Apr 1, 2022
a25a9bd
Add bye, help, and save commands to UserGuide
Bryan-BC Apr 1, 2022
a8bf95f
Merge pull request #79 from Bryan-BC/userGuide
Bryan-BC Apr 1, 2022
7a9b035
Merge pull request #78 from shunyao643/parser
Bryan-BC Apr 3, 2022
73f9e26
Merge branch 'master' of https://github.com/shunyao643/tp into parser
shunyao643 Apr 3, 2022
bfc8d1f
Add test case for decimal cost
shunyao643 Apr 3, 2022
9b921fc
Merge branch 'master' of https://github.com/shunyao643/tp into parser
shunyao643 Apr 3, 2022
b6c4fd4
Add support for float costs
shunyao643 Apr 3, 2022
1e25993
Fix documentation bug
Bryan-BC Apr 4, 2022
79516b1
Fix typo in HelpCommand
Bryan-BC Apr 4, 2022
ab76a1c
Merge pull request #112 from Bryan-BC/userGuide
yuhaochua Apr 4, 2022
56f2662
Add autosave feature
Bryan-BC Apr 4, 2022
9ffdb1d
Merge pull request #111 from shunyao643/parser
Bryan-BC Apr 4, 2022
914275d
Refactor code to move deprecated methods, variables to end of class
shunyao643 Apr 4, 2022
408c3a0
Merge pull request #113 from Bryan-BC/autoSave
yuhaochua Apr 4, 2022
7639822
Merge branch 'master' of https://github.com/AY2122S2-CS2113-F12-2/tp
yuhaochua Apr 4, 2022
5fe7255
Complete refactoring of internal references from View command to Chec…
shunyao643 Apr 4, 2022
e2a5908
Improve documentation for modification regex
shunyao643 Apr 4, 2022
472d189
Refactor code to trim strings in parseCommand
shunyao643 Apr 4, 2022
e81593f
Update javadoc for splitCommandTerm
shunyao643 Apr 4, 2022
73b9822
Improve user feedback for failed command parsing
shunyao643 Apr 4, 2022
f5c7547
Fix typo with output of HelpCommand being executed
yuhaochua Apr 4, 2022
92f3686
Update instructions in UserGuide on starting the application
yuhaochua Apr 4, 2022
2748802
Fix problem where wrong message occurs when there are missing attribu…
yuhaochua Apr 4, 2022
0266e64
Update the error message to be more detailed when user has arguments …
yuhaochua Apr 4, 2022
b643499
Update UserGuide on supporting of cost up to $10 million
yuhaochua Apr 4, 2022
1c6d7e9
Fix UpdateCommand not updating purchasedDate and purchasedFrom properly
yuhaochua Apr 4, 2022
699f82b
Fix broken JUnit test for EquipmentManager
yuhaochua Apr 4, 2022
fcb2c0d
Refactor Modification commands to require arguments to have backticks…
shunyao643 Apr 4, 2022
f4b3884
Merge pull request #115 from yuhaochua/branch-fixUpdatePdPf
shunyao643 Apr 4, 2022
97449e5
Update test cases to reflect shift trim() to parseCommand
shunyao643 Apr 4, 2022
83ab598
Update prepareCheck, prepareDelete to align with new backtick syntax
shunyao643 Apr 4, 2022
61085ef
Update regex101 link
shunyao643 Apr 4, 2022
76ade6d
Update command help tips to include backtick requirement
shunyao643 Apr 4, 2022
2557729
Merge branch 'master' of https://github.com/AY2122S2-CS2113-F12-2/tp
yuhaochua Apr 5, 2022
9e0b760
Update check command to allow any argument pair, but just one.
shunyao643 Apr 5, 2022
7393dbd
Refine delete command to accept a more narrow range of characters
shunyao643 Apr 5, 2022
5c47bf4
Merge pull request #114 from yuhaochua/branch-cosmeticUpdates
Bryan-BC Apr 5, 2022
a37648a
Merge pull request #116 from shunyao643/parser
yuhaochua Apr 5, 2022
2d6500a
Merge branch 'master' into parser-backtick
yuhaochua Apr 5, 2022
941f6aa
Merge pull request #117 from shunyao643/parser-backtick
yuhaochua Apr 5, 2022
f3ef396
Merge branch 'master' of https://github.com/AY2122S2-CS2113-F12-2/tp
yuhaochua Apr 5, 2022
70c9576
Fix broken JUnit test in ModificationCommandTest
yuhaochua Apr 5, 2022
3fad737
Change CheckCommand#execute to pass a Pair to EquipmentManager#checkE…
yuhaochua Apr 5, 2022
6e0cd55
Fix some broken JUnit tests
yuhaochua Apr 5, 2022
04f3dc7
Add JUnit tests for DeleteCommand
yuhaochua Apr 5, 2022
f57d3aa
Update messages to show backticks in examples of Commands usage
yuhaochua Apr 5, 2022
0bf0196
Unbold code to reduce emphasis, in line with rest of DG
shunyao643 Apr 6, 2022
11dce75
Update regex101 link
shunyao643 Apr 6, 2022
95e5c71
Revert "Update regex101 link": should be in
shunyao643 Apr 6, 2022
d113b1a
Attempt to center code
shunyao643 Apr 6, 2022
15ab1e1
Attempt to center formatted code
shunyao643 Apr 6, 2022
4d2813a
Fix code formatting for Parsr
shunyao643 Apr 6, 2022
bc5c8b9
Test code formatting for Parser
shunyao643 Apr 6, 2022
e7b19e6
Test code formatting for Parser
shunyao643 Apr 6, 2022
cfb2132
Test code formatting for Parser
shunyao643 Apr 6, 2022
2ecb645
Test code formatting for Parser
shunyao643 Apr 6, 2022
ebba1c5
Test code formatting for Parser
shunyao643 Apr 6, 2022
7c66485
Include backticks in DG
shunyao643 Apr 6, 2022
b26539c
Merge branch 'master' into developer-guide
shunyao643 Apr 6, 2022
77f00bf
Rewrite Parser DG documentation for v2.1
shunyao643 Apr 6, 2022
dff0711
Rewrite Update command to be more general for Command
shunyao643 Apr 7, 2022
6279221
Remove acknowledgements placeholder
shunyao643 Apr 7, 2022
a31a215
Reword Design and Implementation for better flow
shunyao643 Apr 7, 2022
338f29a
Draft product scope
shunyao643 Apr 7, 2022
a36ec57
Add prepareModification() to test case call
shunyao643 Apr 7, 2022
64fec6c
Merge pull request #122 from shunyao643/extractArguments-fix
shunyao643 Apr 7, 2022
ef4927f
Refactor checkEquipment to take Pair as parameter
Bryan-BC Apr 7, 2022
e64321d
Made changes according to @shunyao643 comments on pull request #119
yuhaochua Apr 7, 2022
b7c685c
Merge branch 'master' into branch-newDeleteCommand
yuhaochua Apr 7, 2022
f94108f
Merge pull request #120 from shunyao643/developer-guide
yuhaochua Apr 7, 2022
4567f8c
Update value to be used in Pair for CheckCommand
yuhaochua Apr 7, 2022
0f0d7cf
Merge pull request #118 from yuhaochua/branch-newCheckCommand
yuhaochua Apr 7, 2022
028fa80
Merge pull request #123 from Bryan-BC/checkEquipment
yuhaochua Apr 7, 2022
daa63e7
Merge branch 'master' of https://github.com/AY2122S2-CS2113-F12-2/tp
yuhaochua Apr 7, 2022
927f724
Fix broken JUnit test for CheckCommand
yuhaochua Apr 7, 2022
ee03f62
Modify EquipmentManger#checkEquipment to use `contains` instead of `e…
yuhaochua Apr 7, 2022
e39f380
Merge pull request #119 from yuhaochua/branch-newDeleteCommand
shunyao643 Apr 7, 2022
3c1bcf3
Merge branch 'master' of https://github.com/AY2122S2-CS2113-F12-2/tp
yuhaochua Apr 7, 2022
fffeae2
Fix checkstyle
shunyao643 Apr 7, 2022
7357caf
Merge branch 'master' of https://github.com/AY2122S2-CS2113-F12-2/tp
shunyao643 Apr 7, 2022
6c90b2e
Draft date implementation
shunyao643 Apr 7, 2022
19fa96c
Add LocalDate parsing to CheckCommand
shunyao643 Apr 7, 2022
fc74fb3
Remove for loop in CheckCommand#generateCheckPair
yuhaochua Apr 8, 2022
2bf2c9e
Merge pull request #124 from shunyao643/date-implementation
yuhaochua Apr 8, 2022
5907a09
Merge branch 'master' into branch-checkCommandLoop
yuhaochua Apr 8, 2022
c26200f
Merge pull request #126 from yuhaochua/branch-checkCommandLoop
yuhaochua Apr 8, 2022
b0a3244
Merge branch 'master' of https://github.com/AY2122S2-CS2113-F12-2/tp
yuhaochua Apr 8, 2022
b883a13
Update Project Portfolio Page
yuhaochua Apr 8, 2022
309230c
Minor edit to documentation in DeveloperGuide and UserGuide
yuhaochua Apr 8, 2022
45d9520
Edit sublist style for review contributions
yuhaochua Apr 8, 2022
fc54558
Update sublist
yuhaochua Apr 8, 2022
0468964
Fix references to Project Portfolio Pages
yuhaochua Apr 8, 2022
4325f44
Merge pull request #127 from yuhaochua/branch-yuhaoPPP
shunyao643 Apr 8, 2022
d89d102
Refactor UserGuide.md to include code blocks and update some command …
Bryan-BC Apr 8, 2022
8966f2e
Update Shun Yao's PPP
shunyao643 Apr 8, 2022
d16e468
Update portfolio for bryanchristopher.md
Bryan-BC Apr 8, 2022
4aa6a78
Merge pull request #129 from Bryan-BC/Bryan-AboutUs
shunyao643 Apr 8, 2022
75a3275
Merge branch 'master' of https://github.com/AY2122S2-CS2113-F12-2/tp
yuhaochua Apr 8, 2022
27e0955
Refactor error messages from ModificationCommand into Command
yuhaochua Apr 8, 2022
ec27609
Rename Shun Yao's PPP in line with requirements
shunyao643 Apr 8, 2022
84da80f
Merge pull request #130 from shunyao643/shunyao-PPP
shunyao643 Apr 8, 2022
f31eed4
Add support for LocalDate in Storage
Bryan-BC Apr 8, 2022
0bf50e9
Add support for LocalDate in Storage
Bryan-BC Apr 8, 2022
9564b60
Merge branch 'storageTweaks' of https://github.com/Bryan-BC/tp into s…
Bryan-BC Apr 8, 2022
3af7ab4
Refactor UserGuide.md to include code blocks and update some command …
Bryan-BC Apr 8, 2022
2d41b8e
Merge branch 'userGuide' of https://github.com/Bryan-BC/tp into userG…
Bryan-BC Apr 8, 2022
a21807e
Fix Gradle and removed list TYPE from HelpCommand
Bryan-BC Apr 8, 2022
042dc64
Remove * import
Bryan-BC Apr 8, 2022
979beb5
Merge pull request #128 from Bryan-BC/userGuide
yuhaochua Apr 8, 2022
4640b93
Merge pull request #131 from Bryan-BC/storageTweaks
yuhaochua Apr 8, 2022
ab7e932
Merge branch 'master' of https://github.com/AY2122S2-CS2113-F12-2/tp …
yuhaochua Apr 8, 2022
5b6db61
Make key of Equipments to be lowercase
Bryan-BC Apr 8, 2022
6453c2d
Merge pull request #133 from Bryan-BC/equipmentManagerTweaks
Bryan-BC Apr 8, 2022
909760a
Update exception handling for CheckCommand
yuhaochua Apr 8, 2022
ee99055
Add instructions for manual testing to developer guide
yuhaochua Apr 8, 2022
86bc0da
Fix checkstyle
yuhaochua Apr 8, 2022
1bbb2e7
Remove implementation of listing equipment of specified type
yuhaochua Apr 8, 2022
91cdfbe
Remove remaining traces of listing equipment with type
yuhaochua Apr 8, 2022
75a5ede
Update java docs
yuhaochua Apr 8, 2022
c29e241
Add to glossary in DeveloperGuide
yuhaochua Apr 8, 2022
01e05dd
Add and update JUnit tests
yuhaochua Apr 8, 2022
80215ec
Edit sequence diagram and update developer guide
yuhaochua Apr 8, 2022
f6f7f35
Update glossary
yuhaochua Apr 8, 2022
57b2a76
Fix formatting issue with developer guide
yuhaochua Apr 8, 2022
6b2bef0
Loosen restrictions for modification command regex
shunyao643 Apr 8, 2022
b7a889f
Deprecate support for list command with argument tags in Parser
shunyao643 Apr 9, 2022
7578d41
Refactor Parser#splitCommandTerm with updated JavaDoc
shunyao643 Apr 9, 2022
689d706
Elaborate on DeveloperGuide.md's Design and Implementation
shunyao643 Apr 9, 2022
8debc8e
Elaborate on DeveloperGuide.md's Design and Implementation
shunyao643 Apr 9, 2022
7837794
Refactor constants in Parser.java
shunyao643 Apr 9, 2022
ef1c6c0
Remove deprecated code
shunyao643 Apr 9, 2022
5f7883d
Remove deprecated test case for parseCommand
shunyao643 Apr 9, 2022
87d11a3
Minor edit to Value Proposition
shunyao643 Apr 9, 2022
92ecb83
Add some user stories
shunyao643 Apr 9, 2022
7913e08
Add Storage in DG and change file name
Bryan-BC Apr 9, 2022
dd421a9
Refactor personal portfolio page name to align with github name
yuhaochua Apr 9, 2022
6f354d6
Merge pull request #136 from shunyao643/parser
yuhaochua Apr 9, 2022
431ad04
Merge pull request #135 from yuhaochua/branchDocumentations
yuhaochua Apr 9, 2022
98074c1
Merge branch 'master' into documentations
shunyao643 Apr 9, 2022
2eb11c7
Merge pull request #139 from Bryan-BC/documentations
shunyao643 Apr 9, 2022
633745f
Merge branch 'master' into parser-updated-list
shunyao643 Apr 9, 2022
ac45f66
Merge pull request #137 from shunyao643/parser-updated-list
shunyao643 Apr 9, 2022
8ef249a
Merge branch 'master' into developer-guide
shunyao643 Apr 9, 2022
2c0cdb2
Standardise formatting for Developer Guide
shunyao643 Apr 9, 2022
baab98c
Reformat Instructions for manual testing
shunyao643 Apr 9, 2022
9ade160
Add Parser terminology to glossary
shunyao643 Apr 9, 2022
7b3cef3
Update Parser regex documentation
shunyao643 Apr 9, 2022
b1df158
Update User Stories table
shunyao643 Apr 9, 2022
d9677f8
Touchup rest of DeveloperGuide.md
shunyao643 Apr 9, 2022
c0769db
Catch DateTimeParseException for Update command
shunyao643 Apr 9, 2022
3199793
Fix uncaught exceptions in Parser
shunyao643 Apr 9, 2022
6a0e8a2
Complete JavaDoc for Parser.java
shunyao643 Apr 9, 2022
1e1b00e
Update shunyao643.md
shunyao643 Apr 9, 2022
7d252b1
Merge pull request #141 from shunyao643/parser
yuhaochua Apr 10, 2022
905863e
Update enhancements implemented
shunyao643 Apr 10, 2022
4f1790c
Merge pull request #142 from shunyao643/shunyao-PPP
yuhaochua Apr 10, 2022
6d6d954
Merge pull request #138 from shunyao643/developer-guide
Bryan-BC Apr 10, 2022
208785a
Update Parser to remove unnecessary exceptions in CheckCommand
shunyao643 Apr 10, 2022
b3e1e5b
Remove disabled test cases in ParserTest.java
shunyao643 Apr 10, 2022
721288e
Merge branch 'master' of https://github.com/AY2122S2-CS2113-F12-2/tp …
yuhaochua Apr 10, 2022
e932e3a
Add minor details to DG and change portfolio part in AboutUs
Bryan-BC Apr 10, 2022
ec269c9
Add minor details to DG and change portfolio part in AboutUs
Bryan-BC Apr 10, 2022
995ff01
Add test case for updateCommand to catch incorrect Date exception
shunyao643 Apr 10, 2022
36b34cf
Merge branch 'documentationTweaks' of https://github.com/Bryan-BC/tp …
Bryan-BC Apr 10, 2022
20f0798
Minor edit to sequenceDiagram screenshot
yuhaochua Apr 10, 2022
55ec940
Minor edit to sequence diagram
yuhaochua Apr 10, 2022
afdf5e2
More edit to sequence diagram execute screenshot
yuhaochua Apr 10, 2022
2a67c2d
Update visual paradigm files
yuhaochua Apr 10, 2022
4ba8bf1
Transfer new user stories as planned futures into UserGuide.md
shunyao643 Apr 10, 2022
1a6744c
Merge pull request #143 from Bryan-BC/documentationTweaks
shunyao643 Apr 10, 2022
1e14ac4
Merge pull request #145 from yuhaochua/branchDocumentations
shunyao643 Apr 10, 2022
4111a77
Merge pull request #144 from shunyao643/master
shunyao643 Apr 10, 2022
c162645
Update UserGuide and PPP to reflect v2.1 features
shunyao643 Apr 10, 2022
2e0651c
Merge branch 'master' of https://github.com/AY2122S2-CS2113-F12-2/tp
shunyao643 Apr 10, 2022
d0c0540
Add more informative error for $ parsing
shunyao643 Apr 10, 2022
1ee66be
Merge pull request #146 from shunyao643/master
shunyao643 Apr 10, 2022
6fcd2ad
Change file name to bryan-bc.md
Bryan-BC Apr 10, 2022
71d165a
Merge pull request #147 from Bryan-BC/documentationTweaks
Bryan-BC Apr 10, 2022
dad297a
Add README in tp/docs
Bryan-BC Apr 10, 2022
d3ea1f4
Merge pull request #148 from Bryan-BC/documentationTweaks
Bryan-BC Apr 10, 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
17 changes: 1 addition & 16 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,4 @@ jobs:

- name: Build and check with Gradle
run: ./gradlew check

- name: Perform IO redirection test (*NIX)
if: runner.os == 'Linux'
working-directory: ${{ github.workspace }}/text-ui-test
run: ./runtest.sh

- name: Perform IO redirection test (MacOS)
if: always() && runner.os == 'macOS'
working-directory: ${{ github.workspace }}/text-ui-test
run: ./runtest.sh

- name: Perform IO redirection test (Windows)
if: always() && runner.os == 'Windows'
working-directory: ${{ github.workspace }}/text-ui-test
shell: cmd
run: 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
META-INF/MANIFEST.MF
src/main/java/META-INF/MANIFEST.MF
/equipments.json
2 changes: 2 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ 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.9.0'
}

test {
Expand Down Expand Up @@ -43,4 +44,5 @@ checkstyle {

run{
standardInput = System.in
enableAssertions = true
}
12 changes: 5 additions & 7 deletions docs/AboutUs.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
# 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) | Bryan Christopher | [Github](https://github.com/Bryan-BC) | [Portfolio](docs/team/bryanchristopher.md)
![](https://via.placeholder.com/100.png?text=Photo) | Bai Shun Yao | [Github](https://github.com/shunyao643) | [Portfolio](docs/team/shunyao.md)
![](https://via.placeholder.com/100.png?text=Photo) | Yu Hao | [Github](https://github.com/yuhaochua) | [Portfolio](docs/team/yuhao.md)
121 changes: 117 additions & 4 deletions docs/DeveloperGuide.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,123 @@
# Developer Guide
# Table of Content

- [Acknowledgements](#acknowledgements)
- [Design and Implementation](#design-and-implementation)
- [Architecture](#architecture)
- [Parser](#parser)
- [Update feature](#update-feature)
- [EquipmentManager](#equipmentmanager)
- [Product scope](#product-scope)
- [Target user profile](#target-user-profile)
- [Value proposition](#value-proposition)
- [User stories](#user-stories)
- [NonFunctional requirements](#nonfunctional-requirements)
- [Glossary](#glossary)
- [Instructions for manual testing](#instructions-for-manual-testing)

## Acknowledgements

{list here sources of all reused/adapted ideas, code, documentation, and third-party libraries -- include links to the original source as well}
shunyao643 marked this conversation as resolved.
Show resolved Hide resolved

## Design & implementation
Our project could not have been possible without the prior work of the following:

{Describe the design and implementation of the product. Use UML diagrams and short code snippets where applicable.}
- [SE-EDU project team](https://se-education.org/docs/team.html) for their work on [AddressBook Level 3](https://github.com/se-edu/addressbook-level3), for which we referenced ideas as well as code snippets.
- Google's [GSON Java library](https://github.com/google/gson) for which we used to load and save our data files.
- Members of the [AY2122S2-CS2113-F10-2 team](https://github.com/nus-cs2113-AY2122S2) for pointing out the possibility of and requesting permission to make use of the above GSON library.

--------------------------------------------------------------------------------------------------------------------
## **Design and Implementation**

This section describes some noteworthy details on how certain features are designed and implemented.

### Architecture

Choose a reason for hiding this comment

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

Probably it's better to have an Architecture Diagram to aid understanding.


Our design draws significant inspiration from the implementation of AddressBook Level 3 (henceforth AddressBook).
As the program was initially conceptualised to be a text-based command-line interface, heavy consideration was given
to the design and user interactions when it came to the text input to be parsed by the user.
As such, we referenced AddressBook to segment the program into **`Parser`**, **`Command`** and **`Equipment`** classes.

**Main components of the architecture**
Copy link

Choose a reason for hiding this comment

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

As others suggested, class diagrams or an architecture diagram would be appreciated here.


Comment on lines +35 to +36

Choose a reason for hiding this comment

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

A class diagram could be appropriate here

- **`Duke`** is the Main class and entry-point for the program.
- **`Parser`** serves as the first filter to split raw text input and pass in arguments to the **`Command`** for further processing.
- **`Command`**, together with its various subclasses serve as specific implementations to pass the arguments taken in to the various methods of the **`EquipmentManager`** class.
- **`EquipmentManager`** keeps track of actual **`Equipment`** instances created by our program.
- **`Storage`** performs File I/O functions.

### Parser

Choose a reason for hiding this comment

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

A visual diagram of Parser may make this section easier to understand


**`Parser`** is the first filter for text inputs read to the user.
As alluded to prior, one major consideration was to build it in a manner that can parse text input as effectively as possible. In considering text input, we divided the parsing into the following segments:

#### `commandWord` `argumentTag/argumentValue` `argumentTag/argumentValue` `...`

Choose a reason for hiding this comment

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

Perhaps there's some mistyping for the last one? It's the same as the second one.

Choose a reason for hiding this comment

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

Consider giving an example usage for the add, delete and update operation.


To dispatch `argumentTag/argumentValue` strings to the correct **`Command`** class, the following logic is employed throughout **`Parser`** by **`parseCommand`**.

**1. Parse the correct Command Word**

**`splitCommandTerm`** splits the input string upon the first space.
The first substring is used to decide which **`Command`** to dispatch while the second is used for its arguments.
In the case where a second substring is not required, as in the case of **`help`** and **`list`**, a null String is used.

**2. Split Arguments**

For simpler command words such as **`delete`** and **`check`**, only one pair of **`argumentType`** and **`argumentValue`** were required.
As such, these will be passed in directly to their **`Command`** classes without a **`argumentType`** pair.

More complex command words such as **`add`** and **`update`** necessitated multiple arguments.
To implement this while ensuring that multi-word strings are acceptable input, **`extractArguments`** was implemented.
Without specifically explaining the main regular expression ([details here](https://regex101.com/r/gwjHWD/3)), the approach sought to match **`argumentTag/argumentValue`** pairs with a positive lookahead.
The final argument pair will then be extracted using a separate regex.
Together, this ensured that all argument pairs can be effectively parsed and dispatched to each **`Command`** class.

Throughout the `Parser` implementation, exceptions were used to return `IncorrectCommand` classes that can be used to pass error messages to the user. These will be discussed in the following segments.
shunyao643 marked this conversation as resolved.
Show resolved Hide resolved

### Update feature

#### Current Design and Implementation

The update feature is facilitated by `UpdateCommand`. It extends `ModificationCommand` and implements the following operations:

* `UpdateCommand#generateUpdatePairs()` — Generates pairs of attributes and their update values.
* `VersionedAddressBook#generateUpdateString()` — Generates sString with details of the update executed.

Given below is an example usage scenario and how the update feature behaves at each step.

Step 1. The user adds an equipment to the system with the help of the `add` command. The added equipment has the following attributes shown below.

![equipment0](images/equipment0.png)

Step 2. The user executes `update s/S1404115ASF n/SpeakerC c/2000 pd/2022-01-29` to update equipment with serial number S1404115ASF. `Parser#parseCommand` is called from `Duke` to parse the user's input.

Step 3. The parser recognises that an `UpdateCommand` is required, and the UpdateCommand is prepared to return to `Duke`. In the constructor of `UpdateCommand`, `prepareModification` is called to set the values of the attributes to be updated. The other attributes are set to null by default.

Step 4. `UpdateCommand#execute` is run to process the update. If the serialNumber attribute is null, a `CommandResult` with a `MISSING_SERIAL_NUMBER` output string will be returned. Otherwise, `EquipmentManager#updateEquipment` is called.

Step 5. If the update was successful, a `CommandResult` with success message will be returned, else a `CommandResult` with `UPDATE_FAILURE_MESSAGE` will be returned. Upon successful update, the object should be updated with the new attributes as shown in the diagram below.

![equipment1](images/equipment1.png)

The *Sequence Diagram* below shows how the objects/classes interact with each other in the case of an update command being issued by the user.
shunyao643 marked this conversation as resolved.
Show resolved Hide resolved

![sequenceDiagram](images/sequenceDiagram.png)

Choose a reason for hiding this comment

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

For alternative paths, perhaps it is an optional path. If my understanding is correct, you don't have an else statement in your code.

Choose a reason for hiding this comment

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

Screenshot 2022-03-31 100443
Should the start of Parser activation bar be before the method is called?
Should the return of the Parser class be at the end of the activation bar?

Choose a reason for hiding this comment

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

Screenshot 2022-03-31 101801
Should there be a return of control after calling prepareModification()?

Choose a reason for hiding this comment

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

Screenshot 2022-03-31 104543
Should there be a deactivation in the activation bar after returning from parser() call.

Choose a reason for hiding this comment

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

image
Should the return arrow be at the end of the activation bar and the solid arrow be at the start of the activation bar?

Choose a reason for hiding this comment

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

Maybe the calling arrow should touch the very top of the activation bar on the right, and the return arrow should come from the very bottom. This would signify that updateEquipment begins its lifecycle and isSuccessfulIUpdate ends it

Choose a reason for hiding this comment

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

image

Is there no return arrow when execute command is being called?

Choose a reason for hiding this comment

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

image

Shouldn't the calling and returning arrows touch the very tops and bottoms of the activation bars?

Choose a reason for hiding this comment

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

image

Is Parser making a new command object here? If Parser is making a new command object, it may be the diagram should signify a constructor call (by having the calling arrow touch the "command: UpdateCommand" box and have an activation bar immediately following that.

Copy link

Choose a reason for hiding this comment

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

The sequence diagram is a bit too big (in resolution). Placing this diagram in the final submission would be hard to be viewed.


Step 6. It is not shown in the sequence diagram but ultimately when the CommandResult is returned to `Duke`, the output of the `CommandResult` gets printed out and displayed to the user.

### EquipmentManager

The **`EquipmentManager`**, as the name suggests, manages all the equipment that the user has.

Choose a reason for hiding this comment

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

Consider using class or object diagram to illustrate how equipment manager works

When initialised, it creates a HashMap called **`equipmentList`** which is used to save the equipment with their serial numbers as their keys.
The **`EquipmentManager`** has several methods which allow manipulation to said HashMap such as **`addEquipment`**, **`checkEquipment`**, **`listEquipment`**, **`updateEquipment`**, and **`deleteEquipment`**.
These methods are used during the execution of each of the **`Command`** class.
* **`addEquipment`** — Adds an **`Equipment`** to the **`equipmentList`**.
* **`checkEquipment`** — Returns the **`Equipment`** in **`equipmentList`** that has the given **`itemName`**.
* **`listEquipment`** — Returns an ArrayList of all the **`Equipment`** in **`equipmentList`**.
* **`updateEquipment`** — Updates the specified **`Equipment`** with the corresponding updates given in the ArrayList of pairs.
* **`deleteEquipment`** — Deletes the specified **`Equipment`**.

The **`EquipmentManager`** is implemented as the main storage unit of all the equipments during the execution of the program.

Choose a reason for hiding this comment

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

Explanations of each of these features may be beneficial


Choose a reason for hiding this comment

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

Consider adding the steps of the implementation of EquipmentManager as per the Parser Component.

--------------------------------------------------------------------------------------------------------------------
## Product scope
Copy link

Choose a reason for hiding this comment

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

Product scope is necessary for the DG. Please try to finish this part soon.

### Target user profile

Expand All @@ -18,21 +127,25 @@

{Describe the value proposition: what problem does it solve?}

--------------------------------------------------------------------------------------------------------------------
## 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|
Copy link

Choose a reason for hiding this comment

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

We can definitely have more user stories.

|v2.0|user|find a to-do item by name|locate a to-do without having to go through the entire list|

## Non-Functional Requirements
--------------------------------------------------------------------------------------------------------------------
## NonFunctional Requirements

{Give non-functional requirements}

--------------------------------------------------------------------------------------------------------------------
## Glossary

* *glossary item* - Definition

--------------------------------------------------------------------------------------------------------------------
## 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}
155 changes: 139 additions & 16 deletions docs/UserGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,41 +2,164 @@

## Introduction

{Give a product intro}
EquipmentManager is a Command Line Interface application to help with keeping track of equipment details (e.g. current user, quantity, cost, warranty duration, purchase date) for an AV club. It provides a clean and fast way to manage the inventory as compared to “traditional” methods such as an Excel spreadsheet.

## Quick Start

{Give steps to get started quickly}

1. Ensure that you have Java 11 or above installed.
1. Down the latest version of `Duke` from [here](http://link.to/duke).
2. Download the latest version of `EquipmentManager` from [here](https://github.com/AY2122S2-CS2113-F12-2/tp/releases).
3. Copy the file to the folder you want to use as the _home folder_ for your `EquipmentManager` application.
4. Double-click the file to start the app.
5. Type `help` to see the list of available commands.

## Features

{Give detailed description of each feature}
- [Introduction](#Introduction)
- [Adding an equipment: `add`](#adding-an-equipment-add)
- [Checking an equipment: `check`](#checking-an-equipment-check)
- [Listing equipment: `list`](#listing-equipment-list)
- [Updating an equipment: `update`](#updating-an-equipment-update)
- [Deleting an equipment: `delete`](#deleting-an-equipment-delete)
- [Saving application state: `save`](#saving-application-state-save)
- [Getting help: `help`](#getting-help-help)
- [Exiting the application: `bye`](#exiting-the-application-bye)


### Introduction

* Words in `UPPER_CASE` are the parameters to be supplied by the user. Spaces are acceptable. <br>
e.g. in `check n/ITEM_NAME`, `ITEM_NAME` is a parameter which can be used as `check n/SM-57`.

* Items in square brackets are optional. <br>
e.g. `s/SERIAL_NUMBER [n/ITEM_NAME] [t/TYPE] ...` can be used as `s/SM57-1 n/SM57 t/MICROPHONE...` or as `s/SM57-1 t/MICROPHONE...`.

* After the command word (e.g. `add`, `update`), parameters can be in any order.<br>
e.g. if the command specifies `... s/SERIAL_NUMBER n/ITEM_NAME...`, `n/ITEM_NAME s/SERIAL_NUMBER` is also acceptable.

* Only one attribute/value can be saved per parameter. Where multiple inputs are supplied, the last parameter will be taken instead of the first one. <br>
e.g. `... n/ITEM_NAME_1 n/ITEM_NAME_2` will be interpreted as `... n/ITEM_NAME_2`, omitting `n/ITEM_NAME_1` entirely.

* Extraneous parameters for commands that do not take in parameters (such as `help`, `bye` and `save`) will be ignored.<br>
e.g. if the command specifies `help 123`, it will be interpreted as `help`.

### Adding an equipment: `add`
Adds new Equipment to the list of Equipment.

Format: `add n/ITEM_NAME s/SERIAL_NUMBER t/TYPE c/COST pf/PURCHASED_FROM pd/PURCHASED_DATE`

* The `TYPE` must be one of the following types: MICROPHONE, SPEAKER, STAND, CABLE.
* The `COST` cannot contain any symbols.

Example of usage and output:

`add n/SpeakerB s/S1404115ASF t/Speaker c/1000 pf/Loud_Technologies pd/2022-02-23`

output: `Equipment successfully added: SpeakerB, serial number S1404115ASF`

### Checking an equipment: `check`
Check the details of the equipment that has the name specified.

Format: `check n/ITEM_NAME`

* Only the `ITEM_NAME` can be used to check for a piece of equipment.

Example of usage and output:

`check n/SpeakerB`

output:

`Here are the equipment matching to 'SpeakerB':`

`1. serialNumber=S1404115ASF,itemName=SpeakerB,type=SPEAKER,cost=1000.0,purchasedFrom=Loud_Technologies,purchasedDate=2022-02-23`

### Listing equipment: `list`
Print a list of all equipment in the inventory. If a parameter is supplied, only the equipment matching to the parameter will be printed.

Format: `list [PARAMETER_NAME]`

* `PARAMETER_NAME` can only take on values of `SPEAKER`, `MICROPHONE`, `STAND`, `CABLE`.

Example of usage and output:

`list`

output:

`TOTAL QUANTITY OF EQUIPMENT: 2`

`1. serialNumber=S89347971ASF,itemName=MicrophoneC,type=MICROPHONE,cost=2000.0,purchasedFrom=Loud_Technologies,purchasedDate=2022-01-21`

`2. serialNumber=S1404115ASF,itemName=SpeakerB,type=SPEAKER,cost=1000.0,purchasedFrom=Loud_Technologies,purchasedDate=2022-02-23`

Example of usage and output:

`list microphone`

output:

`TOTAL QUANTITY OF EQUIPMENT: 1`

`1. serialNumber=S89347971ASF,itemName=MicrophoneC,type=MICROPHONE,cost=2000.0,purchasedFrom=Loud_Technologies,purchasedDate=2022-01-21`

### Updating an equipment: `update`

Equipment can be updated with new information. Every parameter except serial number can be updated.

Format: `update s/SERIAL_NUMBER [n/ITEM_NAME] [t/TYPE] [c/COST] [pf/PURCHASED_FROM] [pd/PURCHASED_DATE]`

* The `TYPE` must be one of the following types: MICROPHONE, SPEAKER, STAND, CABLE.
* The `COST` cannot contain any symbols.

Example of usage and output:

`update s/S14115ASF c/1200 pf/AVLFX`

output:

`Equipment successfully updated for serial number S14115ASF,`<br>
`Updated details are:`<br>
`New cost: 1200.0`<br>
`New purchased from: AVLFX`<br>

### Deleting an equipment: `delete`

Removes an Equipment entry from the list of Equipment entirely. This is irreversible after the file is saved.

Format: `update s/SERIAL_NUMBER [n/ITEM_NAME] [t/TYPE] [c/COST] [pf/PURCHASED_FROM] [pd/PURCHASED_DATE]`

* The `TYPE` must be one of the following types: MICROPHONE, SPEAKER, STAND, CABLE.
* The `COST` cannot contain any symbols.

Example of usage and output:

### Adding a todo: `todo`
Adds a new item to the list of todo items.
`delete s/S14115ASF`

Format: `todo n/TODO_NAME d/DEADLINE`
output:

* The `DEADLINE` can be in a natural language format.
* The `TODO_NAME` cannot contain punctuation.
`Equipment successfully deleted: SpeakerB, serial number S14115ASF`

Example of usage:
### Saving application state: `save`

`todo n/Write the rest of the User Guide d/next week`
### Getting help: `help`

`todo n/Refactor the User Guide to remove passive voice d/13/04/2020`
### Exiting the application: `bye`

## FAQ

**Q**: How do I transfer my data to another computer?

**A**: {your answer here}
**A**: Copy the data folder from the old computer into the other computer, in the same directory as the JAR file.

## Command Summary

{Give a 'cheat sheet' of commands here}
'Cheat Sheet' of commands here

* Add todo `todo n/TODO_NAME d/DEADLINE`
* Add equipment `todo n/TODO_NAME d/DEADLINE`
* Listing equipment: `list`
* Listing equipment by type: `list MICROPHONE`
* Updating an equipment: `update s/S14115ASF c/1200 pf/AVLFX`
* Deleting an equipment: `delete s/S14115ASF`
* Saving application state: ADD ON HERE
* Getting help: ADD ON HERE
* Exiting the application: ADD ON HERE
1 change: 1 addition & 0 deletions docs/_config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
theme: jekyll-theme-slate
Empty file.
Binary file added docs/diagrams/EquipmentManager.vpp
Binary file not shown.
Binary file added docs/diagrams/EquipmentManager.vpp.bak_000f
Binary file not shown.
Binary file added docs/images/equipment0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/equipment1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/sequenceDiagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading