tp

Developer Guide

Table of Contents

Acknowledgements

  1. For the main structure of the program, we have adapted the project structure from the Individual Project of Man Juncheng
  2. For JUnit testing, we have adapted the testing codes from the AddressBook level-2 codes
  3. For the developer’s guide, we have referenced the developer’s guide from AddressBook level-3

Design & implementation

Overall Architecture

The execution of the QuizHub application will concern 6 main components which are the QuizHub, Ui, Parser, Commands, Storage and UtilityClasses packages.

QuizHub is the “main” class, which is responsible for starting the program, initialising all other objects, executing commands, and shutting down.

Ui is the component that interacts with the user, taking inputs and displaying the results of the executed commands.

Parser acts as a multiplexer to determine which command to run, and what parameters it has, based on the user input read in.

Commands refer to a package of individual commands with complex and specific logic, which are executed by QuizHub and which results are displayed by Ui.

Storage takes care of saving questions data onto and loading questions data from the hard drive.

UtilityClasses refer to any other miscellaneous classes used by the components for program execution.

While the above diagram provides a quick and simple high-level overview of the execution of QuizHub, it does not reflect the finer relationships between the components as well as the features within the various components. A more comprehensive description of QuizHub is provided in the following condensed class diagram. It describes the classes corresponding to the main components of the application and their relationships with each other. Only the most important methods and attributes of each class are shown for simplicity. Here, “most important” means these methods and attributes directly control the critical flow and operation of the application.



Application Lifecycle

The program begins with the run() call to QuizHub class.

This starts a loop in which user input is continuously read in from CLI for the user command to be extracted and executed. In each iteration of the loop, QuizHub makes a call to Ui.getUserInput() and returns the entire user input as a String object. Following which, QuizHub makes a call to Parser.parseCommand() to extract the user command from the String object and returns a Command object. Finally, QuizHub makes a call to Command.executeCommand() and performs the requested action. Upon complete command execution, the results will be displayed to the user through Ui.

If Command is of Exit type, the loop will exit, and the program terminates.

Parser Component

The Parser component is the backbone behind the program, functioning as the API between the CLI user interface and the core functionalities of the program. It supports the direct communication between the program and user by converting user input into Command objects which can be interpreted by the program.

Design Considerations

As the Parser functions as the API between user and program, it must be designed with a clear consideration of both human and machine requirements.

Our target users are NUS students preparing for exams who wish to use our program to facilitate their practice. Considering that time is of the essence for revising students, the Parser must prioritise efficiency of use to not cause time delays to users’ revision. With this in mind, we based our design off the following points for inputs taken in by the Parser.

  1. Ease of use: Simple and short command structure
  2. Ease of familiarisation: No excessive or complicated commands

Consideration must also be given to the developers and machine executing the code. The exact mechanism behind the Parser must be able to effectively extract the relevant information from user inputs in a non-arbitrary way to be used by other classes. Hence, we also need to strike a balance with the following point for inputs taken in by the Parser.

  1. Ease of processing and validation: Hierarchical command structure

Alternative Design Considerations

In designing the Parser, an alternative design we considered is to follow that of Unix command interface. The Unix parser is designed such that input commands are required to have the syntax of command -[option1] [argument1] -[option2] [argument2] ... where the order of arguments does not matter. While this is a clean and neat parser design, we have decided not to adopt this design as we see a strong need of having a hierarchical command structure for our program.

  1. A hierarchical structure introduces logical sequence and flow to the command used, facilitating a quick familiarisation process for users to quickly learn the command syntax. This is in line with our design consideration to minimise learning and familiarisation time for users. This is in addition to the ease of processing and validation of commands. short [question]/[answer]/[module]/[difficulty], for one, is a command that has a logical sequence to which the details of a question is entered. It is more intuitive to follow a structure instead of entering such details without a fixed order, which can easily lead to confusion.

  2. The use of the delimiter / also better helps to introduce the concept of hierarchy than the delimiter - used in Unix commands as / can be more easily associated with layering and stacking, processes which create structures possessing hierarchy.

Parser Command Syntax

Our final design seeks to optimise both user experience and program effectiveness. We have hence chosen the following general syntax for commands to be input into the Parser. All commands require a starting commandType, but some commands do not require the subsequent arguments and payloads.

commandType [payload] [/argument1 [payload1] /argument2 [payload2] ... ]

The command structure is simple, short, and intuitive. With commands rarely requiring more than 2 arguments, typing and inputting the command in CLI is fast and efficient, allowing revising students to quickly utilise the program. The hierarchical and logical structure to the arrangement of arguments and payloads allows students to quickly familiarise with the syntax and minimise delays to their learning schedule.

The hierarchical structure also allows for the respective payload to be easily extracted with little ambiguity. Command validation can then be performed sequentially, facilitating efficient checks.

Implementation

The main function of Parser is to decode user input and extract relevant information to be used by other classes. Hence, it supports 3 main method types as listed below.

  1. parseCommand and other parse methods to assemble specific commands
  2. extract methods which extract information from different segments of user input
  3. handle methods which handle exceptions thrown during parsing

parseCommand

This is arguably the most critical method of the Parser component. It processes raw user input from CLI to extract information to be assembled into a Command object. Where necessary, this is accomplished by calling the other parse methods. It determines the type of Command to be created by reading the commandType from the very start of the user input.

The following sequence diagram builds upon the application lifecycle sequence diagram to show the different behaviours of parseCommand. For simplicity, not all possible paths are covered, instead showing the 3 main pathways possible: parsing valid commands that can be returned immediately, parsing valid commands that require further parsing, and parsing invalid commands.



extract methods

Methods of this type are helper methods created to assist in extracting payloads in the user input. They are used in the construction of Command objects when command-specific information need to be extracted from the arguments.

These methods break up an entire commandType [payload] [/argument1 [payload1] /argument2 [payload2] ... ] String into segments and depending on the segment of user input they are extracting information from, zone in on a specific segment to find the information they are looking for.

handle methods

Methods of this type are helper methods created to handle any exceptions that can arise during any stage of parsing. Typically, there is one handle method for every extract method, designed to catch exceptions raised during the extraction of information from each segment of the user input.

Command Components

The following is a detailed sequence diagram demonstrating how commands are executed after the parsing stage. This may differ slightly for different commands.

Essentially, the parser will create and return a Command object with appropriate arguments to QuizHub, where it will be executed. When the Command executes, it interacts with the QuestionList object to read / manipulate a Question / the QuestionList itself.


Help Command - Display Commands

Brief Description of Help Command

Command Syntax

help

Expected invalid commands for Help Command


Short Command - Add Short Answer Question to the Quiz

Brief Description of Short Command

One of the supported question formats is the Short Answer Question, in which a question can be answered with a phrase of a few words, which will be matched to a corresponding answer of sufficient similarity.

Command Syntax of Short Command

short [question]/[answer]/[module]/[difficulty]

  1. [question] is the question, phrased as asking the user (i.e. What is 2 + 2? )
  2. [answer] is the answer or possible answer(s) that the user must input to count as correct. It is case-insensitive. (i.e. 4, four)
  3. [module] is the module that the question belongs in (i.e. CS2113)
  4. [difficulty] is the difficulty of the question for sorting later (i.e. Hard)

Class Structure of Short Command

Attributes

Constructor

Methods

Usage in the QuizHub Application

Implementation of Short Command


Thereafter, the command is returned to the QuizHub component and executed, to add a Question object to the corresponding QuestionList object using the addToQuestionList method. This method will analyse the arguments above and add the Question to the appropriate list.

short1

Expected invalid commands for Short Command


MCQ Command - Add Multiple Choice Question to the Quiz

Brief Description of MCQ Command

One of the supported question formats is the Multiple Choice Question (MCQ), in which a question can be answered from 4 available options, by answering the index of the corresponding option.

Command Syntax of MCQ Command

mcq [question]/[option 1]/[option 2]/[option 3]/[option 4]/[answer index]/[module]/[difficulty]

  1. [question] is the question, phrased as asking the user (i.e. What is the capital of Australia? )
  2. [optionX] is a String storing a possible answer. Three of the options has to be incorrect, and one option correct. (i.e. Option1: Melbourne, Option2: Canberra, etc.)
  3. [answer index] is an integer from 1 to 4 corresponding to the correct option. (i.e. 2)
  4. [module] is the module that the question belongs in (i.e. CS2113)
  5. [difficulty] is the difficulty of the question for sorting later (i.e. Hard)

Class Structure of MCQ Command

Attributes

Constructor

Methods

Usage in the QuizHub Application

Implementation of MCQ Command

Thereafter, the command is returned to the QuizHub component and executed, to add a Question object to the corresponding QuestionList object using the addToQuestionList method. This method will analyse the arguments above and add the Question to the appropriate list.

Expected invalid commands for MCQ Command


List Command - Show all Questions with Index

Brief Description of List Command

Lists all the questions in the current QuestionList.

When executed, the command will invoke the QuestionList.printQuestionList method. This method first checks whether the list is empty and prints and error message if empty, else it will invoke the QuestionList.printQuestion method on each Question object, with the asList parameter set as true. The QuestionList.printQuestion method will then print each question with a given index, and indicate the question’s type and completion status (obtained through Question.getQuestionType() and Question.questionIsDone() methods)

Expected invalid commands for List Command


Delete Command - Delete a Question

Brief Description of Delete Command

Deletes a question by its index.

Command Syntax of Delete Command

delete [question index]

Implementation of Delete Command

The Command first invokes the QuestionList.viewQuestionByIndex method to determine if the index refers to a valid question, failing which it will return an error message.

Otherwise, it will then invoke the QuestionList.deleteQuestionByIndex method to remove the question from the QuestionList.

delete1

Afterward, the storage is updated to reflect the newest QuestionList.

Expected invalid commands for Delete Command

List of questions:
1: [S][ ] New description / \exitquiz | number | EASY
2: [M][ ] question2 / 1.4 / 2 / 3 / 1.6 / 3 | number | EASY
3: [S][ ] What is 2+2? / 4 | Math | EASY
4: [S][ ] Who wrote Hamlet? / Shakespeare | Literature | HARD
5: [S][ ] easy / easy | easy | EASY


Find Command - Look for a matching question

Brief Description of Find Command

QuizHub supports searching for specific questions, by searching matching keywords.

Command Syntax of Find Command

find /[description] OR find /[module] i.e. find /description buffalo, find /module CS2113

Implementation of Find Command

This command is passed to the corresponding QuestionList where the searchList method is called. This method go down the existing QuestionList of questions and use the Java contains method (along with the toLower method to ensure the search is case-insensitive) to determine if the search term is located that question. If the contains method returns true for a given question, that question’s contents and index will be copied to a new ArrayList of questions, and subsequently print them.

Expected invalid commands for Find Command

List of questions:
1: [S][ ] New description / \exitquiz | number | EASY
2: [M][ ] question2 / 1.4 / 2 / 3 / 1.6 / 3 | number | EASY
3: [S][ ] What is 2+2? / 4 | Math | EASY
4: [S][ ] Who wrote Hamlet? / Shakespeare | Literature | HARD
5: [S][ ] easy / easy | easy | EASY


Edit Command - Edit Question / Answer

Brief Description of Edit Command

The CommandEdit class in the quizhub application is responsible for handling user commands to edit the description or answer of a question. The CommandEdit class supports 2 edit commands for short answer questions and 3 edit commands for multiple choice questions:

Command Syntax

Special Formatting Notes:

For short answer questions:

For multiple choice questions:

Class Structure of Edit Command

The CommandEdit class is specialized for performing edit operations on questions in the QuizHub application. It extends the base Command class and carries out the modification of either a question’s description or its answer based on the user’s input.

Attributes:

Constructor:

Methods:

The class uses the following components from the QuizHub application:

Upon execution, the CommandEdit class first checks that both editField and newValue are not null. It then calls editQuestionByIndex on the QuestionList to perform the actual edit. After a successful edit, a message is displayed to the user, and the Storage component is used to ensure the edited question’s new state is saved.

Implementation of Edit Command

Operational Flow of Edit Command

  1. User Initiation:
    • The user enters the edit command along with the question number and either a new description or answer into the QuizHub application.
  2. Command Parsing:
    • QuizHub passes the user input to the Parser component to interpret the command.
    • The Parser creates an instance of CommandEdit and invokes the parseEditCommand method with the user’s input.
  3. Command Execution:
    • Once the command is parsed, Parser returns the CommandEdit object to QuizHub.
    • QuizHub calls the executeCommand method on the CommandEdit instance, providing the necessary UI, data storage, and question list.
  4. Editing Process:
    • CommandEdit communicates with QuestionList to locate the specific question by index.
    • QuestionList then calls the editQuestion method on the relevant Question instance, passing the new description or answer.
  5. Question Modification:
    • The Question object updates its state with the new information provided.
    • Upon successful update, Question notifies QuestionList of the edit completion.
  6. Completion Acknowledgement:
    • QuestionList sends an acknowledgment back to CommandEdit confirming the completion of the edit operation.
  7. User Feedback:
    • CommandEdit reports back to QuizHub that the editing process is complete.
    • QuizHub then communicates the successful edit to the user via the UI.
  8. Resource Cleanup:
    • After the edit is complete and the user has been notified, the CommandEdit object is destroyed to free up resources.

Each step in the flow ensures that the user’s request to edit a question is processed accurately and efficiently, with the system providing feedback at the end of the operation.

User Interaction Examples

Notes for Developers

Expected Invalid Input for Command Edit

Assuming 2 current questions:
1: [S][ ] question / answer | number | EASY
2: [M][ ] question2 / 1 / 2 / 3 / 4 / 1 | number | EASY


Start Command - Start Quiz

Brief Description of Start Command

The start quiz feature allows users to start quizzing themselves with customizable characters to define which modules to quiz themselves on alongside whether to randomize the questions or use their pre-defined question order.

Command Syntax

Class Structure of Start Command

The CommandStart class is integral to the QuizHub application, facilitating the initiation of a quiz session. It inherits from the abstract Command superclass and specializes in handling the ‘start’ command functionality.

Attributes:

Constructor:

Methods:

The class utilizes the following components from the QuizHub application:

Upon execution, the CommandStart class will first gather the matching questions using the startMode and startDetails, filter them by startQnType, arrange them according to startQnMode, and then proceed to start the quiz session via the QuestionList. It handles any errors or invalid input by providing feedback through the Ui.

Sequence Diagram of Start Command

Implementation of Start Command

The CommandStart class, located within the quizhub.command package, is responsible for initiating quizzes. It leverages functionalities from quizhub.questionlist.QuestionList and extends the Command class with additional prompts and user input fields. The command is structured as follows:

start to initiate the start command

/[quiz mode]

[start details]

/[qn mode]

/[qn type]

User Interactions for Start Command

Operational Flow of Start Command

  1. Command Invocation:
    • The user inputs the start command with the necessary options ([quiz mode], [start details], [qn mode], [qn type]) into the CLI.
  2. Quiz Mode Processing:
    • The CommandStart class receives the input and identifies the [quiz mode]:
      • If /module is specified, followed by a module name, it fetches questions for that module using categoriseListByModules.
      • If /all is specified, it retrieves all questions using getAllQns().
  3. Start Details Handling:
    • The [start details] provides additional specificity for the /module, identifying the exact category of questions to be used.
  4. Question Mode Configuration:
    • The command processes the [qn mode]:
      • /random applies a random shuffle to the questions using java.util.Collections.shuffle.
      • /normal retains the existing order of questions.
  5. Question Type Selection:
    • The [qn type] is evaluated to filter questions based on type:
      • /short for short answers.
      • /mcq for multiple-choice questions.
      • /mix for a mix of both types.
  6. Quiz Execution:
    • The startQuiz() method from quizhub.questionlist.QuestionList is called to begin the quiz.
    • Questions are presented one by one, with the CLI hiding the answers.
    • Users submit their answers via the CLI, receiving feedback after each submission.
  7. User Responses:
    • For Short Answer Questions, users type the answer and press enter.
    • For Multiple Choice Questions, users input the index of the correct answer.
    • The command supports early termination through the \exitquiz command.
  8. Scoring and Feedback:
    • Correct answers increase the user’s score.
    • Immediate feedback is provided for each answer.
  9. Quiz Completion:
    • The quiz automatically ends after all questions are attempted.
    • The user’s final score is calculated and displayed.
  10. Post-Quiz Actions:
    • Any actions required to finalize the quiz session, such as updating progress or logs, are performed.

Expected Invalid Input for Start Command

Assuming 2 current questions:
1: [S][ ] question / answer | number | EASY
2: [M][ ] question2 / 1 / 2 / 3 / 4 / 1 | number | EASY


Shuffle Command

Brief Description of Shuffle Command

The Shuffle command in QuizHub is designed to PERMANENTLY randomize the order of questions within the question list. This contrasts with the temporary randomization available in the Start Command’s /random mode.

Command Syntax

shuffle

Class Structure of Shuffle Command

The CommandShuffle class is tasked with executing the shuffle operation within the QuizHub application. It inherits from Command: As a subclass, it inherits methods and attributes from the Command superclass.

Constructor:

Methods:

The CommandShuffle class does not have its own attributes but utilizes those from its superclass. It interacts with the following components:

Operational Flow

  1. Command Invocation:
    • The user issues the shuffle command through the CLI (Command Line Interface).
    • QuizHub’s main control flow receives the command and prepares to execute it.
  2. Execution:
    • The CommandShuffle class is instantiated and invoked.
    • It calls upon the shuffleQuestions() method from the QuestionList class.
  3. Shuffling Process:
    • The shuffleQuestions() method utilizes java.util.Collections.shuffle to randomize the order.
    • The shuffling process is completely random and THERE IS A CHANCE THAT THE RESULT IS NOT RANDOMISED
    • This method directly alters the storage list within QuestionList.
  4. Storage Update:
    • Once shuffled, the new order of questions is written back to the persistent storage.
    • This action ensures that the shuffled order is retained across sessions.
  5. User Feedback:
    • Upon successful shuffling, a confirmation message is displayed to the user through the CLI.

NOTE: Unlike the temporary array used in the Start Command’s /random mode, the shuffled sequence in the Shuffle Command is committed to storage, meaning that the new order becomes the default arrangement for all subsequent quiz activities.

Expected Invalid Commands for Command Shuffle


Markdiff Command - mark difficulty of entry

Brief Description of Markdiff Command

The CommandMarkDifficulty class within the QuizHub application facilitates the marking of questions with a difficulty level. This feature allows for the categorization of questions by difficulty, aiding in targeted quiz preparation.

Command Syntax

Class Structure of Markdiff Command

The CommandMarkDifficulty class is responsible for the command operation that marks a question with a specified difficulty level in the QuizHub application. It extends the base Command class and includes specific attributes and methods for the marking process.

The class interacts with the following components:

Constructor:

Methods:

Operational Flow of Markdiff Command

  1. Command Reception:
    • The CommandMarkDifficulty class receives the command input via the CLI.
  2. Input Parsing:
    • The input is parsed to extract the question number (qnIndex) and the difficulty level (qnDifficulty).
  3. Input Validation:
    • The extracted values are validated to ensure they match expected formats and that the difficulty level is one of the predefined options.
  4. Difficulty Marking:
    • Upon validation, the specified question’s difficulty is marked using the provided level by updating the Question object in the QuestionList.
  5. Storage Update:
    • Changes are persisted to the storage system to ensure that the new difficulty level is retained.
  6. User Feedback:
    • The user is provided with feedback indicating the successful marking of the question’s difficulty.

Expected Invalid Commands for Command Markdiff

Assuming 2 current questions:
1: [S][ ] question / answer | number | EASY
2: [M][ ] question2 / 1 / 2 / 3 / 4 / 1 | number | EASY


Command Exit - Exit Program

Brief Description of Command Exit

Command Exit is responsible for exiting the program

Command Syntax

Expected Invalid Commands for Command Exit


Storage Component

The Storage class is a critical component of the QuizHub application, responsible for managing the storage, retrieval, and updating of question data. It represents a hard disk storage system for storing, reading, and updating question data. It interacts with question data in a file specified by the user and integrates with the QuestionList class for effective storage and retrieval of questions.

Developers need to be aware of the two main methods for loading and updating data:

The details of the data loading and updating process are explained in details below.

Constructor

public Storage(String filePath)

Loading data

The process of loading data from the storage file specified in the constructor takes places in a few steps. To illustrate the overall flow on loading data, refer to the sequence diagram below.

:exclamation: This sequence diagram emphasizes the process of loading data into storage, and has therefore omitted details of more trivial and/or non-related methods as well as exception handling logic. To find out more about the details, please refer to the complete code and header comments.

In addition to the main loadData method, the process involves the following 3 helper methods:

The general idea is that when the program is first initiated, the loadData method is called from within the Ui class, which passes in an empty QuestionList. Within the method itself, the helper method buildCurrentListFromFile() will take in this empty QuestionList object and populate it with question objects according to textual information stored within the specified file. This is done by first extracting each question stored line by line into a new Arraylist<String> rawQuestions, then calling another helper method parseQuestionsFromStrings() to add each question into the QuestionList via a third helper method addQuestionFromFile().

The process is refactored into these methods to avoid deep nesting of code to achieve clearer logical flow and more readability and easier debugging process.

Note: Due to the different formats of storage for short answer questions and multiple choice questions, addQuestionFromFile() method actually serves as a multiuplexer of two helper method addShortAnsFromFile() and addMCQFromFile(), each designed to add a short answer question and a multiple choice quesiton specifically. They also help to check if the question data stored is corrupted, and will increment the count of invalid data upon detecting a data corruption.

Updating data

The process of updating data is done in a similar fashion compared to that of loading data, but in the reverse order logically.

Apart from the main updateData() method, it involves the use of 2 other helper methods:

Upon exiting the program, the Ui class will call the updateData() method and passing in the current QuestionList of the program. Within the method, the writeToFile() helper method is first called to determine whether texts are to replace existing content of the file or to be appended at the back. Then, each question is stored in the appropriate format into the destination file using the method storeQuestionToFile() which parses a Question object into the correct string format for storage.

UI Component

The UI class in the QuizHub application is responsible for handling the user interface interactions in a command-line interface (CLI). It provides methods for displaying messages or questions as well as getting user input.

Constructor

public Ui(Storage dataStorage, QuestionList questions)

Implementation Details

Design Coniderations

The Ui class is meticulously designed to serve as the exclusive channel for displaying information on the screen in the QuizHub application. This design choice ensures a clean and organized separation of concerns, centralizing the responsibility of user interface interactions within this class. By encapsulating display functionality, it imposes a clear interface for other classes to communicate with the user. Any information that needs to be presented on the screen, whether it be opening or closing messages, the display of questions, feedback on user commands, or updates on the number of questions, must go through the Ui class. This class offers a set of pre-designed methods like displayMessage() and displayCorrectAnswer() that provide a standardized way for other components to present information to the user, thus enhanceing maintainability, readability, and modularity, as changes to the user interface can be localized to the Ui class without affecting the internal logic of other components.

In addition, the class defines numerous string literals and constants for various feedback messages, error notifications, and command instructions. By encapsulating these generic messages within constants like INVALID_COMMAND_MSG and INVALID_QUESTION_DIFFICULTY_MSG, it not only bolsters code readability and maintainability but also facilitates effortless updates to the user interface while preventing repetitive hard-coding of these messages.

Overall Flow

When the program is first initiated, the displayOpeningMessage() method is called to display a welcome message while also calling the loadData() method of the dataStorage to display all the questions stored in the storage file if any.

Afterward, in the main loop of the program execution, the getUserInput() method is called at the start of the loop to capture user input as a String object, which is then used by the Parser and various Command classes to parse and execute the appropriate commands. This process is terminated only upon execution of a CommandExit.

Finally, the displayClosingMessage() method is called to display a farewell message while also calling the updateData() method of the dataStorage to update the data stored in the storage file with the latest ones.

Displaying Quizzes

The Ui class also has a displayQuestion(Question question, int currentQuestionIndex, int totalQuestions) method, which is used to render a question from the list of stored questions in the specific format and prompt the user for an answer when a CommandStart is executed to signal the start of a quiz. This method will be called in a loop for each question until the end of the list of questions. For each question, the Ui class will display "Correct!" if the answer matches that of the correct answer using the displayMessage() method, or display "Wrong!" along with the correct answer by calling the helper method displayCorrectAnswer(). At the end of the quiz, the displayFinalScore() method will be called to display the final score obtained by the user in that particular quiz.

Product scope

Our Product

QuizHub

Target user profile

Our target users are

Value proposition

Allow NUS Students to easily take notes in class and allow them to generate quizzes to test their knowledge of understanding. By using the QuizHub application, students can input notes taken in class in a question form, which they could use to take quizzes to ensure their understanding of the topic.

User Stories

Version As a … I want to … So that I can …
v1.0 New student user I can access the tutorial on how to operate the app Easily use the app effectively for my studies
v1.0 Efficient student I can add a question and its answer easily to my question and answer bank Build my question and answer bank quickly
v1.0 Organized student I can view all the questions and answers in my question and answer bank Review my study materials comprehensively
v1.0 Detail-oriented student I can edit the content of a question or its answer Correct any mistakes or make improvements
v1.0 Student focused on clarity I can delete a question and its answer from my question and answer bank Maintain a clean and relevant set of questions for revision
v1.0 Student focused on revising for tests I can start and end a quiz which tests me on questions in my question bank Consolidate understanding of my learnt knowledge through rigorous testing
v1.0 Student focused on revising for tests I can see my final quiz score and whether I have answered each question correctly Identify areas of weakness to be improved upon for my tests
v2.0 User seeking efficiency I can search for a specific question within a flashcard deck locate information quickly.
v2.0 User with diverse interests I can categorize questions by topic or subject tailor my quizzes
v2.0 User seeking variety I can shuffle the order of questions in a flashcard deck keep my quizzes engaging.
v2.0 User aiming for improvement I can mark a question as “difficult” or “easy” for later review optimize my learning.
v2.0 User seeking a challenge I can practice questions in a random order test my knowledge comprehensively.
v2.0 User seeking structure I can practice questions in a sequential order follow a specific learning path.

Non-Functional Requirements

  1. Program should work on any typical OS as long as it has Java 11 installed and configured.
  2. A user with average or above typing speed for regular English text (not program code) in the CLI should not experience any significant delays to their revision as compared to using a GUI program.

Glossary

  1. Typical OS: Windows, Linux, Unix, macOS.
  2. CommandType: The first word input in the CLI, indicates the type of instruction the program should execute. e.g. start, delete, short
  3. Argument: A parameter word identified by a leading /, arguments indicate the start of information to be extracted from a command in addition to the command type.
  4. Payload: A sequence of additional information immediately following the command type or arguments, they provide information for executing complex instructions.
  5. Hierarchical: Possesses logical sequencing or order, such as in order of decreasing subsets or importance.

Instructions for manual testing

Launch

  1. Ensure you have Java 11 or above installed in your Computer.
  2. Download the latest QuizHub.jar from here.
  3. Copy the file to the folder you want to use as the home folder for your QuizHub.
  4. Open a command terminal, cd into the folder you put the QuizHub.jar file in
  5. Use the java -jar QuizHub.jar command to run the application in the command-line interface.