User Guide
DSAce is a desktop app for creating flashcards and practising quiz questions for CS2040s, optimized for use via a Command Line Interface (CLI) while still having the benefits of a Graphical User Interface (GUI). If you can type fast, DSAce can get your revision done faster than traditional GUI apps.
Table of Contents
- Quick start
- Introduction
- FAQ
- Command Summary
Quick start
-
Ensure you have Java
11or above installed in your Computer. -
Download the latest
[CS2030-T14-2][DSAce].jarfrom here. -
Copy the file to the folder you want to use as the home folder for the DSAce app.
-
Double-click the file to start the app. The GUI similar to the one below should appear in a few seconds. This GUI is the flashcard interface of the DSAce app.

NOTE: DSAce is used for storing flashcards that have a name, definition, tags, and priority level. Whenever the app is started up, the user will not be able to view the definitions of all the flashcards. This is so that the flashcards can be used as practice for remembering CS2040S definitions. Hence, in order to view or hide the definitions, the user must use the flashcard flip feature. To learn more about this feature, go to this section.
-
Type the command in the command box at the top of the interface and press Enter to execute it. e.g. typing
helpand pressing Enter will open the help window.
Some example commands you can try:-
list: Lists all flashcards. -
addn/Insertion Sort d/Worse case: O(n^2): Adds a flashcard with the nameInsertion Sortand the definitionWorse case: O(n^2)to the current list. -
edit1 n/BubbleSort d/Average case: O(n^2): Edits the name and definition of the first flashcard in the current list to beBubbleSortandAverage case: O(n^2)respectively. -
sortdesc: Sorts all flashcards in descending order of priority. -
findn/Heap: Finds all flashcards with names containing the keywordHeap. -
delete3: Deletes the third flashcard shown in the current list. -
flip2: Flips the second flashcard shown in the current list. -
clear: Deletes all flashcards. -
enter quiz: Enters Quiz mode. You should see a change in interface to quiz mode.
-
start attempt: Starts a new quiz attempt. -
answer1 a/true: Answers the first quiz question in the displayed quiz question list. -
end attempt: Ends the current quiz attempt.
start attempt,answer, andend attemptare commands that are valid only in the quiz interface. -
-
leave quiz: Leaves Quiz mode. -
performance: Enters the performance interface.-
view1: Views the results of the first quiz attempt. -
list: Lists all past quiz attempts.
viewandlistare the only valid commands in the performance interface. -
-
exit: Exits the app.
-
-
Refer to subsequent sections for more details about each command.
-
All flashcards and data on past quiz attempts will be stored in the home folder. In particular, the flashcard data will be stored in a JSON file named
DSAce.json, and data on past quiz attempts will be stored in a .txt file namedperformance.txt. Note thatperformance.txtis mean for data storage purposes only, so the data is not stored in a readable format.
Introduction
The DSAce app consists of three distinct interfaces. The first interface is the flashcard interface, where the user can access flashcard-related functionality. An example of how the flashcard interface appears is shown in the image below.

The second interface is the quiz interface, where the user can attempt quiz questions. An example of how the quiz interface appears is shown in the image below. Note that the quiz question list cannot be modified by the user i.e. the quiz questions are fixed.

The third interface is the performance interface, where the user can view the results of past quiz attempts. An example of how the performance interface appears
is shown in the image below. Note that the performance interface can be accessed using two different methods: firstly, by entering the performance command in the command box of either the flashcard or quiz interface, and secondly, by clicking on the performance option in the top menu bar of either the flashcard or quiz interface.

Notes about the command format:
-
Listed below are three separate sets of commands for the flashcard, quiz, and performance interfaces. Unless explicitly stated, a command for a particular interface will not work in another interface.
eg: add n/name d/definition cannot be used in the quiz and performance interfaces. -
Words in
UPPER_CASEare parameters that must be specified by the user.
e.g. inadd n/NAME,NAMEis a compulsory parameter. -
Parameters enclosed in square brackets are optional.
e.g. inadd n/NAME [t/HIGH],HIGHis an optional parameter. -
Parameters can be in any order.
e.g. if the command specifiesn/NAME d/DEFINITION,d/DEFINITION n/NAMEis also acceptable. -
Commands are case-sensitive unless stated otherwise. e.g.
Helpis not a valid command.
General Commands
Only commands listed in this section are valid in the flashcard interface.
Viewing help : help
Opens up a help window containing a link to the user guide.

Format: help
Exiting the program : exit
Exits the program.
Format: exit
Note: exit only works in the main window, which is the interface for Flashcard and Quiz modes. Hence,
it does not work in the popup window of Performance.
Flashcard Commands
Only commands listed in this section are valid in the flashcard mode.
Adding a flashcard : add
Adds a flashcard to the flashcard list.
Format: add n/NAME d/DEFINITION [t/TAG] [p/PRIORITY]
Examples:
add n/Bellman Ford Search d/runtime: O(VE) p/highadd n/Bubble Sort d/runtime: O(n^2) t/sorting t/midterm
Note:
- Names should only contain alphanumeric spaces and characters, and they should not be blank e.g.
n/breadth-first searchis not allowed. - Multiple flashcards with the same name are not allowed e.g.
n/Quicksortis not allowed if there already exists a flashcard with the nameQuicksortin the flashcard list. - If duplicate tags are specified, only one tag will be added e.g. if
t/sorting t/sortingis specified, the flashcard will have only one tag with the labelsorting. - If multiple tags are added,
t/must be specified for each and every tag e.g.t/sorting t/midterm - If the priority is not specified, it will be low by default.
- For
name,definition, andpriority, if there are multiple arguments specified, the last argument will be taken e.g. ifn/Quicksort n/Slowsort d/sort quickly d/sort slowly p/low p/highis specified, the flashcard will have nameSlowsort, definitionsort slowly, and priorityhigh.
Listing all flashcards : list
Shows a list of all flashcards.
Format: list
Sorting all flashcards : sort
Sorts all flashcards in the flashcard list based on their priority level.
Format: sort [ORDER]
Note:
-
ascis specified to sort the flashcards in ascending order of priority i.e. flashcards withlowpriority are displayed at the top of the list, and flashcards withhighpriority are displayed at the bottom. -
descis specified to sort the flashcards in descending order of priority i.e. flashcards withhighpriority are displayed at the top of the list, and flashcards withlowpriority are displayed at the bottom. - The order is case-insensitive. e.g
ASCandAsCwill both sort in ascending order of priority. - If no order is specified, the default order is ascending.
Examples:
-
sort AsCsorts all flashcards in ascending order of priority. -
sort DEscsorts all flashcards in descending order of priority.
Editing a flashcard : edit
Edits an existing flashcard in the flashcard list.
Format: edit INDEX [n/NAME] [d/DEFINITION] [t/TAG] [p/PRIORITY]
- Edits the flashcard at the specified
INDEX. - The index refers to the index number associated with the edited flashcard, as shown in the displayed flashcard list.
- The index must be a positive integer 1, 2, 3, …
- At least one of the optional fields must be provided.
- Existing values will be updated to the input values.
- When editing tags, all existing tags of the specified flashcard will be removed, and only the edited tags will
remain. e.g. when
edit 1 t/Sorting t/Optimalis entered, the first flashcard in the flashcard list will only have tagsSortingandOptimal. - You can remove all the tags of a specific flashcard by typing
t/without specifying any tags after it.
Examples:
-
edit 1 n/BubbleSort d/Average case: O(n^2)edits the name and definition of the first flashcard to beBubbleSortandAverage case: O(n^2)respectively. -
edit 2 n/SelectionSort t/edits the name of the second flashcard to beSelectionSortand removes all of its existing tags. -
edit 3 p/highedits the priority of the third flashcard to behigh.
Note:
- If multiple tags are edited,
t/must be specified for each and every tag e.gt/sorting t/midterm - For
name,definition, andpriority, if there are multiple arguments specified, the last argument will be taken e.g. ifedit 1 n/first n/secondis entered, the name of the first flashcard in the flashcard list will besecond.
Locating flashcards by name/tag/priority: find
Finds flashcards with names, tags or priorities containing any of the given keywords.
Format: find [n/KEYWORD] [t/KEYWORD] [p/KEYWORD]
- All
findoperations are done on the original flashcards list which contains all flashcards. - The search is case-insensitive. e.g
sortwill matchSort - The order of the keywords does not matter. e.g.
runtime sortwill matchsort runtime - Names, tags or priorities will be searched according to input prefixes.
- Only full words will be matched e.g.
sortwill not matchsorting - Only flashcards matching all keywords will be returned (i.e.
ANDsearch).
Examples:
-
find n/QuicksortreturnsQuicksort -
find n/Chaining t/hashingreturnsChaining -
find n/Heap p/mediumreturnsHeaps -
find n/Heap p/loworfind n/Chaining t/metalreturns no flashcards because not all conditions are satisfied
Flipping a flashcard : flip
Flips the specified flashcard in the flashcard list. When the definition of a flashcard is hidden and flip is
executed on that flashcard, the definition will be shown. Conversely, when the definition of a flashcard is
displayed and flip is executed on that flashcard, the definition will be hidden.
Format: flip INDEX
- Flips the flashcard at the specified
INDEX. - The index refers to the index number associated with the flashcard to be flipped, as shown in the displayed flashcard list.
- The index must be a positive integer 1, 2, 3, …
- The flashcard will not stay flipped when the user exits and re-enters the app.
- If the definition of a flashcard is shown and the user executes a command to edit it, the definition will remain
displayed. Conversely, if the definition is hidden and it is edited by the user, it will remain hidden. However, the
results of the
editcommand will be displayed as a message to the user.
Examples:
-
flip 2flips the second flashcard in the flashcard list.
Deleting a flashcard : delete
Deletes the specified flashcard from the flashcard list.
Format: delete INDEX
- Deletes the flashcard at the specified
INDEX. - The index refers to the index number associated with the deleted flashcard, as shown in the displayed flashcard list.
-
The index must be a positive integer 1, 2, 3, …
- Quiz mode is now active.
- You can now only use commands relevant to the quiz interface.
Examples:
enter quiz
Checking performance : performance
Examples:
-
delete 2deletes the second flashcard in the list.
Clearing all entries : clear
Removes all flashcards from the flashcard list.
Format: clear
Quiz Commands
Note: Our current implementation does not include adding custom quiz questions.
Entering Quiz mode : enter quiz
Enters the quiz interface and disables commands from the flashcard interface.
Format: enter quiz
Note: enter quiz and start attempt have been designed to be separate commands as this leaves the app
open for extension (i.e easier to implement more commands specific to quiz mode)
Starting an attempt : start attempt
Starts a new quiz attempt.
Format: start attempt
- An attempt is started.
- You can now answer the quiz questions.
Examples:
start attempt
Answering a quiz question : answer
Answers the specified quiz question in the displayed quiz question list.
Format: answer INDEX a/ANSWER
- The index refers to the index number associated with the quiz question that the user intends to answer, as shown in the displayed quiz question list.
- The index must be a positive integer 1, 2, 3, …
- For True/False questions, the answer must be either
trueorfalse(case-insensitive). - For MCQ questions, the answer must be a positive integer corresponding to the option specified in the question.
Examples:
- To answer the first question which is a True/False question, enter either
answer 1 a/trueoranswer 1 a/false - To answer the second question which is a MCQ question, enter
answer 2 a/1for option 1 oranswer 2 a/2for option 2.
Ending an attempt : end attempt
Ends the current quiz attempt and stores the results of the attempt in the performance interface.
Format: end attempt
- For
end attemptto be a valid command, there must already be an ongoing quiz attempt. - If
end attemptis entered without answering any quiz questions, the current quiz attempt will end but no results will be stored in the performance interface.
Checking performance : performance
Opens the performance interface where past quiz attempts are recorded.
Format: performance
- When
performanceis entered, all past quiz attempts are displayed to the user. For each attempt, the timestamp representing the time at which the attempt was started, as well as the number of correct responses out of the total number of responses submitted for that particular attempt are displayed.
Viewing help : help
Opens up a help window containing a link to the user guide.

Format: help
Leaving Quiz mode : leave quiz
Leaves the quiz interface and and disables all commands from the quiz interface.
Format: leave quiz
Performance Commands
Only commands listed in this section are valid in the performance interface. The performance interface is a separate window from the flashcard and quiz interfaces.
Checking performance : performance
Opens the performance interface where the list of past quiz attempts are stored.
Format: performance
Viewing the results of a specific quiz attempt : view
Displays the detailed results of a specific past quiz attempt. In the performance interface, a red option represents an incorrect answer and a green option indicates a correct answer.
For example, in the image displayed below, the correct answer to the first question is true, and the first question
was correctly answered by the user. On the other hand, the correct answer to the second question is 25, which is
option 4, but the user submitted an incorrect answer, option 3.

Format: view INDEX
Example: view 1

Listing past attempt results : list
Shows a list of all past quiz attempts and the result statistic for each attempt. The result statistic consists of the number of correct responses out of the total number of responses submitted for each attempt.
Format: list
Saving the data
DSAce data is saved in the home folder automatically after any command that changes the data is entered. There is no need to save the data manually.
FAQ
Q: How do I transfer my data to another computer?
A: Install the app in the other computer and overwrite the empty data file it creates with the file that contains the
data from your previous DSAce home folder.
Q: How do I make my own quiz questions?
A: CRUD quiz questions are part of our future plans.
Q: Why is there a need for both enter quiz and start attempt?
A: This makes it easier to implement other quiz mode commands in the future (open for extension).
Command summary
| Action | Format, Examples |
|---|---|
| Add |
add n/NAME d/DEFINITION [t/TAG] [p/PRIORITY] e.g., add n/Bellman-Ford Search d/runtime: O(VE)
|
| Clear | clear |
| Sort |
sort [ORDER] e.g., sort ASC
|
| Delete |
delete INDEX e.g., delete 3
|
| Flip |
flip INDEX e.g., flip 2
|
| Edit |
edit INDEX [n/NAME] [d/DEFINITION] [t/TAGS] [p/PRIORITY] e.g., edit 1 n/BubbleSort d/Average case: O(n^2) p/low
|
| Find |
find [n/KEYWORDS] [t/KEYWORDS] [p/KEYWORDS] e.g., find n/BellmanFord Search
|
| List |
list (flashcard interface) |
| Help | help |
| Exit | exit |
| Enter Quiz | enter quiz |
| Start attempt | start attempt |
| Answer |
answer INDEX a/ANSWER e.g., answer 1 a/true for True/False questions and answer 2 a/1 for MCQ questions |
| End attempt | end attempt |
| Leave Quiz | leave quiz |
| Performance | performance |
| List |
list (performance interface) |
| View |
view INDEX e.g., view 1
|