Skip to content
Open
Show file tree
Hide file tree
Changes from 98 commits
Commits
Show all changes
288 commits
Select commit Hold shift + click to select a range
b0f7177
Fix Checkstyle violations in QuizManager
naveen42x Oct 15, 2024
3762a79
Normalize line endings to Unix and OS X
naveen42x Oct 15, 2024
6d60f0d
Implement help command
naveen42x Oct 15, 2024
c29ce34
Implement help message and fix check errors
naveen42x Oct 15, 2024
362cc66
Merge pull request #22 from naveen42x/implement-help-command
naveen42x Oct 15, 2024
b0df5ff
Implement save and load quiz results functionality
naveen42x Oct 15, 2024
739921d
Merge pull request #24 from naveen42x/implement-save-results
naveen42x Oct 15, 2024
51f249d
Updated save feature and fixed test cases
naveen42x Oct 15, 2024
825cecc
Merge pull request #25 from naveen42x/implement-save-results
naveen42x Oct 15, 2024
5a113d8
Add assertions into Quiz
shaunngoh Oct 18, 2024
358370b
Merge pull request #26 from AY2425S1-CS2113-W12-4/Assertions
shaunngoh Oct 18, 2024
1bd80ca
Resolve QuizManagerTest
shaunngoh Oct 18, 2024
7d61399
Resolve QuizManagerTest
shaunngoh Oct 18, 2024
54b56dc
Resolve Quiztest
shaunngoh Oct 18, 2024
31c2ac4
Merge pull request #27 from AY2425S1-CS2113-W12-4/QuizTest
shaunngoh Oct 18, 2024
fcc0af0
Add tests, assert, and logging to QuizManager.
Oct 18, 2024
ca534ca
Fixed checkstyle issues and added logging/assertions.
Oct 18, 2024
e135e6c
Fixed checkstyle issues.
Oct 18, 2024
8b14a31
Fixed checkstyle issues.
Oct 18, 2024
6576093
Fixed checkstyle issues.
Oct 18, 2024
5986b4b
Fixed checkstyle issues.
Oct 18, 2024
b0df621
Fixed checkstyle issues.
Oct 18, 2024
788034f
Merge pull request #29 from Lucky-Yuan00/Jinlin-Dev
Lucky-Yuan00 Oct 18, 2024
345837a
Fixed checkstyle issues.
Oct 18, 2024
e468440
Fxi checkstyle issues.
Oct 18, 2024
a6832dc
Fxi checkstyle issues.
Oct 18, 2024
5133953
Fxi checkstyle issues.
Oct 18, 2024
8fb5f7b
Fixed checkstyle issues.
Oct 18, 2024
67eebfc
Fixed checkstyle issues.
Oct 18, 2024
e5fdb23
Fixed checkstyle issues.
Oct 18, 2024
63933b5
Add tests, assert, and logging to QuizManager.
Oct 18, 2024
c17a752
Add tests, assert, and logging to QuizManager.
Oct 18, 2024
8e5a7fb
Add tests, assert, and logging to QuizManager.
Oct 18, 2024
57670ab
Fixed checkstyle issues.
Oct 18, 2024
eaf50e0
Merge pull request #30 from Lucky-Yuan00/Jinlin-Dev
Lucky-Yuan00 Oct 18, 2024
1397281
Add Flashcard, user input
shaunngoh Oct 22, 2024
7403edc
Merge pull request #33 from AY2425S1-CS2113-W12-4/Flashcard
shaunngoh Oct 22, 2024
ed46e6b
Enabled assertions in build.gradle
naveen42x Oct 22, 2024
add93a5
Merge pull request #34 from naveen42x/enable-assertions
naveen42x Oct 22, 2024
4b25995
Updated QuizManager and test cases
naveen42x Oct 22, 2024
cc78146
Updated QuizManager and test cases
naveen42x Oct 22, 2024
628fc9c
Merge pull request #35 from naveen42x/enable-assertions
naveen42x Oct 22, 2024
48a134c
Complete implementation of True/False functionality and input validation
Oct 23, 2024
6b937d5
Merge pull request #38 from Lucky-Yuan00/jinlin-dev
Lucky-Yuan00 Oct 23, 2024
4321fa9
Add new test methods and assertions for True/False question handling.
Oct 24, 2024
8f594fe
Merge pull request #41 from Lucky-Yuan00/jinlin-dev
Lucky-Yuan00 Oct 24, 2024
9bb672d
new question type FITB
YubotKwng Oct 24, 2024
e37ee1a
enable exit
YubotKwng Oct 24, 2024
9a5a8fb
adjust ui-test to pass github tests
YubotKwng Oct 24, 2024
59731bb
Merge pull request #42 from YubotKwng/Fill-in-the-blank
YubotKwng Oct 24, 2024
54d9e82
adjust to pass ui-test
YubotKwng Oct 24, 2024
8b921fa
adjustment for ui-test
YubotKwng Oct 24, 2024
6beb167
class fill in the blank
YubotKwng Oct 24, 2024
389f905
ui-test
YubotKwng Oct 24, 2024
9a1c5e6
Merge pull request #45 from YubotKwng/Fill-in-the-blank
YubotKwng Oct 24, 2024
4045634
Merge pull request #46 from AY2425S1-CS2113-W12-4/FIll-in-the-blank
YubotKwng Oct 24, 2024
e26ca29
Add developer guide architecture
shaunngoh Oct 25, 2024
55fad9e
Merge pull request #48 from AY2425S1-CS2113-W12-4/developer-guide
shaunngoh Oct 25, 2024
85eee5d
Implement architecture for guide
shaunngoh Oct 25, 2024
0d9a78e
Merge pull request #49 from AY2425S1-CS2113-W12-4/developer-guide
shaunngoh Oct 25, 2024
de91e2f
Add TrueFalse class diagram to Developer Guide
Oct 28, 2024
6327ad3
Complete True/False feature documentation in Developer Guide
Oct 28, 2024
ceeb3f1
Merge pull request #50 from Lucky-Yuan00/jinlin-dev
Lucky-Yuan00 Oct 28, 2024
d39c8ad
delete separate adding question type FITB
YubotKwng Oct 28, 2024
acd7681
Timer implemented for the quiz
YubotKwng Oct 28, 2024
e35d4c4
adjust methods in testing
YubotKwng Oct 28, 2024
e5714aa
Add saveQuestionToFile method to Storage class to resolve missing met…
Oct 28, 2024
233ff52
Merge pull request #53 from Lucky-Yuan00/jinlin-dev
Lucky-Yuan00 Oct 28, 2024
fff8d0a
no message
YubotKwng Oct 28, 2024
5a61f99
adjust error
YubotKwng Oct 28, 2024
b05dddd
no message
YubotKwng Oct 28, 2024
0a940e6
Merge pull request #51 from YubotKwng/Timer
YubotKwng Oct 28, 2024
6e90f1c
Merge branch 'master' into Timer
YubotKwng Oct 28, 2024
3621ada
no message
YubotKwng Oct 28, 2024
ec651f3
Merge pull request #55 from YubotKwng/Timer
YubotKwng Oct 28, 2024
7027537
Merge pull request #54 from AY2425S1-CS2113-W12-4/Timer
YubotKwng Oct 28, 2024
370971d
select number of questions
YubotKwng Oct 28, 2024
120d561
add assert
YubotKwng Oct 28, 2024
5df27e6
Merge pull request #56 from YubotKwng/Quiz-number
YubotKwng Oct 28, 2024
50d8c04
Merge pull request #57 from AY2425S1-CS2113-W12-4/QuizNumber
YubotKwng Oct 28, 2024
e8a4353
Updated User Guide
naveen42x Oct 29, 2024
957245b
Merge pull request #59 from naveen42x/ug1
naveen42x Oct 29, 2024
66c3ffc
Add Parser class, refactor Question
shaunngoh Oct 29, 2024
387cb26
Refactor code, add Parser class
shaunngoh Oct 29, 2024
8437c22
Merge pull request #60 from AY2425S1-CS2113-W12-4/code-refactor
shaunngoh Oct 29, 2024
d750134
Fix QuizManagerTest class
shaunngoh Oct 29, 2024
bd86634
Merge pull request #61 from AY2425S1-CS2113-W12-4/code-refactor
shaunngoh Oct 29, 2024
c93269b
Include QuizTimer class
shaunngoh Oct 29, 2024
d0bdcf2
Merge pull request #62 from AY2425S1-CS2113-W12-4/code-refactor
shaunngoh Oct 29, 2024
fe97b88
Updated Developer Guide
naveen42x Oct 29, 2024
a5ed651
Merge pull request #63 from naveen42x/dg
naveen42x Oct 29, 2024
ffb2cb2
Updated User Guide
naveen42x Oct 29, 2024
ff105c2
Merge pull request #64 from naveen42x/dg
naveen42x Oct 29, 2024
d5b91a5
Updated Developer Guide
naveen42x Oct 29, 2024
7714c8e
Merge pull request #65 from naveen42x/dg
naveen42x Oct 29, 2024
bb2b82a
UserGuide update
YubotKwng Oct 29, 2024
886e998
Adjust error
YubotKwng Oct 29, 2024
08b7b5f
adjust for issue
YubotKwng Oct 29, 2024
1b23672
Updated Developer Guide
naveen42x Oct 29, 2024
24e444a
adjustment on failure test
YubotKwng Oct 29, 2024
3909415
Merge pull request #67 from naveen42x/dg
naveen42x Oct 29, 2024
575b378
Merge pull request #66 from YubotKwng/master
YubotKwng Oct 29, 2024
7816248
Added Topic class diagram
naveen42x Oct 29, 2024
4625e1f
Added Topic class diagram
naveen42x Oct 29, 2024
b7aac5a
Merge pull request #68 from naveen42x/dg
naveen42x Oct 29, 2024
9c2c31d
Add developer guide
shaunngoh Oct 30, 2024
d186e2f
Merge pull request #70 from AY2425S1-CS2113-W12-4/dev-guide
shaunngoh Oct 30, 2024
47db21c
no message
YubotKwng Oct 30, 2024
e3358e1
add DG
YubotKwng Oct 30, 2024
afb17f3
Add DG
YubotKwng Oct 30, 2024
66e8ed9
Merge pull request #71 from YubotKwng/master
YubotKwng Oct 30, 2024
1a67bbf
Updated UG
Oct 30, 2024
43b788b
Merge pull request #72 from Lucky-Yuan00/jinlin-dev
Lucky-Yuan00 Oct 30, 2024
60b8ceb
Updated DG
Oct 30, 2024
9f64ddb
Merge pull request #73 from Lucky-Yuan00/jinlin-dev
Lucky-Yuan00 Oct 30, 2024
d835360
Add QuizResults, QuizSession class
shaunngoh Oct 31, 2024
bca6590
Merge pull request #74 from AY2425S1-CS2113-W12-4/more-oop
shaunngoh Oct 31, 2024
73c335f
Adjust error in QuizManagerTest
shaunngoh Oct 31, 2024
7506dc6
Merge pull request #75 from AY2425S1-CS2113-W12-4/more-oop
shaunngoh Oct 31, 2024
64a255e
Add developer details for QuizManager, Parser and JavaNinja
shaunngoh Oct 31, 2024
c13cb6e
Merge pull request #76 from AY2425S1-CS2113-W12-4/add-dev-guide
shaunngoh Oct 31, 2024
19db943
Add additional developer details
shaunngoh Oct 31, 2024
5e1ba04
Merge pull request #77 from AY2425S1-CS2113-W12-4/add-dev-guide
shaunngoh Oct 31, 2024
7fb77fa
Add User Guide details
shaunngoh Oct 31, 2024
d35691f
Merge pull request #78 from AY2425S1-CS2113-W12-4/add-user-guide
shaunngoh Oct 31, 2024
a8107e3
Add additional test classes
shaunngoh Nov 5, 2024
785befe
Add methods to test classes
shaunngoh Nov 5, 2024
a822dce
Merge pull request #80 from AY2425S1-CS2113-W12-4/quiz-test
shaunngoh Nov 5, 2024
4578bbc
Improve Code Quality
shaunngoh Nov 5, 2024
2ffbd64
Improve code quality
shaunngoh Nov 5, 2024
409aa8c
Merge pull request #81 from AY2425S1-CS2113-W12-4/quiz-test
shaunngoh Nov 5, 2024
3d2fa5d
Add TopicManager and Topic Initialisation in dev
shaunngoh Nov 5, 2024
601bb8f
Merge pull request #82 from AY2425S1-CS2113-W12-4/developer-guide-det…
shaunngoh Nov 5, 2024
1551bbf
Add cli dependability to classes
shaunngoh Nov 6, 2024
b271b92
Ensure gradlew testability
shaunngoh Nov 6, 2024
57c798a
Merge pull request #83 from AY2425S1-CS2113-W12-4/cli--development
shaunngoh Nov 6, 2024
3caa28d
Add RandomQuestion Method, improve QuizResults
shaunngoh Nov 6, 2024
ce03a2c
Comply with gradlew check
shaunngoh Nov 6, 2024
a0d3203
Merge pull request #84 from AY2425S1-CS2113-W12-4/cli--development
shaunngoh Nov 6, 2024
85364d7
Fix bugs in time limit and Flashcard
shaunngoh Nov 7, 2024
9915f1d
Comply with gradlew
shaunngoh Nov 7, 2024
e7b0a3f
Comply with gradlew check
shaunngoh Nov 7, 2024
580bc20
Merge pull request #85 from AY2425S1-CS2113-W12-4/bug--fixing
shaunngoh Nov 7, 2024
1fbca53
Create PPP
naveen42x Nov 8, 2024
d2450e1
Merge pull request #88 from naveen42x/PPP1
naveen42x Nov 8, 2024
1a64ddf
Furnish details for developer guide
shaunngoh Nov 8, 2024
945a129
Merge pull request #90 from AY2425S1-CS2113-W12-4/add-details-dg
shaunngoh Nov 8, 2024
1f57364
Add missing photo
shaunngoh Nov 8, 2024
9cacaf3
Merge pull request #91 from AY2425S1-CS2113-W12-4/add-details-dg
shaunngoh Nov 8, 2024
ad00004
Add user guide details
shaunngoh Nov 8, 2024
6855703
Merge pull request #92 from AY2425S1-CS2113-W12-4/add-details-dg
shaunngoh Nov 8, 2024
02f0ef0
Cli Sequence diagram
YubotKwng Nov 8, 2024
35be1e0
Merge pull request #160 from YubotKwng/master
YubotKwng Nov 8, 2024
27b338e
Test for Cli class
YubotKwng Nov 8, 2024
a1ba81b
Checkstyle fixing
YubotKwng Nov 8, 2024
efd079a
Merge pull request #161 from YubotKwng/master
YubotKwng Nov 8, 2024
fc05394
Test for TopicManager
YubotKwng Nov 8, 2024
1d9cdfa
checkstyle fix
YubotKwng Nov 8, 2024
5c82e3c
Merge pull request #162 from YubotKwng/master
YubotKwng Nov 8, 2024
62aa9b4
test for FITB
YubotKwng Nov 8, 2024
5159e60
Merge pull request #163 from YubotKwng/master
YubotKwng Nov 8, 2024
ee1049c
Test for Parser
YubotKwng Nov 8, 2024
71687b8
Merge pull request #164 from YubotKwng/master
YubotKwng Nov 8, 2024
1157141
Header Comments for methods for classes: Storage, Topic, TopicManager
YubotKwng Nov 8, 2024
2603cfe
Merge pull request #165 from YubotKwng/master
YubotKwng Nov 8, 2024
65e49b5
Implement class and sequence diagrams for QuizSession section
Nov 9, 2024
ea5a18a
Merge pull request #167 from Lucky-Yuan00/jinlin-dev
Lucky-Yuan00 Nov 9, 2024
1e34a21
Improve JUnit Testing all the tests and complete the description in t…
Nov 9, 2024
317d5b7
Merge pull request #168 from Lucky-Yuan00/jinlin-dev
Lucky-Yuan00 Nov 9, 2024
9c759bc
Added Display time left feature and added comments
Nov 9, 2024
a3928ac
Modify formatting issues
Nov 9, 2024
2d5cc91
Modify formatting issues
Nov 9, 2024
66d4d87
Merge pull request #170 from Lucky-Yuan00/jinlin-dev
Lucky-Yuan00 Nov 9, 2024
54da0c7
Implement Project Portfolio Page (PPP)
Nov 9, 2024
1db1038
Merge pull request #171 from Lucky-Yuan00/jinlin-dev
Lucky-Yuan00 Nov 9, 2024
5bfda3f
update comments and topics
naveen42x Nov 9, 2024
1a00e81
Merge pull request #172 from naveen42x/update-topic-and-comments
naveen42x Nov 9, 2024
6247254
Create QuizTimerTest
naveen42x Nov 10, 2024
ea4d0ca
Merge pull request #173 from naveen42x/update-topic-and-comments
naveen42x Nov 10, 2024
2a65ebc
Fix checkstyle error
naveen42x Nov 10, 2024
49d9b72
Merge pull request #174 from naveen42x/update-topic-and-comments
naveen42x Nov 10, 2024
fe9cb64
Add more topics
naveen42x Nov 10, 2024
87b69fe
Merge pull request #175 from naveen42x/update-topic-and-comments
naveen42x Nov 10, 2024
d184b73
fix error to pass checks
naveen42x Nov 10, 2024
518fb60
Merge pull request #176 from naveen42x/update-topic-and-comments
naveen42x Nov 10, 2024
be94b9c
Add quizGenerator class, incomplete implementation
shaunngoh Nov 11, 2024
f98285d
Merge pull request #177 from AY2425S1-CS2113-W12-4/add-quizGenerator
naveen42x Nov 11, 2024
984889f
Yubo's PPP
YubotKwng Nov 11, 2024
651322b
Merge pull request #178 from YubotKwng/master
YubotKwng Nov 11, 2024
e83bad7
Add more comments
naveen42x Nov 11, 2024
7703d6a
Merge pull request #179 from naveen42x/update-topic-and-comments
naveen42x Nov 11, 2024
c5cc389
Update DG
naveen42x Nov 11, 2024
928d053
Merge pull request #180 from naveen42x/update-topic-and-comments
naveen42x Nov 11, 2024
1b2b04f
Modify quizGenerator class
shaunngoh Nov 11, 2024
00512c4
Merge pull request #181 from AY2425S1-CS2113-W12-4/quizGenerator
shaunngoh Nov 11, 2024
f449406
Fix bugs from PE dry run
shaunngoh Nov 11, 2024
28554e7
Merge pull request #182 from AY2425S1-CS2113-W12-4/fix--bugs
shaunngoh Nov 11, 2024
d0d2d35
Issue solved #107
YubotKwng Nov 11, 2024
6800731
fix issue Hyperlinks in UG broken #95
YubotKwng Nov 11, 2024
8aac613
fix git test
YubotKwng Nov 11, 2024
c2beda2
no message
YubotKwng Nov 11, 2024
14ba0d5
modify expected.txt to pass git test
YubotKwng Nov 11, 2024
c9f79a9
ui-test
YubotKwng Nov 11, 2024
71483db
ui-test modify
YubotKwng Nov 11, 2024
644f813
Ui-test modify
YubotKwng Nov 11, 2024
f75b6c7
Merge pull request #183 from YubotKwng/master
YubotKwng Nov 11, 2024
4453284
Improve and expand review results command
naveen42x Nov 11, 2024
008998e
Merge pull request #184 from naveen42x/v2.1n
naveen42x Nov 11, 2024
675558b
Fix Bugs
naveen42x Nov 12, 2024
fa321d3
Merge pull request #185 from naveen42x/v2.1n
naveen42x Nov 12, 2024
fe7fa75
Fix select random bug
shaunngoh Nov 12, 2024
61d8e3f
Fix more bugs
naveen42x Nov 12, 2024
9939f4e
Merge pull request #186 from naveen42x/v2.1n
naveen42x Nov 12, 2024
30f4d0b
Fix bugs
naveen42x Nov 12, 2024
98488ab
Merge pull request #187 from naveen42x/v2.1n
naveen42x Nov 12, 2024
41b67d3
Fix bug with random quiz feature
naveen42x Nov 12, 2024
8a654df
Merge pull request #188 from naveen42x/v2.1n
naveen42x Nov 12, 2024
9651713
Add shaun's project portfolio
shaunngoh Nov 12, 2024
8196ac4
Merge pull request #189 from AY2425S1-CS2113-W12-4/project-portfolio
shaunngoh Nov 12, 2024
db874ae
Fix Topic Manager DG sequence diagram.
Nov 12, 2024
e7f1ba2
Merge pull request #190 from Lucky-Yuan00/jinlin-dev
Lucky-Yuan00 Nov 12, 2024
59f14fd
pass checks
naveen42x Nov 12, 2024
7a95e61
Merge pull request #191 from naveen42x/v2.1n
naveen42x Nov 12, 2024
a200375
Add additional PPP details
shaunngoh Nov 12, 2024
bf0dabe
Merge pull request #192 from AY2425S1-CS2113-W12-4/project-portfolio
shaunngoh Nov 12, 2024
a36a0cb
Finish making the QuizResults class and the sequence diagram.
Nov 12, 2024
67533b0
Merge pull request #193 from Lucky-Yuan00/jinlin-dev
Lucky-Yuan00 Nov 12, 2024
f8e411d
pass checks
naveen42x Nov 12, 2024
5b61aa7
Merge pull request #194 from naveen42x/v2.1n
naveen42x Nov 12, 2024
d6c95c3
Add PPP detail
Nov 12, 2024
e022434
Merge pull request #195 from Lucky-Yuan00/jinlin-dev
Lucky-Yuan00 Nov 12, 2024
4b8b672
Update Docs
naveen42x Nov 12, 2024
bca25f9
Merge branch 'master' into v2.1n
naveen42x Nov 12, 2024
2320e35
Merge pull request #197 from naveen42x/v2.1n
naveen42x Nov 12, 2024
36b5392
Delete results
shaunngoh Nov 12, 2024
9b82f73
Fix merge
shaunngoh Nov 12, 2024
0a72dda
Update UG
naveen42x Nov 12, 2024
a7946fe
v2.1
naveen42x Nov 12, 2024
45e28d5
Merge pull request #198 from naveen42x/v2.1n
naveen42x Nov 12, 2024
e0a9e10
Update UG
naveen42x Nov 12, 2024
79f2640
Merge pull request #199 from naveen42x/v2.1n
naveen42x Nov 12, 2024
a0f6d9d
Add previously removed code
Nov 12, 2024
5cf8800
Merge remote-tracking branch 'refs/remotes/origin/master'
shaunngoh Nov 12, 2024
10d028b
Merge pull request #200 from Lucky-Yuan00/jinlin-dev
Lucky-Yuan00 Nov 12, 2024
33b2a7d
Fix gradlew checks
shaunngoh Nov 12, 2024
4eabd67
Fix runtest.sh
shaunngoh Nov 12, 2024
74665b7
fix gradlew checks
shaunngoh Nov 12, 2024
f87b4c7
Merge pull request #201 from AY2425S1-CS2113-W12-4/fix--gradlew
shaunngoh Nov 12, 2024
2ba645d
fix for hyperlink
YubotKwng Nov 12, 2024
d8e679f
Merge pull request #202 from YubotKwng/master
YubotKwng Nov 12, 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
3 changes: 3 additions & 0 deletions META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Manifest-Version: 1.0
Main-Class: seedu.javaninja.JavaNinja

18 changes: 3 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Duke project template
# Java Ninja

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.
Java Ninja is a command-line interface (CLI) learning tool focused on helping beginner programmers enhance their understanding of fundamental programming concepts. This tool provides different modes of assessments with various difficulty levels as you progress.

## Setting up in Intellij

Expand All @@ -10,19 +10,7 @@ Prerequisites: JDK 17 (use the exact version), update Intellij to the most recen
1. **Import the project _as a Gradle project_**, as described [here](https://se-education.org/guides/tutorials/intellijImportGradleProject.html).
1. **Verify the setup**: After the importing is complete, locate the `src/main/java/seedu/duke/Duke.java` file, right-click it, and choose `Run Duke.main()`. If the setup is correct, you should see something like the below:
```
> Task :compileJava
> Task :processResources NO-SOURCE
> Task :classes

> Task :Duke.main()
Hello from
____ _
| _ \ _ _| | _____
| | | | | | | |/ / _ \
| |_| | |_| | < __/
|____/ \__,_|_|\_\___|

What is your name?

```
Type some word and press enter to let the execution proceed to the end.

Expand Down
9 changes: 5 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,19 @@ test {
}

application {
mainClass.set("seedu.duke.Duke")
mainClass.set("seedu.javaninja.JavaNinja")
}

shadowJar {
archiveBaseName.set("duke")
archiveBaseName.set("javaninja")
archiveClassifier.set("")
}

checkstyle {
toolVersion = '10.2'
}

run{
run {
standardInput = System.in
}
enableAssertions = true
}
34 changes: 34 additions & 0 deletions data/Questions.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
Loops | TrueFalse | Java is a programming language. | true
Loops | TrueFalse | A while loop will execute at least once. | false
Loops | TrueFalse | A for loop is used when the number of iterations is known. | true
Loops | TrueFalse | A do-while loop will execute its body before checking the condition. | true
Loops | TrueFalse | A for-each loop is primarily used for iterating over collections. | true
Loops | TrueFalse | A while loop is best used when the number of iterations is known. | false
Loops | TrueFalse | A break statement can be used to exit a loop early. | true
Loops | TrueFalse | A continue statement skips the current iteration of a loop. | true
Loops | TrueFalse | A do-while loop will never execute if the condition is false initially. | false
Loops | TrueFalse | Infinite loops can only be created using a while loop. | false
Loops | TrueFalse | You can nest loops inside one another in Java. | true
Loops | Mcq | Which of the following is a loop structure in Java? | b | a) if-else | b) for | c) switch | d) try-catch
Loops | Mcq | Which loop guarantees at least one iteration? | a | a) do-while | b) for | c) while | d) for-each
Loops | Mcq | Which keyword is used to exit a loop early? | c | a) continue | b) return | c) break | d) stop
Loops | Mcq | Which type of loop is used when the number of iterations is fixed? | b | a) while | b) for | c) do-while | d) foreach
Loops | Mcq | What is the correct syntax for a for loop in Java? | a | a) for (int i = 0; i < 10; i++) | b) for (i = 0; i < 10; i++) | c) for int i : range(10) | d) foreach (int i in range(10))
Loops | Mcq | Which of the following loop types can be infinite? | a | a) while | b) do-while | c) for | d) All of the above
Loops | Mcq | Which of the following loops is suitable for iterating over a collection? | d | a) while | b) do-while | c) simple for | d) for-each
Loops | Mcq | What happens if the condition in a for loop is omitted? | c | a) Compilation error | b) Infinite loop | c) The loop continues until it is explicitly broken | d) None of the above
Loops | Mcq | Which keyword can be used to skip to the next iteration of a loop? | a | a) continue | b) skip | c) next | d) pass
Loops | Mcq | What is the output of an infinite while loop without a condition? | b | a) Compilation error | b) Loop continues indefinitely | c) Loop runs once | d) None of the above
FITB | FillInTheBlank | The keyword used to declare a method that does not return a value is `____`. | void
FITB | FillInTheBlank | The `____` keyword is used to create a new object in Java. | new
FITB | FillInTheBlank | In Java, the method that runs when the program starts is called `____`. | main
FITB | FillInTheBlank | The access modifier `____` allows visibility within the same package and subclasses. | protected
FITB | FillInTheBlank | The `____` statement is used to terminate the execution of a method and return a value. | return
FITB | FillInTheBlank | To compare two strings in Java, you use the `____` method. | equals
FITB | FillInTheBlank | In Java, arrays have a fixed `____` once they are initialized. | size
FITB | FillInTheBlank | A `____` is a block of code that can be called with a set of arguments and performs a specific task. | method
FITB | FillInTheBlank | The `____` keyword is used to inherit properties and methods from another class. | extends
FITB | FillInTheBlank | The keyword `____` is used to implement an interface in a class. | implements
FITB | FillInTheBlank | The keyword used to define a class is `____`. | class
FITB | FillInTheBlank | A constructor in Java is used to create an instance of a `____`. | object
FITB | FillInTheBlank | The keyword used to declare a constant in Java is ___ | final
16 changes: 9 additions & 7 deletions docs/AboutUs.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
# 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) | Naveen | [Github](https://github.com/naveen42x) | [Portfolio](docs/team/naveen42x.md)
![](https://via.placeholder.com/100.png?text=Photo) | Zhang Zhitong | [Github](https://github.com/Zhang-Zhitong) | [Portfolio](docs/team/ZhangZhitong.md)
![](https://via.placeholder.com/100.png?text=Photo) | Shaun Goh | [Github](https://github.com/shaunngoh) | [Portfolio](docs/team/shaunngoh.md)
![](https://via.placeholder.com/100.png?text=Photo) | Wang Yubo | [Github](https://github.com/YubotKwng) | [Portfolio](docs/team/yubotkwng.md)
![](https://via.placeholder.com/100.png?text=Photo) | Jinlin Wang | [Github](https://github.com/Lucky-Yuan00) | [Portfolio](docs/team/johndoe.md)

24 changes: 24 additions & 0 deletions docs/DeveloperGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,30 @@

## Design & implementation

### Design

#### Architecture

Main components of the architecture:

`Main` (consisting of class `JavaNinja`) is in charge of the app launch and shut down.
1. At app launch, it initialises the components in the correct order and connects them with each other
Copy link

Choose a reason for hiding this comment

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

Perhaps there could have been more illustration to show the correct order of initialisation.

2. At shut down, it shuts down the other components and invokes cleanup methods

The bulk of the app's work is done by the respective components:
1. `Cli`: It handles the user interface of the app
2. `Parser`: The command executor
3. `QuizManager`: Holds the data of the App in memory
4. `Storage`: Reads data from, and writes data to, the hard disk.

`Commons` represent a collection of classes used by other components.

How the architecture components interact with each other:
Copy link

Choose a reason for hiding this comment

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

Should this be made into a header to increase clarity?


The Sequence Diagram below shows how the components interact with each other for the scenario where the user issues the command `add Flashcard /q what's 2+3 /a 5`

Choose a reason for hiding this comment

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

Since you gave a sequence diagram for add Flashguard, you should have a flow of events (for that feature) above it to explain what goes on.

![image](https://github.com/user-attachments/assets/1dd443de-b538-4fb8-b4d1-3bff4643b3dd)

Choose a reason for hiding this comment

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

Please include the picture in your repository and link it through your repository instead.

Choose a reason for hiding this comment

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

Consider using less colours for your sequence diagrams, and use normal rectangle instead of rounded ones


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


Expand Down
21 changes: 0 additions & 21 deletions src/main/java/seedu/duke/Duke.java

This file was deleted.

81 changes: 81 additions & 0 deletions src/main/java/seedu/javaninja/Cli.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
package seedu.javaninja;

import java.io.IOException;
import java.util.Scanner;

/* Manages input by user */
public class Cli {
private QuizManager quizManager;
private Scanner scanner;

public Cli() {
quizManager = new QuizManager();
scanner = new Scanner(System.in);
}

public void start() throws IOException {
System.out.println("Welcome to Java Ninja!");
System.out.println("'view' to view topics");
System.out.println("'select [topic]' to select a topic");
System.out.println("'review' to review past results");
System.out.println("'help' for a list of commands");
System.out.println("'quit' to exit the program");
System.out.println("'exit' to exit the quiz, activate only while doing the quiz");

while (true) {
System.out.print("> ");
String input = scanner.nextLine().trim();
String command = processCommand(input);

if (command.equals("quit")) {
break;
}

switch (command) {
case "view":
quizManager.printTopics();
break;
case "select":
selectTopic(input);
break;
case "review":
System.out.println("Reviewing your past results:");
System.out.println(quizManager.getPastResults());
break;
case "help":
printHelp();
break;
case "add":
quizManager.addQuestionByUser(input);
break;
default:
System.out.println("Invalid input. Type 'help' for a list of commands.");
}
}
System.out.println("Goodbye!");
scanner.close();
}

private void selectTopic(String input) {
String[] parts = input.split(" ", 2);
if (parts.length < 2) {
System.out.println("Please specify a topic to select.");
} else {
quizManager.selectTopic(parts[1], scanner);
}
}

public String processCommand(String input) {
return input.split(" ")[0].toLowerCase();
}

// Help message
private void printHelp() {
System.out.println("List of available commands:");
System.out.println("'view' - View available topics");
System.out.println("'select [topic]' - Start a quiz on a specific topic");
System.out.println("'review' - Review all your quiz results");
System.out.println("'help' - Show this help message");
System.out.println("'quit' - Exit the program");
}
}
35 changes: 35 additions & 0 deletions src/main/java/seedu/javaninja/FillInTheBlank.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
package seedu.javaninja;

public class FillInTheBlank extends Question {

public FillInTheBlank(String question, String answer) {
super(question, answer);
}

@Override
public boolean checkAnswer(String answer) {
// Normalize the user's answer and the correct answer for comparison
String normalizedUserAnswer = normalizeAnswer(answer);
String normalizedCorrectAnswer = normalizeAnswer(correctAnswer);
return normalizedUserAnswer.equals(normalizedCorrectAnswer);
}

@Override
public void printOptions() {
// No options to print for fill-in-the-blank questions
;
}

// Method to normalize the answer for comparison
private String normalizeAnswer(String answer) {
if (answer == null) {
return "";
}
// Convert to lowercase and strip any leading or trailing whitespace
return answer.toLowerCase().trim();
}

public String getQuestionType() {
return "FITB";
}
}
27 changes: 27 additions & 0 deletions src/main/java/seedu/javaninja/Flashcard.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
package seedu.javaninja;

public class Flashcard extends Question {

public Flashcard(String question, String answer) {
super(question, answer);
}

@Override
public boolean checkAnswer(String answer) {
return correctAnswer.equalsIgnoreCase(answer);
}

@Override
public void printOptions() {
;
}

public String getQuestionType () {
return "FC";
}





Copy link

Choose a reason for hiding this comment

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

unnecessary blank space can be removed.

}
11 changes: 11 additions & 0 deletions src/main/java/seedu/javaninja/JavaNinja.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package seedu.javaninja;

import java.io.IOException;

public class JavaNinja {

public static void main(String[] args) throws IOException {
Cli cli = new Cli();
cli.start();
}
}
25 changes: 25 additions & 0 deletions src/main/java/seedu/javaninja/Mcq.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package seedu.javaninja;

import java.util.List;

public class Mcq extends Question {
private List<String> options;

public Mcq(String text, String correctAnswer, List<String> options) {
super(text, correctAnswer);
this.options = options;
}

@Override
public boolean checkAnswer(String answer) {
return correctAnswer.equalsIgnoreCase(answer);
}

@Override
public void printOptions() {
for (String option : options) {
System.out.println(option);
}
}

}
22 changes: 22 additions & 0 deletions src/main/java/seedu/javaninja/Question.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package seedu.javaninja;

/* Represents a question that could be of different types (MCQ / True or False) */

public abstract class Question {
protected String text;
protected String correctAnswer;

public Question(String text, String answer) {
this.text = text;
this.correctAnswer = answer;
}

public String getText() {
return this.text;
}

public abstract boolean checkAnswer(String answer);

public abstract void printOptions();

}
Loading
Loading