Overview
LearnVocuabulary is a desktop application for people who prefer to use an offline version of the dictionary for learning purposes.
Summary of contributions
-
Major enhancement: added the trivia and trivia answer commands
-
What it does: Allows the user to start a trivia of 10 questions based on his/her vocabulary list. Finishing the 10 questions will show the user how well he/she has done in the trivia.
-
Justification: This feature allows the user to practice what they have learnt using LearnVocabulary and engages in active learning for the user. It also helps the user in remembering new words as well as provides the user an indication of how well they are doing.
-
-
Minor enhancement: Added the meaning class and updated the word class to accept the meaning attribute.
-
Code contributed: [Functional code]
-
Other contributions:
-
Project management:
-
Managed releases
v1.0
-v1.4
(3 releases) on GitHub
-
-
Enhancements to existing features:
-
Documentation:
-
Did skeleton for the User Guide: (#128)
-
-
Community:
-
Contributions to the User Guide
Given below are sections I contributed to the User Guide. They showcase my ability to write documentation targeting end-users. |
Trivia game: trivia
A trivia game mode where it outputs meaning of words stored in vocabulary list and prompts the user to input its name.
trivia
will output at most 10 questions depending on the size of the user’s vocabulary list.
Format trivia
To answer the trivia question, simply input the answer in the command box. Answer to the trivia questions are case-insensitive.
Format WORD
Other commands in trivia
Show the current trivia question.
Format triviaShow
Exits trivia game.
Format triviaExit
[NOTE] The above commands can only be used when in trivia
and the commands are case-sensitive.
Contributions to the Developer Guide
Given below are sections I contributed to the Developer Guide. They showcase my ability to write technical documentation and the technical depth of my contributions to the project. |
Trivia feature
The trivia function is facilitated by LearnVocabulary
.
Besides storing a UniqueWordList
, LearnVocabulary
also stores the current trivia question as triviaQuestion
and stores a list of trivia questions is triviaQuestionList
.
Scores for a trivia game are also stored using currentScore
and maxScore
.
Additionally, it also implements the following operations:
-
setTriviaList
— sets the trivia question list based on the current vocabulary list -
setTrivia
— sets the trivia question based ontriviaQuestionList
-
getTrivia
— outputs the current trivia question. -
updateScore
— adds 1 to the the`currentScore` -
clearTrivia
— clears the current trivia question as well as removing it from thetriviaQuestionList
-
isTriviaMode
— a boolean to indicate whether the model is currently in trivia mode. -
toggleTriviaMode
— toggle trivia mode
These operations are exposed in the Model
interface as Model.setTrivia()
and Model.getTrivia()
.
Outlined below is how the trivia function operates at each step:
Step 1. The user inputs trivia in the CLI.
Step 2. TriviaCommand.execute()
checks lastShownList
to see if it is empty.
If lastShownList is empty, TriviaCommand.execute() will terminate and a message will be displayed to the user indicating that the user has to add words in before trivia can be used
|
Step 3. TriviaCommand.execute()
calls toggleTriviaMode
to indicate that LearnVocabulary is in trivia mode.
While in trivia mode, every command the user types will be parsed as TriviaAnsCommand . Trivia mode can be exited by either completing the trivia or typing "triviaExit"
|
Step 4. TriviaCommand.execute()
now calls Model.setTriviaList()
to set the trivia question within LearnVocabulary
.
Step 5. TriviaCommand.execute()
calls Model.getTrivia()
and outputs to the user.
Below shows a sequence diagram of how the trivia feature works.
Answer
The answer command is indicated as TriviaAnsCommand
in commands
. It will take in arguments passed in by the user and checks whether it is the correct/wrong answer to the current trivia question.
Outlined below is how the answer function operates:
Step 1: User enters his/her argument.
Attempting to call the answer command without first calling trivia will result in an error.
|
Step 2: TriviaAnsCommandParser
processes the argument and parses it to TriviaAnsCommand
.
If the user inputs triviaExit or triviaShow , the inputs will be processed as commands instead.
|
Step 3: TriviaAnsCommand.execute()
checks the passed argument is the same word as triviaQuestion
in LearnVocabulary
.
Step 4: Outputs a correct or wrong message based on the result in step 3.
Below shows a sequence diagram of how the answer feature works.