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] Clanki #36

Open
wants to merge 260 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 172 commits
Commits
Show all changes
260 commits
Select commit Hold shift + click to select a range
f57dc6a
Add exceptions for add function
Mar 6, 2023
4f414df
Add abstract command object
Mar 6, 2023
ce98df6
Add command objects for adding a new flashcard
Mar 6, 2023
e3392d6
Implement basic structure for the whole application
Mar 6, 2023
4be87ab
Update Flashcard.java to better follow OOP standard
Mar 6, 2023
76e7e22
Add unit testing codes for current functions
Mar 6, 2023
46b2a6d
Update files to meet the requirements of CheckStyle
Mar 6, 2023
c424ff6
Merge pull request #4 from SongZijin/add-new-flashcard
SongZijin Mar 6, 2023
ff66f53
Update Dehao profile picture in aboutus
kdh3799 Mar 9, 2023
4abae40
Merge pull request #5 from kdh3799/master
kdh3799 Mar 9, 2023
1016b94
Added entry in AboutUs.md and edited personal portfolio
moseslee-9012 Mar 9, 2023
1bc91e2
Merge branch 'AY2223S2-CS2113-T15-4:master' into master
moseslee9012 Mar 9, 2023
7f76746
Reformat all Java source files according to style guide
joulev Mar 9, 2023
28a0d8f
Set up Clanki for use with Gradle
joulev Mar 9, 2023
9ddf52a
Update text-ui-test
joulev Mar 9, 2023
2c7a17d
Merge pull request #18 from moseslee9012/master
joulev Mar 9, 2023
7bea748
Merge pull request #15 from joulev/reformat
joulev Mar 9, 2023
89e6bf8
Merge branch 'master' into set-up-com-clanki
joulev Mar 9, 2023
184c16d
Merge pull request #17 from joulev/set-up-com-clanki
joulev Mar 9, 2023
6e9693f
Restructuring
joulev Mar 9, 2023
be7d316
Implement additional properties and methods of the Flashcard class
joulev Mar 9, 2023
917c263
Add some tests and refine due date formula
joulev Mar 9, 2023
1718e24
Remove redundant import
joulev Mar 9, 2023
1442aac
Merge pull request #19 from joulev/flashcard-class
joulev Mar 10, 2023
3971e98
Implement ByeCommand and infinite loop until 'bye'
joulev Mar 10, 2023
52e43cf
Restore AddCommand.toString()
joulev Mar 10, 2023
936a878
Add tests
joulev Mar 10, 2023
6625332
Make SPACED_REPETITION_FACTOR a static constant
joulev Mar 10, 2023
5ad6e32
Merge pull request #22 from joulev/loop-for-input-until-bye
joulev Mar 11, 2023
48b6d83
Merge pull request #24 from joulev/fix-checkstyle-warning
joulev Mar 11, 2023
178ec6a
Update parser to resolve bug
Mar 11, 2023
40ef176
Include the new feature in unit testing
Mar 11, 2023
3cdea4d
Merge pull request #25 from SongZijin/20-addCommand-bug
joulev Mar 11, 2023
58a5fdd
Added DeleteCommand class, added deleteFlashcard method in FlashcardList
moseslee-9012 Mar 11, 2023
371e7a6
Implemented delete function
moseslee-9012 Mar 11, 2023
7397259
Add a class to systematically parse any input to command and options
joulev Mar 11, 2023
f81b835
Make all parser methods static
joulev Mar 11, 2023
2a390f1
Refactor parser logic to make use of ParsedInput
joulev Mar 11, 2023
cfefde2
Add missing r's to ParserTest tests
joulev Mar 11, 2023
95dd3ef
Add unit tests for ParsedInput
joulev Mar 11, 2023
510d38d
Added Javienne Yeo to AboutUs
javienneyeo Mar 12, 2023
e3d91a8
Merge branch 'master' into master
javienneyeo Mar 12, 2023
4f70717
Merge pull request #28 from javienneyeo/master
joulev Mar 12, 2023
75bdc0d
Update AboutUs.md
joulev Mar 12, 2023
bc3a284
Merge branch 'AY2223S2-CS2113-T15-4:master' into master
moseslee9012 Mar 12, 2023
74717dd
Add function of reviewing flashcards
kdh3799 Mar 12, 2023
e70d563
Reformatted files
kdh3799 Mar 12, 2023
5b4d680
Reformat again for code style
kdh3799 Mar 12, 2023
031c85e
reformat parser import for code style
kdh3799 Mar 12, 2023
cf7bedd
Reformat parser javadoc indent for code style
kdh3799 Mar 12, 2023
b900a0c
Add Junit test in ParserTest for reviewCommand
kdh3799 Mar 12, 2023
1b5bc89
Reformat import for ParserTest for code style
kdh3799 Mar 12, 2023
ba6bb47
Add text-ui-test for reviewCommand, bugs present
kdh3799 Mar 12, 2023
6156397
Modify ReviewCommand to trim space at the end of sout to pass text ui…
kdh3799 Mar 13, 2023
4352a08
Modify according to PR comments
kdh3799 Mar 13, 2023
4935709
Reformat for code style
kdh3799 Mar 13, 2023
ead5e34
Merge pull request #30 from kdh3799/review_card_1.0
kdh3799 Mar 13, 2023
2ded8a3
Merge branch 'master' into better-parser
joulev Mar 13, 2023
f711d4b
Added function to update flashcards
javienneyeo Mar 13, 2023
eeb1fda
changed import *
javienneyeo Mar 13, 2023
23f46a6
Added imports
javienneyeo Mar 13, 2023
d42e8d3
Merge pull request #29 from joulev/resize-about-us-pictures
joulev Mar 13, 2023
d2a2c94
Add text-ui-test for UpdateCommand
javienneyeo Mar 13, 2023
3cdbfc1
Merge remote-tracking branch 'upstream/master'
moseslee-9012 Mar 13, 2023
17bd74c
Add Junit test for updateCommand
javienneyeo Mar 13, 2023
6eed601
Fixed error
javienneyeo Mar 13, 2023
f41b5da
Added query after update in ParserTest
javienneyeo Mar 13, 2023
ff5a9ca
Removed getInput method
javienneyeo Mar 13, 2023
108670f
Corrected wrong comment format in Parser class
moseslee-9012 Mar 13, 2023
92f02b7
Merge pull request #32 from moseslee9012/master
joulev Mar 13, 2023
0682497
Removed unused import
javienneyeo Mar 14, 2023
8c2e0a9
Changed EXPECTED.TXT file
javienneyeo Mar 14, 2023
1992ca0
Removed unused import statement
javienneyeo Mar 14, 2023
4f02bab
Added new line at the end of EXPECTED.TXT
javienneyeo Mar 14, 2023
7cf48b8
Removed trailing spaces at the end of printed line
javienneyeo Mar 14, 2023
cb437c5
Merge pull request #31 from javienneyeo/editflashcard
joulev Mar 14, 2023
c51c557
Include a welcome message that will be printed when starting
Mar 14, 2023
5e7f642
Merge pull request #34 from SongZijin/welcome-message
joulev Mar 14, 2023
c06efc7
Merge branch 'master' into better-parser
joulev Mar 16, 2023
bc94509
Configure other commands to use the new parser
joulev Mar 16, 2023
3088158
Merge pull request #27 from joulev/better-parser
joulev Mar 16, 2023
cd1f068
Enable assertions during run task
joulev Mar 16, 2023
912057e
Merge pull request #36 from joulev/enable-assertion
joulev Mar 16, 2023
8eb1798
Include some assertion for AddCommand and Parser
Mar 16, 2023
f083109
Update code to follow check style rules
Mar 16, 2023
7a8c683
Merge pull request #37 from SongZijin/addCommand-assertions
SongZijin Mar 16, 2023
3fe66fd
Update code to include logging inside code
Mar 16, 2023
7b19e13
Merge pull request #38 from SongZijin/addCommand-assertions
SongZijin Mar 16, 2023
a4ef384
Update output after add command to follow requirment
Mar 20, 2023
5ae846c
Update relevant files to automatically capitalise first letter
Mar 20, 2023
f6c848e
Update DeveloperGuide.md to include descriptions about add flashcard …
Mar 20, 2023
c516fed
Add encoder to convert FlashcardList to storable format
Mar 20, 2023
68e17b9
Add decoder and relevant exceptions
Mar 20, 2023
13357d8
Add a new StorageFile class
Mar 20, 2023
97c456f
Implement the save and load system in a very simple way
Mar 20, 2023
2800fc9
Update encoder and decoder to fix bug
Mar 20, 2023
ead8d0d
Update files to follow checkStyle requirements
Mar 20, 2023
8227ea0
Add JUnit tests for the encoder and decoder
Mar 20, 2023
fb17c1c
Update file for checkstyle requirements
Mar 20, 2023
4a23dc2
Merge pull request #46 from SongZijin/add-storage-system
SongZijin Mar 20, 2023
b001a2d
Implemented delete by query
moseslee-9012 Mar 22, 2023
8fb4ee6
Update to include JUnit test for capitalisation
Mar 22, 2023
120206d
Merge pull request #44 from SongZijin/update-input-output-format
SongZijin Mar 23, 2023
3af44d9
Removed flashcardList.txt file
moseslee-9012 Mar 23, 2023
b8c9c66
Merge remote-tracking branch 'upstream/master' into changes
moseslee-9012 Mar 23, 2023
482fcbb
Add user guide from the gist
joulev Mar 23, 2023
8216aec
Merge pull request #49 from joulev/add-user-guide
SongZijin Mar 23, 2023
5d2e7ca
Merge branch 'AY2223S2-CS2113-T15-4:master' into master
moseslee9012 Mar 23, 2023
1e6ec2f
added flashcardList.txt to gitignore
moseslee-9012 Mar 24, 2023
04d8752
Revert "Removed flashcardList.txt file"
moseslee-9012 Mar 24, 2023
e966c86
Merge branch 'master' of https://github.com/moseslee9012/tp into changes
moseslee-9012 Mar 24, 2023
911231e
Merge branch 'master' of https://github.com/moseslee9012/tp
moseslee-9012 Mar 24, 2023
138c05a
Added developer's guide for DeleteCommand.
moseslee-9012 Mar 24, 2023
30e31ad
Added test for successful DeleteCommand
moseslee-9012 Mar 24, 2023
e9da01d
Update decoder to automatically delete stored data of incorrect format
Mar 25, 2023
686a791
Update UserGuide.md to include how to exit the program
Mar 25, 2023
78a1988
Remove test that is no longer valid
Mar 25, 2023
7ee819e
Update code to follow checkstyle requirements
Mar 25, 2023
fc574d7
Merge pull request #51 from SongZijin/enhance-storage-system
SongZijin Mar 25, 2023
fccc1e4
Removed flashcardList.txt
moseslee-9012 Mar 26, 2023
227b6ce
Merge pull request #47 from moseslee9012/master
joulev Mar 26, 2023
821f1bc
Added update flashcard in developer guide
javienneyeo Mar 27, 2023
eae0421
Merge pull request #52 from javienneyeo/update-developer-guide
joulev Mar 27, 2023
a429c8c
Handle exceptions in update command
javienneyeo Mar 27, 2023
53a41a9
Added exceptions in update command
javienneyeo Mar 27, 2023
e068e4d
Added newline in NoQueryInInputException class
javienneyeo Mar 27, 2023
373cbfb
Added uml diagram for DeleteFlashcard in DG
moseslee-9012 Mar 27, 2023
7813aba
Merge branch 'AY2223S2-CS2113-T15-4:master' into master
moseslee9012 Mar 28, 2023
bb7f305
Improved review command
joulev Mar 28, 2023
1a9f86d
Merge pull request #54 from moseslee9012/master
joulev Mar 28, 2023
543770d
Update EXPECTED.txt
joulev Mar 28, 2023
4aadf9d
Changed update command of user guide
javienneyeo Mar 28, 2023
c91b1cf
Add developer guide on parsers
joulev Mar 28, 2023
f14a2d3
Added exceptions to deal with incorrect user input format
javienneyeo Mar 28, 2023
753fcc4
Shift line down
javienneyeo Mar 28, 2023
1e10df6
Reduce length of sentence
javienneyeo Mar 28, 2023
b7a656e
Added exceptions to deal with incorrect user input
javienneyeo Mar 28, 2023
bd591f7
Added change date functionality for update command
javienneyeo Mar 28, 2023
4a7b9dd
Handle wrong date format from user input
javienneyeo Mar 28, 2023
d1ff26f
Changed expected.txt
javienneyeo Mar 28, 2023
9c4f63d
Updated the user guide for update command
javienneyeo Mar 28, 2023
a5a3955
Changed update command
javienneyeo Mar 28, 2023
1256f77
Merge pull request #53 from javienneyeo/update-command-branch
SongZijin Mar 28, 2023
42c8a40
Merge pull request #56 from joulev/dev-guide
SongZijin Mar 28, 2023
4352460
Merge branch 'master' into improve-review
joulev Mar 28, 2023
02c4a58
Update text-ui-test
joulev Mar 28, 2023
8d8e4fd
Add query by date
javienneyeo Mar 29, 2023
d272e25
Added diagram for update command
javienneyeo Mar 29, 2023
0c0da07
Change date
javienneyeo Mar 29, 2023
a290aa3
Merge pull request #55 from joulev/improve-review
joulev Mar 29, 2023
794637c
Add ReviewFlashcard to DeveloperGuide
kdh3799 Mar 29, 2023
79684a0
Merge remote-tracking branch 'upstream/master' into Developer_guide_r…
kdh3799 Mar 29, 2023
c78be53
Add flashcardlist.txt to gitignore
kdh3799 Mar 29, 2023
51f2f60
Edit EXPECTED.TXT
kdh3799 Mar 29, 2023
1200345
Merge branch 'master' into edit-update-command
javienneyeo Mar 29, 2023
c4d0682
Merge pull request #58 from kdh3799/Developer_guide_reviewcard
SongZijin Mar 29, 2023
885f279
Merge branch 'master' into edit-update-command
javienneyeo Mar 29, 2023
5279276
Changed expected
javienneyeo Mar 29, 2023
25a73f3
Merge branch 'edit-update-command' of https://github.com/javienneyeo/…
javienneyeo Mar 29, 2023
06ed210
Edit DeveloperGuide to fit to latest version of reviewflashcard
kdh3799 Mar 29, 2023
9d97a44
Changed test
javienneyeo Mar 29, 2023
4129797
Merge pull request #59 from kdh3799/Developer_guide_reviewcard
joulev Mar 29, 2023
6088225
Merge pull request #57 from javienneyeo/edit-update-command
joulev Mar 29, 2023
91e8902
Merge remote-tracking branch 'upstream/master'
kdh3799 Mar 29, 2023
c36f21f
Update user guide with more clarifications
joulev Apr 1, 2023
a93a071
Merge pull request #118 from joulev/fix-stuff
joulev Apr 1, 2023
105da85
Detect wrong y/n in review answer
joulev Apr 1, 2023
fd7b5f5
Fix wrong EXPECTED.txt
joulev Apr 1, 2023
e41fd43
Merge pull request #119 from joulev/detect-wrong-y-n-review
joulev Apr 1, 2023
356f7f1
Reformatted command for "delete" function
moseslee-9012 Apr 3, 2023
c96e4d3
Merge branch 'AY2223S2-CS2113-T15-4:master' into master
moseslee9012 Apr 3, 2023
197c766
Merge remote-tracking branch 'upstream/master'
moseslee-9012 Apr 3, 2023
26f0ead
Merge branch 'master' of https://github.com/moseslee9012/tp
moseslee-9012 Apr 3, 2023
185c3da
Updated ParserTest for delete command
moseslee-9012 Apr 3, 2023
dd8b8c8
Remove magic strings in storage related codes
Apr 3, 2023
5a3500d
Removed logging, fix issue of error message appearing twice
Apr 3, 2023
c29bff3
Add help command and update display to look nicer
Apr 3, 2023
987f71b
Change UserGuide to fit the latest version
Apr 3, 2023
ba99402
Update DeveloperGuide to include class diagram for AddCommand
Apr 3, 2023
647ce66
Add PPP for SongZijin
Apr 3, 2023
c6d1eb0
Update expected text for auto testing
Apr 3, 2023
218216f
Merge pull request #126 from SongZijin/fix-zijin-code-after-feedback
SongZijin Apr 3, 2023
0ee4be1
Changed code to solve bugs
javienneyeo Apr 3, 2023
b44c505
Remove print date when updating flashcard
javienneyeo Apr 3, 2023
ef081f3
Changed code to increase readibility
javienneyeo Apr 3, 2023
839f53d
Changed expected file
javienneyeo Apr 4, 2023
d554883
Shortened code line
javienneyeo Apr 4, 2023
b1c6e6b
Update code
javienneyeo Apr 4, 2023
0f1d16e
Solved error in test.sh
javienneyeo Apr 4, 2023
d689041
Changed syntax
javienneyeo Apr 4, 2023
24cad58
Merge branch 'AY2223S2-CS2113-T15-4:master' into master
moseslee9012 Apr 5, 2023
8db7480
Merge remote-tracking branch 'upstream/master'
moseslee-9012 Apr 5, 2023
e42ea85
changed to EXPECTED-UNIX.TXT under runtest.bat
moseslee-9012 Apr 5, 2023
b94fc13
Merge remote-tracking branch 'origin/master'
moseslee-9012 Apr 5, 2023
b1a65bd
Merge branch 'test_branch'
moseslee-9012 Apr 5, 2023
050bda0
undo EXPECTED-UNIX.TXT to EXPECTED.TXT
moseslee-9012 Apr 5, 2023
ae011c9
Merge remote-tracking branch 'upstream/master'
kdh3799 Apr 5, 2023
e7329d0
Added Junit tests
javienneyeo Apr 6, 2023
36205e5
Added List command
javienneyeo Apr 6, 2023
73c5f97
Updated user guide to include list
javienneyeo Apr 6, 2023
5a3808a
Added clear command
javienneyeo Apr 6, 2023
8c6d776
Changed user guide
javienneyeo Apr 6, 2023
efbe6c8
Reduced length of code
javienneyeo Apr 6, 2023
39e9ea3
Merge pull request #127 from javienneyeo/update-branch
SongZijin Apr 6, 2023
a9c2c60
Merge remote-tracking branch 'upstream/master'
kdh3799 Apr 6, 2023
7aef4c8
Added EXPECTED.TXT file
moseslee-9012 Apr 6, 2023
1c7f022
Adjusted EXPECTED.TXT to match ACTUAL.TXT
moseslee-9012 Apr 6, 2023
d136604
Removed dos2unix (line 14) under runtest.sh
moseslee-9012 Apr 6, 2023
03ff90a
Merge branch 'master' into master
moseslee9012 Apr 6, 2023
af1a92f
Merge branch 'master' of https://github.com/AY2223S2-CS2113-T15-4/tp
moseslee-9012 Apr 6, 2023
766ae45
Merge branch 'master' of https://github.com/moseslee9012/tp
moseslee-9012 Apr 6, 2023
394999f
Add table of content to DG
kdh3799 Apr 6, 2023
aa2c680
Merge pull request #128 from kdh3799/DG_TOC
joulev Apr 6, 2023
fdf21f8
Updated list command
javienneyeo Apr 6, 2023
d72efc9
Update user guide
javienneyeo Apr 6, 2023
4182522
Merge pull request #125 from moseslee9012/master
SongZijin Apr 6, 2023
e646366
Changed user guide
javienneyeo Apr 6, 2023
b904fbd
Changed printing of flashcards in list
javienneyeo Apr 6, 2023
e4653e1
Added ppp
javienneyeo Apr 7, 2023
2eabdc3
Merge pull request #129 from javienneyeo/update-branch
SongZijin Apr 7, 2023
9e9e84e
Updated DG and Moses' PPP
moseslee-9012 Apr 8, 2023
a8b73a5
Merge remote-tracking branch 'upstream/master'
moseslee-9012 Apr 8, 2023
e8fe942
Refined delete function to catch null flashcards found
moseslee-9012 Apr 8, 2023
5d13cf3
Refined and reformatted PPP
moseslee-9012 Apr 8, 2023
257c1be
Updated AboutUs.md for Moses' portfolio
moseslee-9012 Apr 8, 2023
6d2df8f
Merge pull request #130 from moseslee9012/master
joulev Apr 8, 2023
2b4c5dc
Added documentation to relevant methods
moseslee-9012 Apr 8, 2023
21520df
Merge branch 'master' of https://github.com/moseslee9012/tp into changes
moseslee-9012 Apr 8, 2023
afe5b44
Merge pull request #131 from moseslee9012/master
SongZijin Apr 8, 2023
d52631f
Update code to include more documentation
Apr 9, 2023
3dc7c17
Update DeveloperGuide with descriptions on storage
Apr 9, 2023
ad7e339
Update other documents to reflect some change
Apr 9, 2023
3057025
Merge pull request #132 from SongZijin/add-more-documentation
SongZijin Apr 9, 2023
932672d
Fix tons of stuff
joulev Apr 9, 2023
07def8e
Fix wrong expected.txt
joulev Apr 9, 2023
4eb31d3
Merge pull request #133 from joulev/fix-stuff
joulev Apr 9, 2023
7f1666f
Fix massive Zijin's face in About Us
joulev Apr 9, 2023
6ed549b
Add Dung's PPP
joulev Apr 9, 2023
7f9b3d9
Merge pull request #134 from joulev/joulev-documents
joulev Apr 9, 2023
d12c27d
Updated DG and matched outputs to UG
moseslee-9012 Apr 10, 2023
d3fa058
Added documentation
javienneyeo Apr 10, 2023
699673e
Merge pull request #137 from javienneyeo/documentation
joulev Apr 10, 2023
ca99a01
Reverted changes in Ui
moseslee-9012 Apr 10, 2023
0daaae7
Add Dehao PPP and Update toc for DG
kdh3799 Apr 10, 2023
8c77e19
Merge pull request #136 from moseslee9012/master
joulev Apr 10, 2023
6db02bb
Merge pull request #138 from kdh3799/dh_ppp
joulev Apr 10, 2023
7b3e148
Improve review command based on TA feedback
kdh3799 Apr 10, 2023
5886283
Merge pull request #139 from kdh3799/improve_review_command
joulev Apr 10, 2023
0592ad1
Improve UG [review command] based on issue 114 and 65
kdh3799 Apr 10, 2023
eb60c8e
Merge pull request #140 from kdh3799/improve_review_command
joulev 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
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
/out/
/*.iml

# VSCode setting files
.vscode/

# Gradle build files
/.gradle/
/build/
Expand All @@ -15,3 +18,4 @@ bin/

/text-ui-test/ACTUAL.TXT
text-ui-test/EXPECTED-UNIX.TXT
flashcardList.txt
7 changes: 4 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,19 @@ test {
}

application {
mainClass = "seedu.duke.Duke"
mainClass = "com.clanki.Clanki"
}

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

checkstyle {
toolVersion = '10.2'
}

run{
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://avatars.githubusercontent.com/u/16986946?v=4&s=100) | Kong Dehao | [GitHub](https://github.com/kdh3799) | [Portfolio](docs/team/kongdehao.md) |
| ![](https://avatars.githubusercontent.com/u/44609036?v=4&s=100) | Vu Van Dung | [GitHub](https://github.com/joulev) | [Portfolio](https://joulev.dev) |
| ![](https://avatars.githubusercontent.com/u/88227764?v=4&s=100) | Song Zijin | [GitHub](https://github.com/SongZijin) | [Portfolio](docs/team/songzijin.md) |
| ![](https://avatars.githubusercontent.com/u/72350236?v=4&s=100) | Moses Lee | [GitHub](https://github.com/moseslee9012) | [Portfolio](docs/team/moseslee.md) |
| <img src="https://avatars.githubusercontent.com/u/88180884" width="100px" height="100px" /> | Javienne Yeo | [GitHub](https://github.com/javienneyeo) | [Portfolio](docs/team/javienneyeo.md) |
264 changes: 258 additions & 6 deletions docs/DeveloperGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,266 @@

## Acknowledgements

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

## Design & implementation

Choose a reason for hiding this comment

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

Perhaps you could include the overall architecture of the application so that first-time developers would be able to have a clearer picture of your application without having to trace through the source code.

See example

Choose a reason for hiding this comment

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

Perhaps you could include class diagrams for the various components showing the overall interactions and relationships between key components used in your application.


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

Choose a reason for hiding this comment

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

Perhaps include a brief description of the design of the product.

Choose a reason for hiding this comment

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

Perhaps an architecture overview of the application would provide better insight to the project

Choose a reason for hiding this comment

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

Perhaps it might be better to give a brief description for the project for future developers.


### Add Flashcard Feature

#### Current implementation

The current add flashcard allows the user to add a flashcard to the list of flashcards,
it is implemented through the following steps:

Step 1:
The input of user is collected by `getUserCommand()` inside class `Ui`.

Step 2:
The input string will be converted into a `Command` object by being passed through
`parseCommand(String userInput)` inside `Parser`.

Choose a reason for hiding this comment

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

Perhaps you could include what the Flashcard is for


In this case, an `AddCommand` will be created and returned.

Step 3:
The `execute()` function of `AddCommand` will run, calling `addNewFlashcard(questionText, answerText)`

Choose a reason for hiding this comment

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

Maybe you could explain what the code is executing (why is it adding a command)

of class `FlashcardList` to create and add the new flashcard to the list.

Then it will also call `printSuccessfulAddMessage(questionText, answerText)` of class `Ui`
to display text indicating the successful adding function to the user.

At this point, the adding process is completed and the program is ready to take another
command.

The following sequence diagram show how the add operation works:
![AddFlashcard-0.png](umlDiagrams%2FAddFlashcard-0.png)

Choose a reason for hiding this comment

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

Perhaps use a dashed line for the return arrow

Choose a reason for hiding this comment

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

Perhaps include an arrow to show the invocation of the Clanki class

Choose a reason for hiding this comment

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

Perhaps remove the space between the 'Add Command' class

Choose a reason for hiding this comment

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

Would a dashed-line be more appropriate for the return arrows for the sequence diagram?

Choose a reason for hiding this comment

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

Would a User "actor" be more fitting for sending the userInput to Clanki?

Choose a reason for hiding this comment

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

Perhaps you could distinguish between arrows that return from method calls using dashed arrows.

Choose a reason for hiding this comment

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

Perhaps you can illustrate that the AddCommand object is destroyed after it is executed? As far as I can tell, there is no other reference pointing to Command in line 36 of Clanki.java. In PlantUML, this can be achieved usinng the destroy keyword.

Choose a reason for hiding this comment

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

Perhaps you could extend the activation bar for "UI" and "Add Command" all the way until the last call since you did not terminate it in between calls

Choose a reason for hiding this comment

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

Perhaps the "user" should be represented as their own entity and given their own lifeline here in order to represent user input.

image

Choose a reason for hiding this comment

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

Perhaps the return arrows from method calls should be dashed instead of solid.


#### Reason for current implementation

Through using `AddCommand` class, which extends `Command` class it increases the level of
abstraction as the code can now perform the various commands on a class level.

Moreover, since the creating of new `Flashcard` of object and adding of the newly created
flashcard are both done in the same class as where the flashcards are stored, this reduces
coupling in the program as the `AddCommand` will not have access to the inner structure of
`FlashcardList`, which stores the list of flashcards.

#### Alternative implementation

Choose a reason for hiding this comment

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

You might want to remove this section since it it extra information that does not explain the current functionality of your implemented design


- Alternative 1: Have the add command function directly in `FlashcardList`
- Pros: Easy to implement
- Cons: Will require another function in another program to differentiate it from other
commands
- Alternative 2: Have the constructor of `Flashcard` include adding the card to list of flashcards
- Pros: Simplifies code
- Cons: Will cause trouble when temporary flashcard (that need not be stored) are
created

### Delete Flashcard Feature

#### Current implementation

The current delete flashcard allows the user to remove a flashcard from the list of flashcards,
it is implemented through the following steps:

Step 1: The input of user is collected by `getUserCommand()` inside class `Ui`.

Step 2: The input string will be converted into a `Command` object by being passed through
`parseCommand(String userInput)` inside `Parser`.

In this case, a `DeleteCommnad` will be created and returned.

Choose a reason for hiding this comment

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

I believe there is a typo here, i think it should be DeleteCommand


Step 3: The `execute()` function of `DeleteCommand` will run, creating a copy of the list of flashcards.
Then `findFlashcards(flashcards, query)` is called to find the flashcards with questions matching the query,
before calling `printFlashcardList(matchingFlashcards)` to display the found flashcards.

User input is taken to get the index of the flashcard to be removed. `deleteFlashcard` is called from
class `flashcardList` to remove the flashcard from the original list of flashcards. Finally

Choose a reason for hiding this comment

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

flashcardList and ":Flashcard List" refer to the same class but have different naming, perhaps you could standardize the naming in the diagram and explanation.

`printSuccessfulDelete` is called from class `Ui` to indicate a successful removal of the flashcard.

The deletion process is now completed and the program will await another command.

An overview of how the Delete operation works is shown with the following sequence diagram
![DeleteFlashcard.png](umlDiagrams%2FDeleteFlashcard.png)

Choose a reason for hiding this comment

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

Perhaps call 'deactivate' on the Clanki class activation bar if it terminates. Else, indicate that this is a reference (small aspect of a larger sequence diagram). If not the sequence diagram might appear as incomplete.

Choose a reason for hiding this comment

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

Perhaps you could extend the activation bar for "UI" and "Delete Command" all the way until the last call since you did not terminate it in between calls


#### Reason for current implementation

Through using `DeleteCommand` class, which extends `Command` class it increases the level of
abstraction as the code can now perform the various commands on a class level.

In order to minimise the time for users to search for the flashcard to delete, they are able
to first search for a sub-list of flashcards with matching questions as the query. This method
makes the deletion process simple even if the user does not remember the index of the flashcard.

#### Alternative implementation

- Alternative 1: Delete flashcard by index from the start
- Pros: Easy to implement and simplifies code
- Cons: Cumbersome to delete if user forgets the flashcard's index and has to search
through the whole list of flashcards.

### Update Flashcard Feature

#### Current implementation

The current update flashcard feature allows users search for a specific flashcard and update the contents of this
flashcard.
It is implemented through the following steps:

Step 1:
The input of user is collected by `getUserCommand()` inside class `Ui`.

Step 2:
The input string will be converted into a `Command` object by being passed through
`parseCommand(String userInput)` inside `Parser`.

In this case, an `UpdateCommand` will be created and returned.

Step 3:
The `execute()` function of `UpdateCommand` will run, creating an ArrayList of flashcards. Then
`findFlashcard(flashcards, query)` is called to find flashcards that contain questions or answers that match `query`,
after which it will call `printFlashCards(matchingFlashcards)` in `UpdateCommand` class to display the flashcards
found.

The index of the flashcard to be updated is taken from the user input, which is collected by `getUserCommand()`.
`implementUpdate(flashcards, userText)` is then called to update the question or answer of the flashcard. Finally,
`printFlashCard(flashcards.get(index))` will be called which prints the flashcard that was updated with its new content.

At this point, the update flashcard process is completed and the program is read to take another command.

An overview of how the Update command works is shown with the following sequence diagram
![UpdateFlashcard.png](umlDiagrams%2FUpdateFlashcard.png)

Choose a reason for hiding this comment

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

It might be a fault on my end, but I currently do not see the linked diagram.

Choose a reason for hiding this comment

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

The diagram is not displaying on the page.

Copy link

Choose a reason for hiding this comment

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

image

Activation bars should always have start and end

Copy link

Choose a reason for hiding this comment

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

image
Incorrect arrow used for returns. Same apply to other parts of the diagram

Copy link

Choose a reason for hiding this comment

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

image

Missing line break and extra colon here. Correct example from module website below:

image


#### Reason for current implementation

Implementing the update flashcard in an `UpdateCommand` class makes it easier during the debugging process related to
update flashcard feature alone as most of the methods and attributes are within this `UpdateCommand` class.

#### Alternative implementation

- Alternative 1: Instead of creating a new arrayList `matchingFlashcards` that store flashcards containing the
`query` and then printing the list of flashcards, directly print the flashcards when there is a match with the query`
- Pros: Easier to implement
- Cons: Harder to track the total number of flashcards that has `query` and will need to have another way to track
the index of the matching flashcards. it will also be more confusing as the index of the user input is not
aligned with the index of the arrayList that contains all the flashcards

### Parser

#### Current implementation

The parser mostly relies on the `ParsedInput` class, which can parse any user provided string input in the format of
Windows command prompt commands (`command body /opt-key opt-value`).

##### `ParsedInput`

Initiated with a string `input`, it splits the input to sections that are of use. From there it splits each section
further to a "title" (denoted with `=` below) and a "body" (denoted with `-` below) part.

```
command blah blah /opt1 hello /opt2 world blah bleh
| Part 1 | | Part 2 | | Part 3 |
|=====| |-------| |==| |---| |==| |-------------|
```
Comment on lines +319 to +323

Choose a reason for hiding this comment

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

Perhaps your group can consider separating into the following components for clarity.
Sample input: command ...
Expected output: output ...


Then these small subparts are grouped together to a format where the command part of the command, the body part and the
options can be retrieved programmatically.

The command and body can be read with `getCommand()` and `getBody()` respectively. `getCommand()` is guaranteed to be
non-null.

The options can be read with `getOptionByName(optionKeyName)`. The reason we don't have specific `getDate`
or `getQuestion` command is because we don't know what the user will input and what options we will require for each
command. So depending on the command, we retrieve the option accordingly with e.g.

```java
"command blah blah /opt1 hello /opt2 world blah bleh"
getOptionByName("opt2") // -> "world blah bleh"
getOptionByName("opt3") // -> null
```

##### `Parser`

Choose a reason for hiding this comment

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

You could add a sequence diagram to explain how the parser works!


This is now just a matter of wrapping `ParsedInput` with suitable error handling and logic such that each command will
be used to initiated a corresponding command class (e.g. `AddCommand`), while errors are handled gracefully.

#### Reason for current implementation

We need an intuitive, safe and declarative way to parse the user input. Alternative implementations that can only parse
specific commands with specific options are more imperative, less readable, less maintainable and overall just a pain to
handle. That's why the two classes are here.

#### Alternative implementation

No.

Choose a reason for hiding this comment

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

Perhaps your team can consider putting "No alternative implementations" instead


### Review Flashcard Feature

#### Current implementation

The current review flashcard allows the user to review all the flashcards that are due today or before,
it is implemented through the following steps:

Step 1:
The input of user is collected by `getUserCommand()` inside class `Ui`.

Step 2:
The input string will be converted into a `Command` object by being passed through
`parseCommand(String userInput)` inside `Paser`.

In this case, an `ReviewCommand` will be created and returned.

Step 3:
The `execute()` function of `ReviewCommand` will run, calling `getFlashCards()`
of class `FlashcardList` to get the list of the flashcards.

Then it will iterate through the `FlashcardList` and call the function `isDueBeforeToday()` of class `Flashcard` to
check if the flashcard is due by today.

If the flashcard is due by today, `reviewCurrentFlashcard(Ui display, Flashcard flashcard)` of class `ReviewCommand`
will be called to review the card.

First, the `Ui` will display the question of the current card by calling the `getQuestion()` method of
class `Flashcard`, and ask user if user is ready to view the answer. After user enters any keyboard input, the answer of
the current card will be shown by calling the `getAnswer()` method of class `Flashcard`, and `Ui` will ask the user if
he/she has got the card correct. If the user inputs "y", then the current `Flashcard` is considered to be
cleared and `updateDueDateAfterCorrectAnswer()` of `Flashcard` will be called to update its `dueDate`. Then Clanki will
let user review the next `Flashcard`. If the user inputs "n", then the card is considered to be not cleared
and `updateDueDateAfterIncorrectAnswer()` will be called to update its `dueDate`. Then Clanki will let user review the
next `Flashcard`. This process will repeat until all the `Flashcards` in the `FlashcardList` are iterated.

Choose a reason for hiding this comment

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

Perhaps your group can consider breaking it down into smaller steps. E.g 3.1, 3.2, 3.3 ...


After the whole `FlashcardList` has been iterated through, a message congratulating the user that he/she has completed
the reviewing task will be displayed.

At this point, the reviewing process is completed and the program is ready to take another command.

The following sequence diagram show how the review operation work:
![ReviewFlashcard-0.png](umlDiagrams%2FReviewFlashcard-1.png)
Copy link

Choose a reason for hiding this comment

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

image
There's a way to turn off the entities at the bottom, try to follow the notations used in our class as close as possible.

Copy link

Choose a reason for hiding this comment

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

image
Activation bar started before the method getQuestion() is called.

Copy link

Choose a reason for hiding this comment

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

The diagram might be too complex. You can try to simplify it by splitting into a few diagrams.

Copy link

Choose a reason for hiding this comment

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

image
There should not have any spaces within the class name.


#### Reason for current implementation

Through using `ReivewCommand` class, which extends `Command` class it increases the level of
abstraction as the code can now perform the various commands on a class level.

Moreover, `ReviewCommand` only has access to the public methods of `FlashcardList` and `Flashcard`, this reduces
coupling in the program as the `ReviewCommand` will not have access to the inner structure of
`FlashcardList` and `Flashcard`.

Choose a reason for hiding this comment

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

You can consider adding a class diagram, at the start of the DG or otherwise, to show the overview of what is happening, to supplement the reader's understanding

#### Alternative implementation

- Alternative 1: Have the review command function directly in `FlashcardList`
- Pros: Easy to implement
- Cons: Will require another function in another program to differentiate it from other
commands
- Alternative 2: After entering the `ReviewCommand`, go back to `Clanki.run()` and take further commands for review
process
- Pros: Simplifies code in `ReviewCommand`
- Cons: Will have to pass around a lot of parameters and variables

Choose a reason for hiding this comment

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

For some reason, this part is not reflected on github pages for me. Your group can check if this part is showing correctly.


## Product scope

### Target user profile

{Describe the target user profile}

Choose a reason for hiding this comment

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

Perhaps a brief overview of the target user can be added.

Expand All @@ -20,18 +272,18 @@

## User Stories

|Version| As a ... | I want to ... | So that I can ...|

Choose a reason for hiding this comment

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

Perhaps you should add more user stories to better illustrate the purpose of the app and justify the various features

|--------|----------|---------------|------------------|
|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|

Choose a reason for hiding this comment

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

Perhaps you could elaborate more on the user stories so that the rest can better understand the motivations of this application and how it caters to the target users.

| Version | As a ... | I want to ... | So that I can ... |

Choose a reason for hiding this comment

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

you could add more user stories to better explain why you are making this product

|---------|----------|---------------------------|-------------------------------------------------------------|
| v1.0 | new user | see usage instructions | refer to them when I forget how to use the application |

Choose a reason for hiding this comment

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

Perhaps you could provide more compelling user stories to explain the functionality of the product

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

Choose a reason for hiding this comment

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

You can consider separating each command to be each user story, that way it will motivate the use of your commands.

## Non-Functional Requirements

Choose a reason for hiding this comment

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

Perhaps you could elaborate on the non-functional requirements that your group is trying to achieve in your application, which may be linked to your user stories.


{Give non-functional requirements}

## Glossary

* *glossary item* - Definition
- _glossary item_ - Definition

## Instructions for manual testing

Choose a reason for hiding this comment

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

Perhaps provide some instructions for manual testing

Choose a reason for hiding this comment

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

Perhaps you could elaborate more on how various testing is performed in your application, such as unit testing, integration testing, system testing, etc.


Expand Down
Loading