PROJECT: Flashmind


Overview

Flashmind is a CLI-based flashcard app designed to help students memorise and revise important content. It is used mainly for questions that can be answered with a short answer or several MCQ choices.

Summary of contributions

  • Major enhancement: added the ability to start a quiz on a series of flashcards

    • What it does: Allows the user to start a timed quiz on a series of flashcards based on their tags. Users are able to choose one or multiple tags to quiz themselves on.

    • Justification: This feature is a great enhancement for users who are looking to memorise content. Instead of just looking at the flashcard, users are able to test themselves in a timed condition and receive feedback from the system on whether their answer is correct.

    • Highlights: This enhancement required a holistic understanding of how commands are received. The quiz function required an implementation of quiz mode, which locks certains command and allows a new set of commands to be executed.

    • Credits: My teammate, Zhi Wei, helped to implement the timer in the quiz mode.

  • Major enhancement: added the ability to add two different types of flashcard: MCQ and ShortAnswer

    • What it does: Allows the user to choose whether they want their flashcard to have MCQ options or simply be a short answer flashcard.

    • Justification: This feature enhances the user’s learning experiences as flashcards are now more versatile, allowing users to have MCQ options for questions that are harder to remember.

    • Highlights: This enhancement required a modification of storage, as well as a refactoring of the code to distinguish between MCQ and Short Answer flashcards.

  • Minor enhancement:

    • Split up the UI to return consecutive flashcards and the result to different displays.

  • Code contributed: [Functional code] [Test code]

  • Other contributions:

    • Enhancements to existing features:

      • Wrote additional tests for existing features to increase coverage

    • Documentation:

      • Updated relevant sections of User Guide for all commands in quiz mode: #85

    • Community:

      • Reviewed PR for treasurerPro (tP) (with non-trivial review comments): #30

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.

Quiz mode

Starts a quiz using a particular flashcard index or with a with an optional time limit with units in seconds.
Format:

Format: quiz INDEX [s/TIME_LIMIT]

  • Start a quiz using the flashcard with given index.

  • User can answer the flashcard using the flip command (see 3.8).

  • If the quiz is not answered within the time limit, FlashMind will skip the quiz and mark it as wrong.

  • If the quiz time is not specified, the default time limit will be 15 seconds.

Examples:

  • quiz 8: start a quiz on the flashcard number 8 with a default time limit of 15 seconds.

  • quiz 8 t/10 : start a quiz on the flashcard number 8, given time limit 10 seconds.

Once a quiz starts, users will be unable to use other commands such as add, list or delete. To exit quiz mode, either answer the flashcard or use end

Quiz Tag mode

Starts a continuous quiz on a tag or a series of tags and an optional time limit with units in seconds.
Format:

Format: quiztag t/TAG…​ [s/TIME_LIMIT]

  • Starts a continuous quiz on all flashcards in the given tags

  • Users can continuously use the flip command to answer the series of flashcards (see 3.8).

  • If the quiz time is not specified, the default time limit will be 15 seconds.

Examples:

  • quiztag t/mathematics t/geography : start a quiz on all the flashcards with tag mathematics and geography.

  • quiztag t/mathematics s/30 : start a quiz on all flashcards with tag mathematics with each quiz a time limit of 30 seconds.

Flip a flashcard

Only usable in quiz mode (i.e after a quiz or quiztag command)

Format: flip ANSWER

  • Short answer flashcards will accept any answer.

  • MCQ flashcards will only accept numbers as an answer. The number must match an index of the choices.

Example 1: MCQ Flashcard

After quiztag t/geography, the flashcard below is shown:

What is the tallest mountain in the world?

Definitions: The answer is Mount Everest.

Tags: [geography]

Choices:

  1. Mount Fuji

  2. Mount Everest

The user can type flip 2 to answer the flashcard correctly.

Example 2: Short Answer Flashcard

What is the lowest playing register of the clarinet called?

Definitions: Range of E3 to Bb4

Tags: [music]

The user will then type flip Chalumeau to answer the flashcard correctly.

After using the flip command, users should receive feedback on whether they’ve answered the flashcard correctly. If the answer was wrong, the correct answer will be provided. The scores of the flashcard will then be updated accordingly.

End quiz mode

Only usable in quiz mode(i.e after a quiz or quiztag command).

Format: end

  • Used to end a quiz if the user wants to stop the quiz without answering the flashcard

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.

Logic component

LogicClassDiagram
Figure 1. Structure of the Logic Component

API : Logic.java

  1. Logic uses the FlashcardListParser class to parse the user command.

  2. This results in a Command object which is executed by the LogicManager.

  3. The command execution can affect the Model (e.g. adding a Flashcard).

  4. The result of the command execution is encapsulated as a CommandResult object which is passed back to the Ui.

  5. In addition, the CommandResult object can also instruct the Ui to perform certain actions, such as displaying help to the user.

Given below is the Sequence Diagram for interactions within the Logic component for the execute("delete 1") API call.

DeleteSequenceDiagram
Figure 2. Interactions Inside the Logic Component for the delete 1 Command
The lifeline for DeleteCommandParser should end at the destroy marker (X) but due to a limitation of PlantUML, the lifeline reaches the end of diagram.

Quiz Tag feature

Alternatively, users can choose to quiz a series of tags instead of a single card. A list of flashcards will then be added to the list of quizable cards, which also triggers quiz mode, allowing users to use the flip command to answer flashcards consecutively. The following sequence diagram shows how the quiztag command works:

QuizTagSequenceDiagram
Figure 3. Component interactions for any quiztag command

Calling a quiztag command triggers the quiz mode, which is stored as a boolean in the FlashcardListParser. This is done with the consideration that there are different functions that can start the quiz mode (i.e quiz, quiztag), and others that can end the quiz mode (i.e flip, end, exit).

During quiz mode, the flip command can be called consecutively for as long as there are flashcards left in the quiz, as shown below:

FlipSequenceDiagram
Figure 4. Flip command running and interact with the parser to toggle quiz mode

The flip command interacts with the model to check if there are any quizable flashcards. If there are none, the flip command toggles the quiz mode in FlashcardListParser off.

Given below is a design consideration that I’ve included in the Developer Guide for a feature implemented.

Aspect: Quiz Mode
  • Alternative 1 (current choice): A static boolean is stored in the FlashcardListParser to indicate whether the application is currently in quiz mode. Being in quiz mode allows access to some commands and disables others.

    • Pros: It is easy to toggle Quiz mode on and off from the various commands as it is a static boolean and can be accessed easily.

    • Cons: It violates the Single Responsibility Principle as the parser now stores information vital to the logic of the application, besides parsing arguments.

  • Alternative 2: Store the Quiz mode boolean inside Logic Manager.

    • Pros: It adheres better to software engineering principles as variables affect the logic of the programme should be stored in the logic manager.

    • Cons: As Quiz mode heavily affects the parsing of the commands, the boolean has to be passed to and fro several layers, making it harder for commands to toggle quiz mode on and off.

PROJECT: Flashmind