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

[AY1920S1-CS2113T-W13-2] JavaCake #88

Open
wants to merge 596 commits into
base: master
Choose a base branch
from
Open
Changes from 5 commits
Commits
Show all changes
596 commits
Select commit Hold shift + click to select a range
6cb94a3
Fixed typos
GlenWong97 Oct 27, 2019
d5ae18d
Merge pull request #111 from RusdiHaizim/master
RusdiHaizim Oct 28, 2019
15e7f9d
Changed Ui image for README
RusdiHaizim Oct 28, 2019
7afc038
Resolved merge conflict
GlenWong97 Oct 28, 2019
b90de7e
+Resized window +Added some storage tests
RusdiHaizim Oct 28, 2019
5b7a92e
Merge pull request #112 from RusdiHaizim/master
RusdiHaizim Oct 28, 2019
6841ac6
Refactored mainwindow
GlenWong97 Oct 28, 2019
1c15a88
error handling for files that are not named properly
kishore03109 Oct 29, 2019
7278484
Merge pull request #113 from kishore03109/master
kishore03109 Oct 29, 2019
a7fcbfe
Implemented deletecommand for notes with documentation
GlenWong97 Oct 29, 2019
91abd6d
Implemented deletenotecommand for JAR
GlenWong97 Oct 29, 2019
99c34a3
Resolved merge conflicts
GlenWong97 Oct 29, 2019
3949773
Fixed checkstyle
GlenWong97 Oct 29, 2019
639129b
Merge pull request #114 from GlenWong97/master
GlenWong97 Oct 29, 2019
b7eeb8e
added 3 difficulity levels for quiz
kishore03109 Oct 29, 2019
48da7b0
test errors fixed
kishore03109 Oct 29, 2019
b9a0cec
test errors fixed
kishore03109 Oct 29, 2019
b62c2d6
fixed bugs for new user
kishore03109 Oct 29, 2019
12d7004
Merge pull request #115 from kishore03109/master
kishore03109 Oct 29, 2019
d72a58a
minor changes
GlenWong97 Oct 29, 2019
cb68c72
Merge remote-tracking branch 'upstream/master'
GlenWong97 Oct 29, 2019
d1ca16c
Refreshed notes after reset
RusdiHaizim Oct 29, 2019
3737686
Merge branch 'master' of https://github.com/AY1920S1-CS2113T-W13-2/main
RusdiHaizim Oct 29, 2019
8807a20
Added sad face when exiting app
RusdiHaizim Oct 29, 2019
be5a92f
Refactored parser and gotocomocommand
GlenWong97 Oct 29, 2019
3e000b7
Renamed Duke to JavaCake ane and DukeException to CakeException
GlenWong97 Oct 29, 2019
c33997a
Refactored overview command
GlenWong97 Oct 29, 2019
ea183f3
late v1.3: Refactor quiz package and Review function in GUI (#117)
claysmilesoil Oct 30, 2019
84891c6
fixed bug for quiz score
kishore03109 Oct 30, 2019
063594f
Merge pull request #118 from kishore03109/master
kishore03109 Oct 30, 2019
675da44
Resolved merge conflict
GlenWong97 Oct 30, 2019
7b1ce72
Merge branch 'master' of https://github.com/AY1920S1-CS2113T-W13-2/main
RusdiHaizim Oct 30, 2019
64bf325
Fixed out of bounds quiz session, and added quiz qn again to avoid co…
RusdiHaizim Oct 30, 2019
5d63219
Merge pull request #119 from RusdiHaizim/master
RusdiHaizim Oct 30, 2019
8a6e443
Resolved merge conflict
GlenWong97 Oct 31, 2019
043ee2e
Setting up handler class
GlenWong97 Oct 31, 2019
39e152f
Fixed checkstyle
GlenWong97 Oct 31, 2019
f67fa58
+Done +Delete +Snooze +Parser editions by Glen +Refactored mainwindow…
RusdiHaizim Oct 31, 2019
2425f54
Merge pull request #121 from GlenWong97/master
GlenWong97 Oct 31, 2019
42e864e
Merge branch 'master' of https://github.com/AY1920S1-CS2113T-W13-2/main
RusdiHaizim Oct 31, 2019
ebabc06
Fixed resetCommand error
RusdiHaizim Oct 31, 2019
275b1cc
Merge pull request #122 from RusdiHaizim/master
RusdiHaizim Oct 31, 2019
90fd34d
Refactored CreateNoteCommand
GlenWong97 Oct 31, 2019
f84bc40
Different error messages for review invalid input
Oct 31, 2019
26b9098
Minor fixes (#123)
claysmilesoil Oct 31, 2019
efe287e
Fixed overview bug in Linux OS
kishore03109 Oct 31, 2019
b9d0e11
Merge pull request #124 from kishore03109/master
kishore03109 Oct 31, 2019
f536e24
Additional avatar sprites
Oct 31, 2019
826ed39
Changed to H series sprites; new expression
Oct 31, 2019
db09238
Custom messages for avatar on results screen
Oct 31, 2019
39fbac3
Change pickQuestions() to private
Oct 31, 2019
cd30b11
Fix bug on fullscreen display
Oct 31, 2019
39480ec
Corrected answer
Oct 31, 2019
b67b4cc
Merge remote-tracking branch 'upstream/master'
GlenWong97 Nov 1, 2019
dd6c3ef
Merge pull request #125 from claysmilesoil/branch-fixes1
RusdiHaizim Nov 1, 2019
311fd04
Merge remote-tracking branch 'upstream/master'
GlenWong97 Nov 1, 2019
92fb284
Resolved merge conflict
GlenWong97 Nov 2, 2019
ec1ce62
Fixing file naming conventions across systems
GlenWong97 Nov 2, 2019
36ac800
Fixed checkstyle
GlenWong97 Nov 2, 2019
e35c5ad
Merge pull request #146 from GlenWong97/master
GlenWong97 Nov 2, 2019
705056f
Added parameter check for commands
GlenWong97 Nov 2, 2019
5f19279
Created empty constructor for special case
GlenWong97 Nov 2, 2019
7cf27c6
Resolved checkstyle
GlenWong97 Nov 2, 2019
7857c26
Removed empty constructors
GlenWong97 Nov 2, 2019
e8eec25
Merge pull request #148 from GlenWong97/master
GlenWong97 Nov 2, 2019
cdd4650
v1.4: Changed loadQuestions() and user's answer sanity check for quiz…
claysmilesoil Nov 2, 2019
4146956
+Changed resizable to false; +Changed formatting of dates for deadlin…
RusdiHaizim Nov 3, 2019
9352a2a
Merge branch 'master' of https://github.com/AY1920S1-CS2113T-W13-2/main
RusdiHaizim Nov 3, 2019
bc7ed4e
fixed checkstyle
RusdiHaizim Nov 3, 2019
85c0448
Fix for quiz answer checking (#152)
claysmilesoil Nov 3, 2019
6144349
Merge branch 'master' of https://github.com/AY1920S1-CS2113T-W13-2/main
RusdiHaizim Nov 4, 2019
ff65e5b
Changed jar file name
RusdiHaizim Nov 4, 2019
bec5ee3
Merge pull request #151 from RusdiHaizim/master
RusdiHaizim Nov 4, 2019
8d2612b
midv1.4: +Changed to gridpane
RusdiHaizim Nov 4, 2019
e46ed15
Fixed checkstyle
RusdiHaizim Nov 4, 2019
66ee65d
Added score commands, refactored starting msg
RusdiHaizim Nov 4, 2019
c732605
Merge pull request #153 from RusdiHaizim/master
RusdiHaizim Nov 5, 2019
df1cf89
Merge remote-tracking branch 'upstream/master'
GlenWong97 Nov 5, 2019
5f35088
Refactored Editnote
GlenWong97 Nov 5, 2019
ab9a27a
Refactored logic
GlenWong97 Nov 5, 2019
ec28766
Fixed bugs #134 and #132
kishore03109 Nov 5, 2019
6ae1d76
Merge pull request #154 from kishore03109/master
kishore03109 Nov 5, 2019
cdd7d55
Minor changes
GlenWong97 Nov 5, 2019
fa5a9cb
Merge pull request #155 from GlenWong97/master
GlenWong97 Nov 5, 2019
3fce98a
+Added config file; +Ignored message by colorcommand
RusdiHaizim Nov 6, 2019
d9ee0a0
Multithreaded dynamic label resizing
RusdiHaizim Nov 6, 2019
346f7a4
Merge branch 'master' of https://github.com/AY1920S1-CS2113T-W13-2/main
RusdiHaizim Nov 6, 2019
24d5b16
Changed dialogs
RusdiHaizim Nov 6, 2019
ea8de16
Merge pull request #157 from RusdiHaizim/master
RusdiHaizim Nov 6, 2019
a0edd2f
Changed ui again
RusdiHaizim Nov 6, 2019
c5dd71b
Update README.adoc
RusdiHaizim Nov 6, 2019
1e68f12
Update README.adoc
RusdiHaizim Nov 6, 2019
05a1ced
Update README.adoc
RusdiHaizim Nov 6, 2019
2982971
+Reformatted deadline format, CONFIRMED! +refactored help commands
RusdiHaizim Nov 6, 2019
41fad6c
+Fixed snooze error when past storage size; +Refactored error msgs;
RusdiHaizim Nov 6, 2019
cd1de73
Wrote test cases for CreateNoteTest and LogicTest
GlenWong97 Nov 6, 2019
1ceb888
Merge remote-tracking branch 'upstream/master'
GlenWong97 Nov 6, 2019
0e230ff
Renamed attributes
RusdiHaizim Nov 6, 2019
d2b15af
only allow exitcommand during quiz
RusdiHaizim Nov 6, 2019
3fb1a6a
Implemented test cases for CreateNoteCommand
GlenWong97 Nov 6, 2019
a315fad
Fixed topbar Height regardless of resize; multithreaded resize
RusdiHaizim Nov 6, 2019
d5baf63
Merge pull request #158 from RusdiHaizim/master
RusdiHaizim Nov 7, 2019
3601e46
Refactoring overviewcommand
GlenWong97 Nov 7, 2019
07cbd12
Merge remote-tracking branch 'upstream/master'
GlenWong97 Nov 7, 2019
92de60d
resolved checkstyle
GlenWong97 Nov 7, 2019
53d6fb9
Trying to resolve checkstyle
GlenWong97 Nov 7, 2019
5da7491
Trying to resolve checkstyle...
GlenWong97 Nov 7, 2019
ee18293
Created viewnote command
GlenWong97 Nov 7, 2019
175abf6
Added documentation for viewnote command
GlenWong97 Nov 7, 2019
b1199b5
Fixed checkstyle
GlenWong97 Nov 7, 2019
7e86927
Merge pull request #159 from GlenWong97/master
GlenWong97 Nov 7, 2019
f1fe1b9
Added FileReader interface and more checks for deletenotecommand
GlenWong97 Nov 8, 2019
f0927b8
+Changed deadline display message; +Changed prefwidth to 290/280; +Li…
RusdiHaizim Nov 8, 2019
f133914
Removed txt extensions from file name
GlenWong97 Nov 8, 2019
852bae2
Updated test cases
GlenWong97 Nov 8, 2019
7a706a5
Fixed minor checkstyle
GlenWong97 Nov 8, 2019
2ddf92e
Fixed bug when going back on main list
GlenWong97 Nov 8, 2019
61de223
Fixed name of notes displayed
GlenWong97 Nov 8, 2019
36766ab
Fixed checkstyle
GlenWong97 Nov 8, 2019
05becf5
Small changes
GlenWong97 Nov 8, 2019
9b9fff5
Merge pull request #160 from GlenWong97/master
GlenWong97 Nov 8, 2019
d8f3361
Merge branch 'master' of https://github.com/AY1920S1-CS2113T-W13-2/main
RusdiHaizim Nov 9, 2019
ad41d31
Added Tests and refactored min size of GUI
RusdiHaizim Nov 9, 2019
a7dbe8d
Changed reminder input to not show in contentDIalog
RusdiHaizim Nov 9, 2019
664fdbf
+Refactored new cleanslate launch for profile and storage for deadlin…
RusdiHaizim Nov 9, 2019
a3ef3a9
Added tests for quizsession
kishore03109 Nov 9, 2019
b6260bc
checkstyle
kishore03109 Nov 9, 2019
3ad5e57
Merge pull request #162 from kishore03109/master
kishore03109 Nov 9, 2019
04c7542
+Task/Note boxes resized to fixed length; +Added debouncing for loop …
RusdiHaizim Nov 9, 2019
dc52bac
+Added testfiles to gitignore; +Fixed Profile bug; +Refactored cos of…
RusdiHaizim Nov 9, 2019
d280d2a
Merge branch 'master' of https://github.com/AY1920S1-CS2113T-W13-2/main
RusdiHaizim Nov 9, 2019
5df13a7
Merge pull request #161 from RusdiHaizim/master
RusdiHaizim Nov 9, 2019
72b5022
Added change color help msg and new jarfile name
RusdiHaizim Nov 9, 2019
e9c38b2
Merge pull request #163 from RusdiHaizim/master
RusdiHaizim Nov 9, 2019
abd53c3
Fixed snooze bug for index 1
RusdiHaizim Nov 9, 2019
2d55570
Merge pull request #164 from RusdiHaizim/master
RusdiHaizim Nov 9, 2019
d092d66
Added rusdi ppp
RusdiHaizim Nov 9, 2019
a0ba6d7
Merge branch 'master' of https://github.com/AY1920S1-CS2113T-W13-2/main
RusdiHaizim Nov 9, 2019
f08d55d
Links to portfolio, in terms of http links...
RusdiHaizim Nov 9, 2019
27de730
Update AboutUs.adoc
RusdiHaizim Nov 9, 2019
b6a5c71
Update AboutUs.adoc
RusdiHaizim Nov 9, 2019
0d0e766
Added prompt text for text field
RusdiHaizim Nov 9, 2019
29b5e48
Replaced Ui
RusdiHaizim Nov 9, 2019
8e93b2a
Merge branch 'master' of https://github.com/AY1920S1-CS2113T-W13-2/main
RusdiHaizim Nov 9, 2019
af50606
Update README.adoc
RusdiHaizim Nov 9, 2019
e553c81
Refactored commands and added unused package
RusdiHaizim Nov 9, 2019
46197dd
Refactored CreateNoteCommand
GlenWong97 Nov 9, 2019
cf529cc
Next round of OOP
RusdiHaizim Nov 9, 2019
edceca6
Refactor round 2
RusdiHaizim Nov 9, 2019
9407bb3
Added additional checks for CreateNoteCommand
GlenWong97 Nov 9, 2019
e218e18
Refactor round 3
RusdiHaizim Nov 9, 2019
416b000
+Refactor round 3.1; +Redirected log file to output cakeLog; +added g…
RusdiHaizim Nov 9, 2019
05ec213
+scoped StorageTest; +refactor round 3.2
RusdiHaizim Nov 9, 2019
506ce99
refactor round 3.3/guaranted A for codacy pls
RusdiHaizim Nov 9, 2019
7301f57
Added test case for parser
kishore03109 Nov 9, 2019
62f3777
checkstyle
kishore03109 Nov 9, 2019
1c15c33
Merge pull request #165 from RusdiHaizim/master
RusdiHaizim Nov 9, 2019
4b9b09d
Merge https://github.com/AY1920S1-CS2113T-W13-2/main
kishore03109 Nov 9, 2019
3647821
test
kishore03109 Nov 9, 2019
bb7faca
test
kishore03109 Nov 9, 2019
ffff203
coadacy checkstyle
kishore03109 Nov 9, 2019
6ee2bb4
refactor tests
kishore03109 Nov 9, 2019
d80a9ca
checkstyle
kishore03109 Nov 9, 2019
706c628
Merge pull request #168 from kishore03109/master
kishore03109 Nov 9, 2019
2a32b83
Resolved merge conflict
GlenWong97 Nov 9, 2019
4216411
+Added crash screen for data manipulation; +Improving codacy; +Refact…
RusdiHaizim Nov 9, 2019
d7e80ed
Merge branch 'master' of https://github.com/AY1920S1-CS2113T-W13-2/main
RusdiHaizim Nov 9, 2019
dea676e
+Added snooze and delete tests for deadline; +Refactor round 4;
RusdiHaizim Nov 9, 2019
a58bb34
Merge pull request #169 from RusdiHaizim/master
RusdiHaizim Nov 9, 2019
4a5bcd8
Update README.adoc
RusdiHaizim Nov 10, 2019
51c6b4f
+Waifu simulator
RusdiHaizim Nov 10, 2019
56810a2
+Renamed methods in test
RusdiHaizim Nov 10, 2019
5b89d6d
Included test cases for ViewNoteCommand
GlenWong97 Nov 10, 2019
890979e
Merge remote-tracking branch 'upstream/master'
GlenWong97 Nov 10, 2019
6837dfa
Question test cases and logger for QuizSession and ReviewSession (#170)
claysmilesoil Nov 10, 2019
65ceeb9
Fixed space bugs
RusdiHaizim Nov 10, 2019
dc3211b
Merge branch 'master' of https://github.com/AY1920S1-CS2113T-W13-2/main
RusdiHaizim Nov 10, 2019
abc4af1
added goto test
kishore03109 Nov 10, 2019
e8fbdb0
added goto test
kishore03109 Nov 10, 2019
992994f
Refactored help messages
RusdiHaizim Nov 10, 2019
f743c7d
Merge pull request #171 from RusdiHaizim/master
RusdiHaizim Nov 10, 2019
bea0c0e
Implemented some integration testing for notecommands
GlenWong97 Nov 10, 2019
039a9a3
added quiztest
kishore03109 Nov 10, 2019
59d204a
merge conflict
kishore03109 Nov 10, 2019
a18fa75
Merge pull request #172 from kishore03109/master
kishore03109 Nov 10, 2019
f92977f
Refactored GoToCommand
GlenWong97 Nov 10, 2019
7ff2fa0
Refactored CreateNoteCommand by creating constant BY_SPACES
GlenWong97 Nov 10, 2019
fd0887f
Minor refactorings
GlenWong97 Nov 10, 2019
24a8151
Improving readability
GlenWong97 Nov 10, 2019
6ed58d1
Merged and wrote documentations
GlenWong97 Nov 10, 2019
173c8af
Trying to fix test case: Test case fails when running all test cases …
GlenWong97 Nov 10, 2019
e5fcbd2
Update README.adoc with correct introduction
GlenWong97 Nov 10, 2019
9ae3cc2
Updated test case
GlenWong97 Nov 10, 2019
0c97c7d
Merge branch 'master' of https://github.com/GlenWong97/main
GlenWong97 Nov 10, 2019
9376e0e
Merge pull request #173 from GlenWong97/master
GlenWong97 Nov 10, 2019
5a76d53
Log refactor r1
RusdiHaizim Nov 10, 2019
b608161
Merge branch 'master' of https://github.com/AY1920S1-CS2113T-W13-2/main
RusdiHaizim Nov 10, 2019
55d5f03
Refactored logs r2
RusdiHaizim Nov 10, 2019
2efe77b
Fixed parser bug for entering space
RusdiHaizim Nov 10, 2019
10a21c1
Merge pull request #174 from RusdiHaizim/master
RusdiHaizim Nov 10, 2019
ac8ec6b
Review screen bug
kishore03109 Nov 11, 2019
086719c
+Fixed isResult not working to working now
RusdiHaizim Nov 11, 2019
6e482c9
Fixed reviewquiz bug
kishore03109 Nov 11, 2019
bff1694
Merge pull request #175 from RusdiHaizim/master
RusdiHaizim Nov 11, 2019
f61deed
more accurate error message
kishore03109 Nov 11, 2019
7bb0eb3
UG and DG
RusdiHaizim Nov 11, 2019
971a047
Update README.adoc
RusdiHaizim Nov 11, 2019
70977a2
Fixed priority inversion
RusdiHaizim Nov 11, 2019
d0bcbcb
Merge pull request #176 from kishore03109/master
kishore03109 Nov 11, 2019
12f0753
Merge branch 'master' of https://github.com/AY1920S1-CS2113T-W13-2/main
RusdiHaizim Nov 11, 2019
dac2065
Merge pull request #177 from RusdiHaizim/master
RusdiHaizim Nov 11, 2019
9d69155
Implemented checks for restricted file names
GlenWong97 Nov 11, 2019
fe2c95a
Merge remote-tracking branch 'upstream/master'
GlenWong97 Nov 11, 2019
1a11ebf
Improving Codacy
GlenWong97 Nov 11, 2019
c47828f
Fixed checkstyle
GlenWong97 Nov 11, 2019
7f70453
Delete [CS2113T-W13-2][Rusdi Haizim B Rahim]PPP.pdf
RusdiHaizim Nov 11, 2019
805db3b
Added Rusdi PPP
RusdiHaizim Nov 11, 2019
5401394
Merge branch 'master' of https://github.com/AY1920S1-CS2113T-W13-2/main
RusdiHaizim Nov 11, 2019
f28af21
Merge pull request #178 from GlenWong97/master
GlenWong97 Nov 11, 2019
b88e1db
v1.4: Add tests for ReviewSession (#179)
claysmilesoil Nov 11, 2019
9e2f973
Merge branch 'master' of https://github.com/AY1920S1-CS2113T-W13-2/main
RusdiHaizim Nov 11, 2019
ccd0c43
+Fixed exit bug when editting note; +Fixed IntellJ bug
RusdiHaizim Nov 11, 2019
f06eb06
Merge pull request #180 from RusdiHaizim/master
RusdiHaizim Nov 11, 2019
b5eed46
Add files via upload
claysmilesoil Nov 11, 2019
cdc84a8
Update AboutUs.adoc
claysmilesoil Nov 11, 2019
77fb272
Update AboutUs.adoc
claysmilesoil Nov 11, 2019
cc98e56
Update AboutUs.adoc
RusdiHaizim Nov 11, 2019
f09131c
Added PPP
GlenWong97 Nov 11, 2019
5b1cf1c
Deleted PPP
GlenWong97 Nov 11, 2019
a2519b1
Added PPP
GlenWong97 Nov 11, 2019
7349f1f
Updated about us
GlenWong97 Nov 11, 2019
531ab71
Delete [CS2113T-W13-2][Rusdi Haizim B Rahim]PPP.pdf
RusdiHaizim Nov 11, 2019
536e6ec
Add files via upload
RusdiHaizim Nov 11, 2019
c76bcd7
Rename UserGuide.adoc to UserGuide_DEPRECATED.adoc
RusdiHaizim Nov 11, 2019
2b18a64
Rename DeveloperGuide.adoc to DeveloperGuide_DEPRECATED.adoc
RusdiHaizim Nov 11, 2019
2360907
Delete [CS2113T-W13-2][JavaCake]DeveloperGuide.pdf
RusdiHaizim Nov 11, 2019
4707f40
Delete [CS2113T-W13-2][JavaCake]UserGuide.pdf
RusdiHaizim Nov 11, 2019
27b8afc
Add files via upload
RusdiHaizim Nov 11, 2019
73fa64d
PPP
kishore03109 Nov 11, 2019
126775a
added PPP
kishore03109 Nov 11, 2019
10ba148
Update AboutUs.adoc
RusdiHaizim Nov 11, 2019
288f04c
Add files via upload
claysmilesoil Nov 11, 2019
e39b85d
Add files via upload
RusdiHaizim Nov 11, 2019
b649b31
Add files via upload
kishore03109 Nov 11, 2019
b3e85cf
Delete [CS2113T-W13-2]-[Kishore R]PPP.pdf
kishore03109 Nov 11, 2019
b5d247c
Added PPP
kishore03109 Nov 11, 2019
529c978
Delete [CS2113T-W13-2][Kishore R]PPP.docx.pdf
kishore03109 Nov 11, 2019
9493428
Delete [CS2113T-W13-2][Kishore R]PPP.pdf
kishore03109 Nov 11, 2019
75fb32f
Adding PPP
kishore03109 Nov 11, 2019
e21065a
Update AboutUs.adoc
kishore03109 Nov 11, 2019
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
2 changes: 1 addition & 1 deletion src/main/java/javacake/Logic.java
Original file line number Diff line number Diff line change
@@ -183,7 +183,7 @@ public String displayDirectories() {
for (String queries : listOfFiles) {
sb.append(queries).append("\n");
}
sb.append("Key in the index to learn more about the topic!").append("\n");
sb.append("Key in the index to learn more about the topic or do the quiz!").append("\n");
return sb.toString();
}

111 changes: 66 additions & 45 deletions src/main/java/javacake/commands/GoToCommand.java
Original file line number Diff line number Diff line change
@@ -21,7 +21,7 @@ public class GoToCommand extends Command {
* constructor for goto command. Contains a queue of index in which user wants to navigate into.
* @param inputCommand Parsed goto command by user
*/
public GoToCommand(String inputCommand) {
public GoToCommand(String inputCommand) throws DukeException {
if (inputCommand.matches("\\d+")) { //check if input is numeric
indexQueue.add(inputCommand);
} else {
@@ -37,60 +37,18 @@ public GoToCommand(String inputCommand) {
* @param logic TaskList containing current tasks
* @param ui the Ui responsible for outputting messages
* @param storageManager storage container
* @throws DukeException Error thrown when unable to close reader
* @throws DukeException Error thrown when unable to close reader or error in quiz format
*/
public String execute(Logic logic, Ui ui, StorageManager storageManager)
throws DukeException {
int intIndex = Integer.parseInt(indexQueue.poll()) - 1;
logic.updateFilePath(logic.gotoFilePath(intIndex));
String filePath = logic.getFullFilePath();
if (filePath.contains("Quiz")) {

if (!filePath.substring(filePath.length() - 4).equals("Quiz")) {
throw new DukeException("Sorry, please type 'back' or 'list' instead.");
}

if (filePath.contains("1. Java Basics")) {
if (Duke.isCliMode()) {
return new QuizCommand(Question.QuestionType.BASIC, Duke.isCliMode())
.execute(logic, ui, storageManager);
} else {
QuizCommand.setProfile(storageManager.profile);
logic.insertQueries();
QuizCommand.logic = logic;
return "!@#_QUIZ_1";
}
} else if (filePath.contains("2. Object-Oriented Programming")) {
if (Duke.isCliMode()) {
return new QuizCommand(Question.QuestionType.OOP, Duke.isCliMode())
.execute(logic, ui, storageManager);
} else {
QuizCommand.setProfile(storageManager.profile);
logic.insertQueries();
QuizCommand.logic = logic;
return "!@#_QUIZ_2";
}
} else if (filePath.contains("3. Extensions")) {
if (Duke.isCliMode()) {
return new QuizCommand(Question.QuestionType.EXTENSIONS, Duke.isCliMode())
.execute(logic, ui, storageManager);
} else {
QuizCommand.setProfile(storageManager.profile);
logic.insertQueries();
QuizCommand.logic = logic;
return "!@#_QUIZ_3";
}
} else {
if (Duke.isCliMode()) {
return new QuizCommand(Question.QuestionType.ALL, Duke.isCliMode())
.execute(logic, ui, storageManager);
} else {
QuizCommand.setProfile(storageManager.profile);
logic.insertQueries();
QuizCommand.logic = logic;
return "!@#_QUIZ_4";
}
}
return handleQuiz(logic, ui, storageManager);
}
logic.insertQueries();
if (logic.containsDirectory()) {
@@ -106,4 +64,67 @@ public String execute(Logic logic, Ui ui, StorageManager storageManager)
return (logic.readQuery());
}
}

private String handleQuiz(Logic logic, Ui ui, StorageManager storageManager) throws DukeException {
String filePath = logic.getFullFilePath();
Question.QuestionType qnType;
Question.QuestionDifficulty qnDifficulity;

if (filePath.contains("1. Java Basics")) {
qnType = Question.QuestionType.BASIC;
} else if (filePath.contains("2. Object-Oriented Programming")) {
qnType = Question.QuestionType.OOP;
} else if (filePath.contains("3. Extensions")) {
qnType = Question.QuestionType.EXTENSIONS;
} else {
qnType = Question.QuestionType.ALL;
}


if (filePath.contains("1. Easy Quiz")) {
qnDifficulity = Question.QuestionDifficulty.EASY;
} else if (filePath.contains("2. Medium Quiz")) {
qnDifficulity = Question.QuestionDifficulty.MEDIUM;
} else {
qnDifficulity = Question.QuestionDifficulty.HARD;
}

if (Duke.isCliMode()) {
return new QuizCommand(qnType, qnDifficulity, Duke.isCliMode())
.execute(logic, ui, storageManager);
} else {
String response = null;
QuizCommand.setProfile(storageManager.profile);
logic.insertQueries();
QuizCommand.logic = logic;

switch (qnType) {
case BASIC:
response = "!@#_QUIZ_1";
break;
case OOP:
response = "!@#_QUIZ_2";
break;
case EXTENSIONS:
response = "!@#_QUIZ_3";
break;
default:
response = "!@#_QUIZ_4";
break;
}

switch (qnDifficulity) {
case EASY:
response += "EZ";
break;
case MEDIUM:
response += "MED";
break;
default:
response += "HARD";
break;
}
return response;
}
}
}
77 changes: 55 additions & 22 deletions src/main/java/javacake/commands/QuizCommand.java
Original file line number Diff line number Diff line change
@@ -5,14 +5,12 @@
import javacake.Parser;
import javacake.exceptions.DukeException;
import javacake.storage.Profile;
import javacake.storage.Storage;
import javacake.storage.StorageManager;
import javacake.ui.TopBar;
import javacake.ui.Ui;
import javacake.quiz.Question;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.ArrayList;
@@ -26,13 +24,17 @@ public class QuizCommand extends Command {
public ArrayList<Question> questionList = new ArrayList<>();
public String filePath;
private Question.QuestionType qnType;
private Question.QuestionDifficulty qnDifficulty;
private Question prevQuestion;
public static int TotalMaxQuestions = 15;
public int questionCounter = MAX_QUESTIONS - 1;
private int currScore = 0;
private static Profile profile;
public ScoreGrade scoreGrade;
int totalNumOfQns = 0;
public int totalNumOfQns = 0;
public static Logic logic = Logic.getInstance();
public final int levelsOfDifficulty = 3;


public enum ScoreGrade {
BAD, OKAY, GOOD
@@ -43,7 +45,9 @@ public enum ScoreGrade {
* QuizCommand constructor for topic-based quiz.
* @param questionType the topic of the quiz.
*/
public QuizCommand(Question.QuestionType questionType, Boolean isCli) throws DukeException {
public QuizCommand(Question.QuestionType questionType, Question.QuestionDifficulty questionDifficulty,
Boolean isCli) throws DukeException {
qnDifficulty = questionDifficulty;
type = CmdType.QUIZ;
chosenQuestions = new ArrayList<>();
qnType = questionType;
@@ -161,51 +165,80 @@ public void runGui() throws DukeException {
}

/**
* Method to overwrite the old score of user,
* if it's less than the current score.
* @param score new score of user
* Method to overwrite the old totalScore of user,
* if it's less than the current totalScore.
* @param totalScore new totalScore of user
* @param profile profile object of user
* @throws DukeException error if question type is undefined
*/
public void overwriteOldScore(int score, Profile profile) throws DukeException {
int topicIdx;
public void overwriteOldScore(int totalScore, Profile profile) throws DukeException {
int individualtopicIdx;
int overalltopicIdx;
switch (qnType) {
case BASIC:
topicIdx = 0;
overalltopicIdx = 0;
break;
case OOP:
topicIdx = 1;
overalltopicIdx = 1;
break;
case EXTENSIONS:
topicIdx = 2;
overalltopicIdx = 2;
break;
case ALL:
topicIdx = 3;
overalltopicIdx = 3;
break;
default:
throw new DukeException("Topic Idx out of bounds!");
}

switch (qnDifficulty) {
case EASY:
individualtopicIdx = overalltopicIdx * levelsOfDifficulty;
break;
case MEDIUM:
individualtopicIdx = overalltopicIdx * levelsOfDifficulty + 1;
break;
case HARD:
individualtopicIdx = overalltopicIdx * levelsOfDifficulty + 2;
break;
default:
throw new DukeException("Topic Idx out of bounds!");
}
if (score > profile.getContentMarks(topicIdx)) {
profile.setMarks(topicIdx, score);

if (totalScore > profile.getIndividualContentMarks(individualtopicIdx)) {
profile.setIndividualMarks(individualtopicIdx,totalScore);
if (individualtopicIdx % levelsOfDifficulty == 0) {
totalScore += profile.getIndividualContentMarks(individualtopicIdx + 1);
totalScore += profile.getIndividualContentMarks(individualtopicIdx + 2);
} else if (individualtopicIdx % levelsOfDifficulty == 1) {
totalScore += profile.getIndividualContentMarks(individualtopicIdx + 1);
totalScore += profile.getIndividualContentMarks(individualtopicIdx - 1);
} else if (individualtopicIdx % levelsOfDifficulty == 2) {
totalScore += profile.getIndividualContentMarks(individualtopicIdx - 2);
totalScore += profile.getIndividualContentMarks(individualtopicIdx - 1);
}

profile.setOverallMarks(overalltopicIdx, totalScore);

if (!Duke.isCliMode()) {
switch (topicIdx) {
switch (overalltopicIdx) {
case 0:
Duke.logger.log(Level.INFO, score + " YEET");
TopBar.progValueA = (double) score / MAX_QUESTIONS;
Duke.logger.log(Level.INFO, totalScore + " YEET");
TopBar.progValueA = (double) totalScore / TotalMaxQuestions;
break;
case 1:
TopBar.progValueB = (double) score / MAX_QUESTIONS;
TopBar.progValueB = (double) totalScore / TotalMaxQuestions;
break;
case 2:
TopBar.progValueC = (double) score / MAX_QUESTIONS;
TopBar.progValueC = (double) totalScore / TotalMaxQuestions;
break;
case 3:
TopBar.progValueD = (double) score / MAX_QUESTIONS;
TopBar.progValueD = (double) totalScore / TotalMaxQuestions;
break;

default:
}
TopBar.progValueT = (double) profile.getTotalProgress() / (MAX_QUESTIONS * 4);
TopBar.progValueT = (double) profile.getTotalProgress() / (TotalMaxQuestions * 4);
}
}
}
4 changes: 4 additions & 0 deletions src/main/java/javacake/quiz/Question.java
Original file line number Diff line number Diff line change
@@ -9,6 +9,10 @@ public enum QuestionType {
BASIC, OOP, EXTENSIONS, ALL
}

public enum QuestionDifficulty {
EASY, MEDIUM, HARD
}

public Question(String question, String answer) {
this.question = question;
this.answer = answer;
10 changes: 6 additions & 4 deletions src/main/java/javacake/quiz/QuestionList.java
Original file line number Diff line number Diff line change
@@ -12,7 +12,7 @@

public class QuestionList {
private ArrayList<Question> chosenQuestions;
private int totalNumOfBasicQns = 15;
private int totalNumOfBasicQns = 5;
private int totalNumOfOopQns = 5;
private int totalNumOfUsefulExtensionQns = 5;
/** The maximum number of questions in one session of a quiz. */
@@ -49,7 +49,8 @@ private ArrayList<BasicQuestion> initBasicList() throws DukeException {
ArrayList<BasicQuestion> basicQuestionList = new ArrayList<>();
for (int i = 1; i <= totalNumOfBasicQns; i++) {
try {
String fileContentPath = "/content/MainList/1. Java Basics/4. Quiz/Qn" + i + ".txt";
String fileContentPath = "content/MainList/1. Java Basics/"
+ "4. Test Yourself!/1. Easy Quiz/Qn" + i + ".txt";
InputStream in = getClass().getResourceAsStream(fileContentPath);
//System.out.println(filePath);
BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(in));
@@ -92,7 +93,8 @@ private ArrayList<OopQuestion> initOopList() throws DukeException {
ArrayList<OopQuestion> oopQuestionList = new ArrayList<>();
for (int i = 1; i <= totalNumOfOopQns; i++) {
try {
String fileContentPath = "/content/MainList/2. Object-Oriented Programming/5. Quiz/Qn" + i + ".txt";
String fileContentPath = "/content/MainList/2. Object-Oriented "
+ "Programming/5.Test Yourself!/5. Easy Quiz/Qn" + i + ".txt";
InputStream in = getClass().getResourceAsStream(fileContentPath);
BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(in));
String currentline;
@@ -136,7 +138,7 @@ private ArrayList<ExtensionQuestion> initExtensionList() throws DukeException {
ArrayList<ExtensionQuestion> extensionQuestionList = new ArrayList<>();
for (int i = 1; i <= totalNumOfUsefulExtensionQns; i++) {
try {
String fileContentPath = "/content/MainList/3. Extensions/4. Quiz/Qn" + i + ".txt";
String fileContentPath = "/content/MainList/3. Extensions/4. Test Yourself!/Qn" + i + ".txt";
InputStream in = getClass().getResourceAsStream(fileContentPath);
BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(in));
String currentLine;
Loading