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-T15-4] StockMaster #45

Open
wants to merge 749 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 250 commits
Commits
Show all changes
749 commits
Select commit Hold shift + click to select a range
ce0ede8
Merge pull request #186 from fxe025/master
fxe025 Apr 12, 2024
07216af
Revert runtest.sh changes
LowTL Apr 12, 2024
9e03c6b
Merge branch 'master' of https://github.com/AY2324S2-CS2113-T15-4/tp
LowTL Apr 12, 2024
8093c63
Add logger
LowTL Apr 12, 2024
9518a4b
Remove unused imports
LowTL Apr 12, 2024
d08e86d
Change declaration order
LowTL Apr 12, 2024
5416497
Change declaration order
LowTL Apr 12, 2024
3d963be
Merge pull request #183 from LowTL/master
LowTL Apr 12, 2024
20cc9fa
Add logget to AddCommand
LowTL Apr 12, 2024
d303915
Update Storage_sequenceDiagram
fxe025 Apr 12, 2024
bf960ce
Add loggers
LowTL Apr 12, 2024
5d000ad
Fix styling
LowTL Apr 12, 2024
b3a4a6a
Rename PPP
LowTL Apr 12, 2024
313478c
Update Storage_ClassDiagram
fxe025 Apr 12, 2024
f1d26f8
Update DG
fxe025 Apr 12, 2024
dae7003
Merge pull request #189 from fxe025/master
fxe025 Apr 12, 2024
ef053ea
Merge branch 'master' of https://github.com/AY2324S2-CS2113-T15-4/tp
LowTL Apr 12, 2024
49f6f99
update md
fxe025 Apr 12, 2024
800525e
Merge branch 'master' of https://github.com/AY2324S2-CS2113-T15-4/tp
fxe025 Apr 12, 2024
f8901d7
Organise diagrams
LowTL Apr 12, 2024
4ba4675
Add loggers
LowTL Apr 12, 2024
0fd810e
Update DeleteCommand logging
LowTL Apr 12, 2024
bb74c23
Merge pull request #188 from LowTL/master
LowTL Apr 12, 2024
192bf2e
Add Junit Test for Promotion class
Apr 12, 2024
12580e3
Edit Add Command
Apr 12, 2024
f6a53fc
Fix bug in Intellij for PPP
Apr 12, 2024
2c72d23
Merge branch 'master' of https://github.com/AY2324S2-CS2113-T15-4/tp
Apr 12, 2024
dae6d6c
Fix checkstyle
Apr 12, 2024
fa4f274
Add JavaDocs
Apr 12, 2024
5b93e25
Fix Checkstyle
Apr 12, 2024
d87bae3
Merge pull request #190 from HengShuHong/master
HengShuHong Apr 12, 2024
240f826
Update md
fxe025 Apr 13, 2024
3054dce
Update PPP
LowTL Apr 13, 2024
90c4ff0
Merge branch 'master' of https://github.com/AY2324S2-CS2113-T15-4/tp
LowTL Apr 13, 2024
689e9fc
Merge pull request #191 from fxe025/master
fxe025 Apr 13, 2024
4eae720
Fix issue 125
fxe025 Apr 13, 2024
1cadb5d
remove HengShuHeng.md due to comitting errors
Apr 13, 2024
4dc3173
Merge branch 'master' of https://github.com/AY2324S2-CS2113-T15-4/tp
Apr 13, 2024
b57fb20
Merge branch 'master' of https://github.com/AY2324S2-CS2113-T15-4/tp
fxe025 Apr 13, 2024
a50ef35
Fix naming convention
fxe025 Apr 13, 2024
fcb74d1
Modify expected output
fxe025 Apr 13, 2024
13f80f8
Merge pull request #192 from fxe025/master
fxe025 Apr 13, 2024
6dd7581
Add BestsellerCommandTest
LowTL Apr 13, 2024
d482ce3
Fix BestsellerCommandTest bug
LowTL Apr 13, 2024
ef479de
add UML diagram for listcommand for list_items
Apr 13, 2024
1d3b63a
Resvole merge conflicts
LowTL Apr 13, 2024
e6a99b4
Remove unnecessary import
LowTL Apr 13, 2024
17f4dcf
add to DG and upload UML diagrams
Apr 13, 2024
81731e6
Update PPP
Apr 13, 2024
a88dc19
Documentation
Joellimjr Apr 13, 2024
9e3f46c
Merge branch 'master' of https://github.com/AY2324S2-CS2113-T15-4/tp
Apr 13, 2024
57028b6
Add ListCommaandTest
LowTL Apr 13, 2024
128bfb4
Edit Delete Command
Apr 13, 2024
440965a
Add storage loggers
LowTL Apr 13, 2024
84085f2
Merge pull request #194 from HengShuHong/master
HengShuHong Apr 13, 2024
eec36ca
change UG and PPP
Apr 13, 2024
a8ba256
Merge branch 'master' of https://github.com/AY2324S2-CS2113-T15-4/tp …
Apr 13, 2024
422efa0
change junit test
Apr 13, 2024
3ce8683
Merge pull request #197 from Fureimi/week-12-testing-diagrams
Fureimi Apr 13, 2024
aa4cb96
Merge branch 'master' of https://github.com/AY2324S2-CS2113-T15-4/tp
Apr 13, 2024
f2404f0
Fix merge conflicts
LowTL Apr 13, 2024
f80ad98
Revert PPP file
LowTL Apr 13, 2024
357a176
Add promotionList test
LowTL Apr 13, 2024
c7c7d12
Add testing txt
fxe025 Apr 13, 2024
7002ddf
Update md
fxe025 Apr 13, 2024
6fd86ed
Documentation
Joellimjr Apr 13, 2024
b9d0400
Documentation
Joellimjr Apr 13, 2024
fd3b464
resolve merge conflicts
Joellimjr Apr 13, 2024
a3b2d3a
checkstyle edit
Joellimjr Apr 13, 2024
df37d94
Merge pull request #198 from Joellimjr/v2.0
Joellimjr Apr 13, 2024
f2431ad
Merge branch 'master' of https://github.com/AY2324S2-CS2113-T15-4/tp
fxe025 Apr 14, 2024
3c9742e
Merge branch 'master' of https://github.com/AY2324S2-CS2113-T15-4/tp
fxe025 Apr 14, 2024
8a21b1e
Add ListCommandTests
LowTL Apr 14, 2024
acd9322
Add TotalProfitCommandTest
LowTL Apr 14, 2024
1a4eb83
Merge branch 'master' of https://github.com/AY2324S2-CS2113-T15-4/tp
Apr 14, 2024
4a7e061
Make Cashier.transactions public
LowTL Apr 14, 2024
2fe0186
Change reset for tests
LowTL Apr 14, 2024
a1789ae
Change shouldReturnCorrectIndex
LowTL Apr 14, 2024
a8ce114
Remove unused imports
LowTL Apr 14, 2024
be4c6ed
Merge branch 'master' of https://github.com/AY2324S2-CS2113-T15-4/tp
LowTL Apr 14, 2024
aab03a2
Update expected test text
LowTL Apr 14, 2024
887dec5
Merge pull request #193 from LowTL/master
LowTL Apr 14, 2024
1c67281
Update StorageTest
fxe025 Apr 14, 2024
0b09ad7
Merge branch 'master' of https://github.com/AY2324S2-CS2113-T15-4/tp
fxe025 Apr 14, 2024
cd6da3d
Update ItemlistTest, remove unused import
fxe025 Apr 14, 2024
dee8d14
Update ItemlistTest
fxe025 Apr 14, 2024
abd5eff
Merge pull request #199 from fxe025/master
fxe025 Apr 14, 2024
8133bdc
Merge branch 'master' of https://github.com/AY2324S2-CS2113-T15-4/tp …
Joellimjr Apr 14, 2024
992e7ce
Update PPP
Apr 14, 2024
319278d
Merge branch 'master' of https://github.com/AY2324S2-CS2113-T15-4/tp
Apr 14, 2024
1f5b883
Fix Checkstyle
Apr 14, 2024
71195f9
Add teardown to tests
Apr 14, 2024
09dcebd
Fix junit tests
Apr 14, 2024
32732ad
Merge pull request #200 from HengShuHong/master
HengShuHong Apr 14, 2024
3d94eb5
parsertest
Joellimjr Apr 14, 2024
daa5553
Update md
fxe025 Apr 14, 2024
877bf0e
Add JavaDoc
fxe025 Apr 14, 2024
278b03a
Merge pull request #201 from fxe025/master
fxe025 Apr 14, 2024
42e2882
make change to DG
Apr 14, 2024
7db31fc
Merge branch 'master' of https://github.com/AY2324S2-CS2113-T15-4/tp
Apr 14, 2024
174e677
Merge pull request #202 from Fureimi/master
Fureimi Apr 14, 2024
2e01714
Merge branch 'master' of https://github.com/AY2324S2-CS2113-T15-4/tp
Apr 14, 2024
d28f7ac
Merge branch 'master' of https://github.com/AY2324S2-CS2113-T15-4/tp
Apr 14, 2024
0ecfa0b
parsertest update
Joellimjr Apr 14, 2024
6bb8f0f
Merge branch 'master' of https://github.com/AY2324S2-CS2113-T15-4/tp …
Joellimjr Apr 14, 2024
a373a25
Update DG
LowTL Apr 14, 2024
194439a
Merge branch 'master' of https://github.com/AY2324S2-CS2113-T15-4/tp
LowTL Apr 14, 2024
ec68de6
fix some bug, list_item 2dp for sell and buy price
Apr 14, 2024
90df63e
change to fix test error
Apr 14, 2024
b782534
Merge pull request #203 from Fureimi/week-13-pre-PE-test
Fureimi Apr 14, 2024
e17ec71
lowstock bug fix
Joellimjr Apr 14, 2024
53f1e36
Merge branch 'master' of https://github.com/AY2324S2-CS2113-T15-4/tp …
Joellimjr Apr 14, 2024
6ea4129
Fix bestseller bug
LowTL Apr 14, 2024
ce958b2
Update help messages
Joellimjr Apr 14, 2024
bf287a1
Add TransactionLogsTest
fxe025 Apr 14, 2024
974ac07
Fix addPromotion Command
Apr 14, 2024
f01c1a8
Merge branch 'master' of https://github.com/AY2324S2-CS2113-T15-4/tp
Apr 14, 2024
e95f304
Merge branch 'master' of https://github.com/AY2324S2-CS2113-T15-4/tp
fxe025 Apr 14, 2024
3218d45
Remove unused imports
fxe025 Apr 14, 2024
ac1893d
Merge pull request #204 from fxe025/master
fxe025 Apr 14, 2024
b664cab
ParserTest improved
Joellimjr Apr 14, 2024
5c4d8e9
Checkstyle edit
Joellimjr Apr 14, 2024
33b84ca
Merge branch 'master' of https://github.com/AY2324S2-CS2113-T15-4/tp …
Joellimjr Apr 14, 2024
3c1953a
Merge pull request #205 from Joellimjr/v2.0
Joellimjr Apr 14, 2024
f89d170
Update DG diagram, UG introductions
fxe025 Apr 14, 2024
b9d65e9
Merge pull request #206 from fxe025/master
fxe025 Apr 14, 2024
38cd86f
Parser class diagram
Joellimjr Apr 14, 2024
17b4fd7
Merge branch 'master' of https://github.com/AY2324S2-CS2113-T15-4/tp …
Joellimjr Apr 14, 2024
a957bbc
update UG
Joellimjr Apr 14, 2024
cdd9ea4
Merge pull request #207 from Joellimjr/v2.0
Joellimjr Apr 14, 2024
78d5d10
help, sell and lowstock command tests
Joellimjr Apr 14, 2024
0085989
Edit Find Command
Apr 14, 2024
6914fba
Edit Promotion
Apr 14, 2024
2aba5da
Merge branch 'master' of https://github.com/AY2324S2-CS2113-T15-4/tp
Apr 14, 2024
2d10131
Fix Find junit test
Apr 14, 2024
e28e748
addcommand tests
Joellimjr Apr 14, 2024
d552f59
Merge branch 'master' of https://github.com/AY2324S2-CS2113-T15-4/tp …
Joellimjr Apr 14, 2024
10697b7
checkstyle edits
Joellimjr Apr 14, 2024
105e955
Merge pull request #209 from Joellimjr/v2.0
Joellimjr Apr 14, 2024
9f0a697
Fix Parser Test
Apr 14, 2024
eb59ebf
Merge branch 'master' of https://github.com/AY2324S2-CS2113-T15-4/tp
Apr 14, 2024
de98256
Merge pull request #208 from HengShuHong/master
HengShuHong Apr 14, 2024
06d9a7e
Merge branch 'master' of https://github.com/AY2324S2-CS2113-T15-4/tp …
Joellimjr Apr 14, 2024
cefeb07
Add Junit Test for Find Command
Apr 14, 2024
3222737
Merge branch 'master' of https://github.com/AY2324S2-CS2113-T15-4/tp
Apr 14, 2024
41b8dcd
Merge pull request #210 from HengShuHong/master
HengShuHong Apr 14, 2024
f83d093
PPP update
Joellimjr Apr 15, 2024
76f73c5
Merge branch 'master' of https://github.com/AY2324S2-CS2113-T15-4/tp …
Joellimjr Apr 15, 2024
9785e99
Merge pull request #211 from Joellimjr/v2.0
Joellimjr Apr 15, 2024
10c6d35
Fix merge conflicts
LowTL Apr 15, 2024
a2b40c4
Update EmptyListException
LowTL Apr 15, 2024
19b9da6
Add PUML styling
LowTL Apr 15, 2024
d90f014
Remove unused imports
LowTL Apr 15, 2024
7ecf8b3
Update styling
LowTL Apr 15, 2024
fc27959
Update styling
LowTL Apr 15, 2024
88017f9
Update PUML diagrams
LowTL Apr 15, 2024
220d4a1
Update styling
LowTL Apr 15, 2024
67f28a4
Update DG
LowTL Apr 15, 2024
236bbc7
Merge pull request #212 from LowTL/master
LowTL Apr 15, 2024
5504d2e
Update DG
LowTL Apr 15, 2024
b15c2a4
Merge pull request #213 from LowTL/master
LowTL Apr 15, 2024
11d9815
Merge branch 'master' of https://github.com/AY2324S2-CS2113-T15-4/tp
fxe025 Apr 15, 2024
ad56d09
Merge branch 'master' of https://github.com/AY2324S2-CS2113-T15-4/tp
fxe025 Apr 15, 2024
2d875a5
Merge branch 'master' of https://github.com/AY2324S2-CS2113-T15-4/tp
Apr 15, 2024
bc1ac64
Merge branch 'master' of https://github.com/AY2324S2-CS2113-T15-4/tp
Apr 15, 2024
c5b924c
change messages to match format
Apr 15, 2024
70030f3
Merge branch 'master' of https://github.com/AY2324S2-CS2113-T15-4/tp …
Joellimjr Apr 15, 2024
e5f4965
change DG diagram to match format, change editcommand to catch if new…
Apr 15, 2024
b7ab323
Merge pull request #214 from Fureimi/week-13-final
Fureimi Apr 15, 2024
4ee8040
Merge branch 'master' of https://github.com/AY2324S2-CS2113-T15-4/tp
Apr 15, 2024
88036a8
Fix feature flaw
Apr 15, 2024
a03a871
Merge branch 'master' of https://github.com/AY2324S2-CS2113-T15-4/tp
Apr 15, 2024
1683023
Merge pull request #215 from HengShuHong/master
HengShuHong Apr 15, 2024
adebf26
PPP update and add editcommand test
Joellimjr Apr 15, 2024
a288034
Merge branch 'master' of https://github.com/AY2324S2-CS2113-T15-4/tp …
Joellimjr Apr 15, 2024
a279e5b
Update diagram
fxe025 Apr 15, 2024
b2f8aea
Merge branch 'master' of https://github.com/AY2324S2-CS2113-T15-4/tp
fxe025 Apr 15, 2024
451e6dd
Merge pull request #216 from fxe025/master
fxe025 Apr 15, 2024
f49ab34
PPP update
Joellimjr Apr 15, 2024
f039efd
PPP update
Joellimjr Apr 15, 2024
c6125b1
Merge branch 'master' of https://github.com/AY2324S2-CS2113-T15-4/tp
Apr 15, 2024
6014ac3
no message
Apr 15, 2024
c3a2da8
Merge branch 'master' of https://github.com/AY2324S2-CS2113-T15-4/tp …
Apr 15, 2024
4fcfc49
Checkstyle update
Joellimjr Apr 15, 2024
66aef4f
Merge branch 'master' of https://github.com/AY2324S2-CS2113-T15-4/tp …
Joellimjr Apr 15, 2024
428d41e
change for naming
Apr 15, 2024
2de0bc2
Merge pull request #218 from Joellimjr/v2.0
Joellimjr Apr 15, 2024
8952566
Merge pull request #217 from Fureimi/week-13-pre-PE-test
Fureimi Apr 15, 2024
6be78c0
PPP file name update
Joellimjr Apr 15, 2024
b919e8c
Merge pull request #219 from Joellimjr/v2.0
Joellimjr Apr 15, 2024
d139b55
Update fureimi.md
Fureimi Apr 15, 2024
03a32a6
Merge branch 'master' of https://github.com/AY2324S2-CS2113-T15-4/tp
Apr 15, 2024
0af0b65
Merge branch 'master' of https://github.com/AY2324S2-CS2113-T15-4/tp
fxe025 Apr 15, 2024
2a0436e
Checkstyle Edit
Joellimjr Apr 15, 2024
47f0306
Merge pull request #220 from Joellimjr/v2.0
Joellimjr Apr 15, 2024
1dcd0f8
Merge branch 'master' of https://github.com/AY2324S2-CS2113-T15-4/tp
fxe025 Apr 15, 2024
b26ff83
Change exception messages:
LowTL Apr 15, 2024
327dc0d
Fix merge conflict
LowTL Apr 15, 2024
be27e77
Update fureimi.md
Fureimi Apr 15, 2024
c54ae2c
Update fureimi.md
Fureimi Apr 15, 2024
0840840
Catch ArrayIndexOutOfBoundsException
fxe025 Apr 15, 2024
5cb1e27
Merge pull request #221 from fxe025/master
fxe025 Apr 15, 2024
2b82ec2
Add JunitTest
fxe025 Apr 15, 2024
bdef6c8
Merge branch 'master' of https://github.com/AY2324S2-CS2113-T15-4/tp
Apr 15, 2024
d73f1f3
edit addcommand seq diagram
Joellimjr Apr 15, 2024
59b5622
Merge branch 'master' of https://github.com/AY2324S2-CS2113-T15-4/tp …
Joellimjr Apr 15, 2024
4718547
edit addcommand seq diagram
Joellimjr Apr 15, 2024
ae37ea6
Merge pull request #222 from Joellimjr/v2.0
Joellimjr Apr 15, 2024
2d72115
Update DG and PPP
Apr 15, 2024
9d4caee
Merge branch 'master' of https://github.com/AY2324S2-CS2113-T15-4/tp
Apr 15, 2024
3e3d461
Merge pull request #223 from HengShuHong/master
HengShuHong Apr 15, 2024
5844478
Fix ListCommand bug
LowTL Apr 15, 2024
37f8f94
change DG diagrams
Apr 15, 2024
6a6453f
Merge branch 'master' of https://github.com/AY2324S2-CS2113-T15-4/tp
Apr 15, 2024
67c97c6
Update PPP formatting
Apr 15, 2024
94ae2dd
Merge branch 'master' of https://github.com/AY2324S2-CS2113-T15-4/tp
Apr 15, 2024
26bd145
Update diagram
fxe025 Apr 15, 2024
f36ca68
Remove unused import
LowTL Apr 15, 2024
0c4fe17
Merge pull request #225 from Fureimi/master
Fureimi Apr 15, 2024
2512105
Fix test
LowTL Apr 15, 2024
032a5fc
Merge branch 'master' of https://github.com/AY2324S2-CS2113-T15-4/tp
Apr 15, 2024
81cbe8b
Merge branch 'master' of https://github.com/AY2324S2-CS2113-T15-4/tp
LowTL Apr 15, 2024
e34c4c8
Merge pull request #226 from HengShuHong/master
HengShuHong Apr 15, 2024
842a9b3
Merge branch 'master' of https://github.com/AY2324S2-CS2113-T15-4/tp
LowTL Apr 15, 2024
0daa502
Merge branch 'master' of https://github.com/AY2324S2-CS2113-T15-4/tp
fxe025 Apr 15, 2024
314d23f
Remove excess test
LowTL Apr 15, 2024
11a052a
Fix checkstyle
fxe025 Apr 15, 2024
2674260
Update PPP
Apr 15, 2024
9fc25e7
Merge branch 'master' of https://github.com/AY2324S2-CS2113-T15-4/tp
Apr 15, 2024
cfd1a86
Fix import
fxe025 Apr 15, 2024
0f4ce44
Change PPP wording
LowTL Apr 15, 2024
9730867
Merge pull request #227 from fxe025/master
fxe025 Apr 15, 2024
515990a
Fix PPP Styling
LowTL Apr 15, 2024
f44550e
Merge branch 'master' of https://github.com/AY2324S2-CS2113-T15-4/tp
LowTL Apr 15, 2024
75adf1f
Merge pull request #224 from LowTL/master
LowTL Apr 15, 2024
1da147b
Merge branch 'master' of https://github.com/AY2324S2-CS2113-T15-4/tp
Apr 15, 2024
416cc83
Fix DG wording
LowTL Apr 15, 2024
5ed4e86
Merge pull request #228 from HengShuHong/master
HengShuHong Apr 15, 2024
3d1b5b1
Merge branch 'master' of https://github.com/AY2324S2-CS2113-T15-4/tp
LowTL Apr 15, 2024
506e453
Merge pull request #229 from LowTL/master
LowTL Apr 15, 2024
a68914e
Change UG and DG wording
LowTL Apr 15, 2024
b346489
Update DG to link to repo
LowTL Apr 15, 2024
598dc37
Merge pull request #230 from LowTL/master
LowTL Apr 15, 2024
b32453c
Update UG
LowTL Apr 15, 2024
163d19e
Update DG
LowTL Apr 15, 2024
5e301f4
Merge pull request #231 from LowTL/master
LowTL Apr 15, 2024
0f7fb46
Update JAR link
LowTL Apr 15, 2024
6b8d3d5
Merge pull request #232 from LowTL/master
LowTL Apr 15, 2024
4e82f9f
Update UserGuide.md
LowTL Apr 15, 2024
53c817f
Merge pull request #233 from AY2324S2-CS2113-T15-4/UG-syntax
LowTL Apr 15, 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: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Duke project template
# Stock Master

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 Expand Up @@ -35,11 +35,11 @@ Prerequisites: JDK 11 (use the exact version), update Intellij to the most recen

### I/O redirection tests

* To run _I/O redirection_ tests (aka _Text UI tests_), navigate to the `text-ui-test` and run the `runtest(.bat/.sh)` script.
* To run _I/O redirection_ tests (aka _Text UI tests_), navigate to the `text-ui-itemlist` and run the `runtest(.bat/.sh)` script.

### JUnit tests

* A skeleton JUnit test (`src/test/java/seedu/duke/DukeTest.java`) is provided with this project template.
* A skeleton JUnit itemlist (`src/itemlist/java/seedu/duke/DukeTest.java`) is provided with this project template.
* If you are new to JUnit, refer to the [JUnit Tutorial at se-education.org/guides](https://se-education.org/guides/tutorials/junit.html).

## Checkstyle
Expand Down
4 changes: 4 additions & 0 deletions StockMasterData.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
1. | apple iphone | Qty: 10 pieces | Cat: electronics | BuyPrice: $100.0 | SellPrice: $500.0
2. | apple | Qty: 180 pieces | Cat: fruits | BuyPrice: $4.0 | SellPrice: $5.0
3. | orange | Qty: 0 pieces | Cat: fruits | BuyPrice: $2.0 | SellPrice: $4.0
4. | samsung phone | Qty: 3 pieces | Cat: electronics | BuyPrice: $80.0 | SellPrice: $300.0
8 changes: 8 additions & 0 deletions TransactionLogs.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Date: 2024-04-01 21:32:44
Transaction ID: 1
Item Name: apple
Quantity: 5
Unit Price: 3.0
Total Price: 15.0
Profit: -5.0

3 changes: 2 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,5 @@ checkstyle {

run{
standardInput = System.in
}
enableAssertions = true
}
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) | Low Tjun Lym | [Github](https://github.com/LowTL) | [Portfolio](docs/team/johndoe.md)
![](https://via.placeholder.com/100.png?text=Photo) | Fu Xueer | [Github](https://github.com/fxe025) | [Portfolio](docs/team/johndoe.md)
![](https://via.placeholder.com/100.png?text=Photo) | Heng Shu Hong | [Github](https://github.com/HengShuHong) | [Portfolio](docs/team/johndoe.md)
![](https://via.placeholder.com/100.png?text=Photo) | Joel Lim | [Github](https://github.com/joellimjr) | [Portfolio](docs/team/johndoe.md)
![](https://via.placeholder.com/100.png?text=Photo) | Min Guanlin | [Github](https://github.com/Fureimi) | [Portfolio](docs/team/johndoe.md)
50 changes: 43 additions & 7 deletions docs/DeveloperGuide.md
Copy link

Choose a reason for hiding this comment

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

I think you can add more visuals to aid in explaining your design and implementation

Copy link

Choose a reason for hiding this comment

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

The document looks neat!

Copy link

Choose a reason for hiding this comment

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

Do consider adding in more visuals (sequence diagrams, class diagrams, etc.) for explanatory purposes.

Choose a reason for hiding this comment

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

maybe the diagram is a bit small

Original file line number Diff line number Diff line change
Expand Up @@ -7,31 +7,67 @@
## Design & implementation

{Describe the design and implementation of the product. Use UML diagrams and short code snippets where applicable.}
### Exception

Choose a reason for hiding this comment

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

I think you could elaborate more on how your exception works

### Itemlist
Itemlist class is an object which contains items to be added to the stock inventory list. Able to add items, remove functions, edit items inside
Copy link

Choose a reason for hiding this comment

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

Seems like you meant to say remove items instead of remove functions.

the list.
### Item
Item class is an object which represents an item in the stock inventory list. Stores data about the item such as item price,
quantity of item, and others.
### Parser
Parser class processes user inputs and sieves out relevant details before calling the relevant methods.
It contains command formats that must be adhered to for the methods to be called.
### Storage
Storage class contains methods to write description of items to the file `./StockMasterData.txt`,
and retrieve information from the file when program restarts.
### UI
Copy link

Choose a reason for hiding this comment

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

I think your UI and Exception class is missing a description


Copy link

Choose a reason for hiding this comment

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

I think you can add some description regarding your implementation for the functionalities


## Product scope
StockMaster allows users to use the following commands:
* add: add an item, quantity, category, buy price and sell price
* del: delete an item
* edit: edit the quantity of an item
* sell: sell a certain quantity of an item at a stated price
* find: find a specific item using a keyword
* list: list all items in the inventory
* help: list all commands
* exit: exit StockMaster

Copy link

Choose a reason for hiding this comment

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

Hopefully, you can explain what the contents of each methods are and how the methods communicate with each related methods. This DG is to teach an interested developer how to contribute to the codebase.

### Target user profile

{Describe the target user profile}
Small Business Owners who:
* has a need to manage a significant number of inventory products
* able to track revenue/loss of the business
* prefer desktop apps over other types
* can type fast
* prefers typing to mouse interactions
* is reasonably comfortable using CLI apps
Copy link

Choose a reason for hiding this comment

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

Target users are clearly defined. Good job!


### Value proposition

{Describe the value proposition: what problem does it solve?}
Help small business owners organise and better manage their inventory faster than
a typical mouse/GUI driven app


## 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|
|v2.0|user|find a to-do item by name|locate a to-do without having to go through the entire list|
|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 |
|v1.0|user| add new items | |
|v1.0|user| make changes to added items | change details about items such as quantity or price |
|v1.0|user| search for specific items ||
|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

{Give non-functional requirements}

## Glossary

* *glossary item* - Definition
* *CLI* - Command Line Interface, where the user types commands rather than clicking options.
* *Item* - Item to be sold at the shop, with key information such as quantity, buying/selling price, description etc.

## Instructions for manual testing

Expand Down
4 changes: 2 additions & 2 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Duke
# Stock Master

{Give product intro here}
StockMaster helps small business owners manage inventory of their business. It is optimized for CLI users so that frequent tasks can be done faster by typing in commands.

Useful links:
* [User Guide](UserGuide.md)
Expand Down
115 changes: 102 additions & 13 deletions docs/UserGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,41 +2,130 @@

## Introduction

{Give a product intro}
StockMaster is a platform aimed at helping SMEs track and organise their inventory.

## 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 `StockMaster` from [here](http://link.to/duke).
3.

## Features

{Give detailed description of each feature}

### Adding a todo: `todo`
Adds a new item to the list of todo items.
### Adding an item: `add`
Adds a new item to the list of items.

Format: `todo n/TODO_NAME d/DEADLINE`
Format: `add ITEM_NAME qty/ITEM_QUANTITY /UNIT_OF_MEASUREMENT [cat/CATEGORY] buy/[BUY_PRICE] sell/[SELL_PRICE]`

* The `DEADLINE` can be in a natural language format.
* The `TODO_NAME` cannot contain punctuation.
* `CATEGORY` is an optional field. If blank, it will default to `N/A`.

> [ !NOTE ]
>
> Addition of an item with the same `ITEM_NAME` will edit the `ITEM_QUANTITY` instead

Example of usage:
```
add Apple qty/50 /pieces cat/fruits buy/4 sell/5
add Phone qty/5 /pieces cat/Electronics buy/100 sell/500
```

### Deleting an item: `del`
Deletes the item from the list of items.

Format: `del ITEM_NAME`

Example of usage:
```
del Apples
```

### Editing an item: `edit`
Edits the parameters of the item.

Format: `edit [ITEM_NAME] name/[NEW_NAME] qty/[NEW_QUANTITY] uom/[NEW_UOM] cat/[NEW_CATEGORY] buy/[NEW_BUY_PRICE] sell/[NEW_SELL_PRICE]`<br/>`

Example of usage:
```
`edit apple name/green apple qty/10 uom/pieces cat/fruit buy/1.00 sell/2.00`
`edit fish name/Salmon qty/1 uom/pieces cat/fish device buy/1.00 sell/10.00`
```
User can choose to edit at least 1 parameter up to all available parameters.

Example of usage:
```
edit apple buy/1.00 sell/2.00
edit fish name/Salmon qty/1 cat/fish
```

### Finding an item: `find`
Finds all items that contains `KEYWORD`

Format: `find [/filter1/filter2] KEYWORD`

* Filter will specify the parameters that is being searched.
* If no filter is applied, it will search all items that contains `KEYWORD.
* The search is case-insensitive e.g. `apple` will match `Apple`.
* Partial words will be matched e.g. `app` will match `Apple`.

`todo n/Write the rest of the User Guide d/next week`
Example of usage:
```
find /qty/cat Apple //search for `Apple` under `ITEM_QUANTITY` and `CATEGORY`
find Apple //search all items that contains `Apple`
```

`todo n/Refactor the User Guide to remove passive voice d/13/04/2020`
### Listing all items: `list`
Lists all stored items.

Format: `list [cat/CATEGORY]`

* `CATEGORY` is an optional field. By default, it will list all the stored items.

Example of usage:
```
list
list Electronics
```

### List all available commands: `help`
Lists all commands as per the command summary below.

Format: `help [c/COMMAND]`

* `COMMAND` is optional. Specifying the command will give a more comprehensive
description of the command.

Example of usage:
```
help
help c/add
```


### Closing the app: `exit`
Saves and closes the app safely.

Format: `exit`

## FAQ

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

**A**: {your answer here}
**A**: Simply copy and paste the saved folder that is created upon launch of
the application.

## Command Summary

{Give a 'cheat sheet' of commands here}

* Add todo `todo n/TODO_NAME d/DEADLINE`
| Action | Format, Examples |
|-------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Add Item | `add ITEM_NAME qty/ITEM_QUANTITY /UNIT_OF_MEASUREMENT [cat/CATEGORY] buy/[BUY_PRICE] sell/[SELL_PRICE]`<br/> `e.g. add apple qty/50 /pieces cat/fruits buy/4.50 sell/5` |
| Delete Item | `del ITEM_NAME`<br/> `e.g. del Apple` |
| Edit Item | `edit [ITEM_NAME] name/[NEW_NAME] qty/[NEW_QUANTITY] uom/[NEW_UOM] cat/[NEW_CATEGORY] buy/[NEW_BUY_PRICE] sell/[NEW_SELL_PRICE]`<br/>`e.g. edit apple name/green apple qty/10 uom/pieces cat/fruit buy/1.00 sell/2.00` |
| Find Item | `find KEYWORD`<br/> `e.g. find University` |
| Sell Item | `sell [ITEM_NAME] qty/[SELL_QUANTITY] price/[SELL_PRICE]`<br/> `e.g. sell apple qty/50 price/4.50` |
| List | `list` |
| Help | `help` |
| Exit | `exit` |
79 changes: 79 additions & 0 deletions src/main/java/command/AddCommand.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
package command;

import item.Item;
import itemlist.Itemlist;
import storage.Storage;

public class AddCommand extends Command {

public static final String MESSAGE_SUCCESS = "added: ";
protected String itemName;
protected int quantity;
protected String uom;
protected String category;
protected float buyPrice;
protected float sellPrice;
private final Item toAdd;

public AddCommand(String itemName, int quantity, String uom, String category, float buyPrice, float sellPrice) {
this.itemName = itemName;
this.quantity = quantity;
this.uom = uom;
this.category = category;
this.buyPrice = buyPrice;
this.sellPrice = sellPrice;
this.toAdd = new Item(itemName, quantity, uom, category, buyPrice, sellPrice);
}

public String getItemName() {
return itemName;
}
public int getQuantity() {
return quantity;
}
public String getCategory() {
return category;
}
public String getUom() {
return uom;
}
public float getBuyPrice() {
return buyPrice;
}
public float getSellPrice() {
return sellPrice;
}

@Override
public void execute() {
if (Itemlist.itemIsExist(itemName)) {
updateQuantity(itemName);
} else {
Itemlist.addItem(toAdd);
System.out.print(MESSAGE_SUCCESS + getItemName() + " (Qty: " + getQuantity() + " " + getUom() +
", Buy: $" + getBuyPrice() + ", Sell: $" + getSellPrice() + ")");
Storage.addToFile(Itemlist.getItems());
if (!category.equals("NA")) {
System.out.println(" to " + getCategory());
} else {
System.out.println();
assert category.equals("NA");
}
}
}

public void updateQuantity(String itemName) {
System.out.println("Item already exists and quantity has been changed");
int indexOfItem = -1;
for (Item item : Itemlist.getItems()) {
if (item.getItemName().toLowerCase().equals(itemName)) {
indexOfItem = Itemlist.getIndex(item);
}
}
assert indexOfItem != -1;
int currentQty = Itemlist.getItem(indexOfItem).getQuantity();
int newQty = getQuantity() + currentQty;
new EditCommand(getItemName(), "NA", newQty, "NA", "NA", -1,
-1).execute();
}
}
8 changes: 8 additions & 0 deletions src/main/java/command/Command.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package command;

import exceptions.CommandFormatException;

public abstract class Command {

public abstract void execute() throws CommandFormatException;
}
Loading
Loading