PROJECT: FlashCard Pro
Overview
FlashCard Pro is an application designed for students of all fields who prefer to use a desktop app for managing flashcards, as well as teachers who would like to provide resources (in the form of custom flashcard decks) to support their students’ learning.
It has a GUI but most of the user interactions happen using a CLI (Command Line Interface). The GUI is to support the user if he/she prefers using the GUI to interact with FlashCard Pro.
Summary of contributions
-
Major enhancement: expanded the functionality and type of FlashCards.
-
Worked on parsing and validation of inputs for
create
,add
(Front and Back flash card and Multiple Choice flash card),edit
(Front and Back flash card and Multiple Choice flash card),delete
CLI functionality. -
Allows the user to assign priorities to each flash card.
-
Allows the creation of a random set of flash cards for the
test
function. The set of flash cards created for the test will have a proportion of high priority and low priority cards. -
Expanded the cards to support Multiple Choice cards on top of ordinary Front and Back flash cards.
-
Added support for shuffling choices of Multiple Choice cards when displaying the Multiple Choice cards in
test
mode. -
Wrote JUnit tests for MultipleChoiceCard and FrontBackCard.
-
-
Justification:
-
This feature allows the user to explore multiple modes of learning using flash cards.
-
The priorities also allow the user to customize his/her own test deck set, so that he/she can vary the difficulty of the test.
-
The creation of test subset also allows the user to take the test with a different set of cards each time, allowing the user to learn more from each test.
-
The shuffling allows the user to take the test of Multiple Choice Cards with greater learning value since the options are changed.
-
-
Highlights:
-
This enhancement allowed the user to have more flexibility in exploring various types of flash cards to support the usage of the
test
function. -
In addition, this feature is challenging because it requires in-depth analysis and design of the Regex parser to determine which card type (Front and Back card or Multiple Choice card) is created.
-
Also, this feature is tightly related to other components, such as:
-
In test mode, the cards need to be designed such that the display and logic for test is coherent with the designs of multiple flash cards.
-
-
-
Code contributed: [Functional code][Test code]
-
Other contributions:
-
Project management:
-
Managed releases
v1.1
-v1.3
(3 releases) on GitHub [Releases on Github]
-
-
Testing:
-
Enhancements to existing features:
-
Wrote the regular expression parsing, user input validation, and command execution for:
-
add
Front and Back, Multiple Choice Card addition. -
edit
Front and Back Card, Multiple Choice Card. -
delete
Flash card and deck.
-
-
-
Documentation:
-
Did documentation for the CLI commands in the User Guide. (See Contributions to the User Guide below)
-
Did documentation in Developer Guide. (See Contributions to the Developer Guide below)
-
-
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. |
Create new empty deck: create
Creates an empty deck in FlashCard Pro library.
Format: `create deck/DECK_NAME.
Note :
Examples:
-
create deck/german
Creates a new empty deck named german
.
Add new Front Back card or Multiple Choice Card to deck: add
Adds a Front Back card or Multiple Choice Card in a deck of FlashCard Pro library.
Format: add deck/DECK_NAME [priority/PRIORITY_LEVEL] front/FRONT_TEXT back/BACK_TEXT [choice/CHOICE_TEXT]…
Examples:
-
add deck/german front/hello back/moin moin
Creates a new Front Back card in deck german
.
-
add deck/german front/hello back/1 choice/hello choice/bye choice/zzz
Creates a new Multiple Choice card in deck german
, with the answer as the first choice/
parameter, hello.
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. |
FlashCard
:
-
There are 3 types of cards used by our App, the
JavascriptCard
,FrontBackCard
andMultipleChoiceCard
.
-
JavascriptCard
andFrontBackCard
implements fromFlashCard
, an interface class. -
MultipleChoiceCard
inherits fromFrontBackCard
. -
The interface class
FlashCard
also implementsJsonInterface
class to allow loading and saving to Json format.
Refer to the activity diagram below to see the process of creating a MultipleChoiceCard
:
For the MultipleChoiceCard
, the choices provided by the user must be unique, i.e. there cannot be any duplicate in the choices provided.
If a duplicate choice is detected, then the creation of the MultipleChoiceCard
will not be successful.
Each FlashCard has an associated priority level, which the user can indicate his/her value of the importance of the card.
The priority levels are described below:
Priority | Value | Intended Action |
---|---|---|
HIGH_PRIORITY |
10 |
Valued as important by user, should be tested more often |
LOW_PRIORITY |
1 |
Valued, but less important by user, should be tested less often |
The sequence diagram below shows how the ExamRunner
component can use the createSubsetForTest()
method in the Deck
and make use of the priorities associated with the FlashCards
to create a test that emphasises the FlashCards
that the user deems as important.
-
Step 1: Constructor of
ExamRunner
is called. -
Step 2: In the constructor of
ExamRunner
, a method call is made toDeck
to create a subset of cards for test. -
Step 3: If there are less than 10 cards in
Deck
, return all the cards. -
Step 4 - 10: Return a set of cards with both
HIGH_PRIORITY
andLOW_PRIORITY
cards, which the proportion is weighted at 60% to 40% ratio respectively. -
Step 11:
Deck
returns the test set toExamRunner
.
Design Considerations
Aspect: how to store and select the HIGH_PRIORITY
and LOW_PRIORITY
cards
-
Alternative 1: Use a priority queue to store the cards
-
Pros: Allows the user to test the cards according to
HIGH_PRIORITY
cards first, effectively choosing onlyHIGH_PRIORITY
cards first, thenLOW_PRIORITY
cards. -
Cons: Certain
LOW_PRIORITY
cards may not be tested if the test set size is smaller than the number ofHIGH_PRIORITY
cards -
Cons: FlashCard Pro cannot have the flexibility of letting the user select the number of
LOW_PRIORITY
cards in the test set.
-
-
Alternative 2: (Current Choice) Maintain two lists of cards,
HIGH_PRIORITY
andLOW_PRIORITY
cards-
Pros: Can control the ratio of
HIGH_PRIORITY
andLOW_PRIORITY
cards in the test set created -
Pros: Have the flexibility to randomize the card order and choose a random set each time
-
Cons: FlashCard Pro cannot have the flexibility of letting users assign more than 2 priority levels
-
Use case: Timed Test with a deck of Multiple Choice Cards
MSS
-
User enters command to start test on a deck.
(System creates a test subset)
-
System gets the deck the user wants to test on.
-
System starts test session.
-
System randomises the choice ordering.
-
System displays the front of card and choices.
-
User enters the choice of correct answer.
-
System evaluates the answer.
-
System shows the correctness of the answer.
-
System moves to next card.
Steps 4-9 are repeated until there are no more cards in the test set.
Use case ends.
Extensions
-
1a. System does not find a deck with the deck name specified by the user
-
1a1. System tells user that there is no deck with specified name.
-
1a2. System exits test creation.
Use case ends.
-
-
1b. System has no decks in library.
-
1b1. System tells user that there are no decks in the library.
-
1b2. System exits test creation.
Use case ends.
-
-
6a. User enters an invalid choice.
-
6a1. System checks if choice is valid.
-
6a2. System tells User that choice entered is invalid.
Steps 6a1-6a3 repeats 3 times.
-
6a4. User enters invalid choice for 4th time.
-
6a5. System receives invalid choice for 4th time.
-
6a6. System terminates test.
-
6a7. System tells User that test has terminated due to incorrect inputs.
Use case ends.
-
Use case: Creating a Multiple Choice Card
MSS
-
User enters command to create a MCQ Card to a deck.
-
System starts MCQ Card creation.
-
System stores MCQ card in deck.
Use case ends.
Extension
-
1a. User enters duplicated choices.
-
1a1. System detects duplicated choices in choices provided by user.
-
1a2. System tells User that there are duplicates in choices provided.
-
1a3. System ends card creation.
Use case ends.
-