Looking for a quick, easy, and efficient way to track your CS2040C note and code files? They're all on CLIAlgo.
The Architecture Diagram given above explains the high-level design of CLIAlgo
.
Given below is a quick overview of the main components and how they interact with each other.
CLIAlgo
: Consist of only 1 main method, and it is responsible for initializing the components
in the correct sequence and connects them with each other during runtime.Ui
: A class responsible for handling all interactions with the user.Parser
: A class responsible for making sense of all commands entered by the user.logic
: A package of classes responsible for managing all CS2040CFile
s allocated in CLIAlgo
.command
: A package of Command
objects which handles the different functionalities of CLIAlgo
.file
: A package of CS2040CFile
s used in CS2040C.storage
: A package of classes responsible for reading, storing and writing data to the hard disk.The Sequence Diagram below shows a high level overview of how the components interact with each other
Note: The lifeline for
Command
should end at the destroy marker (X) but due to limitation of PlantUML, the lifeline reaches the end of the diagram.
API : Ui.java
Here is a class diagram of the Ui
component which is responsible for handling all interaction with the User.
The Ui
component:
Parser
.API : Parser.java
Here is a class diagram of the Parser
component which is responsible for processing commands
and preparing the appropriate Command
object.
The Parser
component:
Ui
class.command type
, topic
, file name
using
the StringManipulation
interface.Command
object that will be executed by CLIAlgo
.API : TopicManager.java
Here is a class diagram of the TopicManager
component which is responsible for handling all operations involving
CS2040CFile
s and Topics
.
The TopicManager
component:
CS2040CFile
tracked by CLIAlgo
.Topic
objects, each representing a topic in CS2040C.CS2040CFile
tracked by CLIAlgo
is stored in the corresponding Topic
object based on the topic it is tagged
to.CS2040CFile
s such as
API : FileManager.java
Here is a class diagram of the FileManager
which facilitates the storage
function of the application.
The FileManager
component
Topic
’s data as an individual .txt
file.Note
and Code
objects as a String
and store it into its
corresponding Topic
’s .txt
.Topic
’s .txt
whenever an add
or
remove
command is called by the user.Topic
’s .txt
and returns a Topic
object when
initializing the application.API : HelpCommand.java
Here is a class diagram of the HelpCommand
which is responsible for teaching the user how to use the commands.
The HelpCommand
component
CLIAlgo
.CLIAlgo
.API : AddCommand.java
Here is a class diagram of the AddCommand
which is responsible for adding either code files or note files.
The AddCommand
component
CS2040CFile
to be added into our CLIAlgo exists within the same directory as the program.CS2040CFile
, whether it is .txt
or .cpp
based on the name of the CS2040CFile
.CS2040CFile
to the TopicManager
and FileManager
.API : RemoveCommand.java
Here is a class diagram of the RemoveCommand
which is responsible for removing either code files or note files.
The RemoveCommand
component
CS2040CFile
currently exists inside TopicManager
and FileManager
.CS2040CFile
from the TopicManager
and FileManager
.API : ListCommand.java
Here is the class diagram of the ListCommand
which is responsible for listing all CS2040CFile
s in CLIAlgo
.
The ListCommand
component
CS2040CFile
s stored in CLIAlgo
in any order.CS2040CFile
is a Note
or Code
.
CS2040CFile
is a Note
, it would be labelled with [NOTE]
before the name of the CS2040CFile
.CS2040CFile
is a Code
, it would be labelled with [CODE]
before the name of the CS2040CFile
.API : FilterCommand.java
Here is the class diagram of the FilterCommand
which is responsible for sorting the CS2040CFile
s according to
the user’s specified keyWord
.
The FilterCommand
component
keyWord
used in its constructor.
keyWord
is topic
it creates and instance of its subclass FilterByTopicCommand
and invoke the
execute()
method.keyWord
is importance
it creates and instance of its subclass FilterByImportanceCommand
and invoke the
execute()
method.CS2040CFile
s filtered based on the keyWord
provided.API : TopoCommand.java
Here is a class diagram of the TopoCommand
which facilitates the topological sort
function of the application.
The TopoCommand
component
CS2040CFile
objects in a specific topic
order.CS2040CFile
objects.CS2040CFile
objects within CLIAlgo
and inform user if no such objects are saved.API : Buffer.java
Here is a class diagram of the Buffer
which facilitates the storing of CS2040CFile
s
returned from filter
and topo
commands and the copying of CS2040CFile
s stored within
into ./export
and opening the folder subsequently if supported by the Operating System.
The Buffer
component
CS2040CFile
s when FilterCommand
and its derivatives or TopoCommand
is executed.CS2040CFile
s.CS2040CFile
s into ./export
folder.CS2040CFile
s in ./export
folder../export
folder automatically if supported by the Operating System.All UI interactions are taken care of by the Ui class. It is responsible for taking in user inputs and giving text-ui
outputs to provide guidance and a pleasant user experience overall. The Ui uses the Scanner
class from java.util
to
take in input from the user and System.out.println()
method from java.lang
to output messages to the user.
Given below is an example of how the Ui
works when it is issued a list
command.
Step 1: The user enters a command
list
. The full command is read in by theUi
using thegetUserInput()
method. TheUi
uses thenextLine()
method of theScanner
object to read in the user input.
Step 2: If it encounters a
NoSuchElementException
orIllegalStateException
, it returns anEXIT_COMMAND
which safely closes the application. If no exception has occurred, theUi
returns theString
toCLIAlgo
.
Step 3: The successful case allows
CLIAlgo
to execute theListCommand
. When executed, it calls theprintListOfCS2040CFiles()
method of theUi
, which then iterates through theArrayList
provided by theListCommand
and prints theCS2040CFile
label and name on a newline using theprintln()
method fromSystem.out
.
The following Sequence Diagram shows how the Ui object is used.
Note: The lifeline for
ListCommand
should end at the destroy marker (X) but due to limitation of PlantUML, the lifeline reaches the end of the diagram.
Parsing of commands is done by the Parser
class. It implements the StringManipulation
interface which allows
Parser
to extract the relevant keywords to prepare the appropriate Command
object. It is also responsible for
handling invalid inputs by the user. The Parser
consist of the following methods.
parse()
: Extracts out the command keyword from the user input.prepareCommand()
: Prepares the appropriate Command
object based on the command keyword and the other
relevant input fields provided by the user. It also checks if the format of the command is correct.isCorrectMarker()
: Checks if the marker used to label the input fields are correct.isValidImportance()
: Checks if the importance value provided by the user is a valid integer and within the [1, 10]
range.isValidKeyword()
: Checks if the keyWord
provided by the user is valid when preparing the FilterCommand
.isValidCommand()
: Checks if the command keyword provided by the user is valid.Given below is an example of how the Parser
works when it is issued a remove command.
Step 1: The user enters a command. The full command is read in by the
Ui
.CLIAlgo
invokes theparse()
method from theParser
.
Step 2: The
parse()
method extracts out the command keyword provided by the user. It then calls theprepareCommand()
method.
Step 3: The
prepareCommand()
identifies the correctCommand
object to prepare based on the command keyword. Since the command keyword provided isremove
,prepareCommand()
callsprepareRemoveCommand()
.
Step 4: If the
NAME
field of the command is null or not labelled using the correct marker,prepareRemoveCommand()
returns anInvalidCommand
object. If theNAME
input field is valid, aRemoveCommand
object is returned.
The following Sequence Diagram shows how the Parser work.
All operations involving CS2040CFile
s are handled by the TopicManager
. The TopicManager
class and Topic
class
form a whole-part relationship where the TopicManager
contains 10 instances of the Topic
class, each
representing the 10 topics in CS2040C. When relevant Command
objects are executed, they invoke methods in the
TopicManager
which in turn invokes methods in the relevant Topic
class. The TopicManager
supports the following
operations:
getTopicOfCS2040CFile()
: Returns the name of the topic the given CS2040CFile
is tagged to.getAllCS2040CFilesGroupedByTopicToPrint()
: Returns a HashMap<String, ArrayList<String>>
containing the names and
labels of all CS2040CFile
s tracked by CLIAlgo
.getAllCS2040CFilesBeforeTopic()
: Returns a LinkedHashMap<String, ArrayList<String>>
containing the names and
labels of all CS2040CFile
s that come before the given CS2040CFile
in topological order.addCS2040CFile()
: Adds the given CS2040CFile
into the Topic
class it is tagged to.removeCS2040CFile()
: Removes a CS2040CFile
from the Topic
class that it is tagged to.Given below is an example of how the Logic
component works when a TopoCommand
is executed.
Step 1: When the
TopoCommand
is executed, it calls thegetAllCS2040CFilesBeforeTopic()
method of theTopicManager
.
Step 2: The
TopicManager
then iterates through all the topics in topological order to check if theCS2040CFileName
is present in that topic.
Step 3: Once a topic is found to contain the
CS2040CFileName
, theTopicManager
self-invokes thegetCS2040CFilesByTopicToPrint()
method which calls thegetAllCS2040CFilesInTopicToPrint()
method of allTopic
class from the current topic onwards. This method returns anArrayList<String>
containing the names and labels of allCS2040CFile
s stored inside the currentTopic
.
Step 4: After the
TopicManager
collates the list ofCS2040CFile
names in topological order, it stores them in aLinkedHashMap<String, ArrayList<String>>
to preserve the topological order. It then returns it to theTopoCommand
object.
The following Sequence Diagram shows how the Logic component work.
The function for reading the previously saved data is facilitated by the FileManager
. The FileManager
creates a SingleFile
for each valid topic name and invokes createNewFile
for those TOPIC_NAME.txt
not in the
folder ./data
. If the files already exist, they are not created. Instead, the contents of the file would be read
line-by-line. The read data would then be passed to FileDecoder
which would then convert these raw data into
CS2040CFile
objects. The CS2040File
objects are then passed into a HashMap
which represents the topic
these CS2040CFile
objects belong to. The HashMap
is then passed back to the TopicManager
, completing the
initialization process.
Given below is how the sequence of initialize()
is run
Step 1: During the start-up of the application, a folder is created to store all the data files.
Step 2: For every
Topic
, create aSingleFile
which containing the data file of thoseTopics
with the path./data/TOPIC_NAME.txt
where TOPIC_NAME is replaced with the name of theTopic
. This only occurs if the file did not exist prior to the running of the application.
Step 3: If the file already existed prior,
readFile()
is run. This creates aScanner
which would translate the data file line by line intoString
. Each line ofString
corresponds to aCS2040CFile
.
Step 4: The
String
is then decoded usingdecode()
and is converted into aCS2040CFile
. If theString
is unable to be converted into aCS2040CFile
, theString
is deemed to be corrupted and is subsequently deleted from the data file.
Step 5: The translated
CS2040CFile
s are then stored within theSingleFile
.FileManager
then invokesdecodeAll()
which retrieves all theTopics
stored within eachSingleFile
which contains all theCS2040CFile
s. This is returned in the form of aHashMap
.
The following Sequence Diagram shows how previously saved files are loaded into CLIAlgo
.
Note: The lifeline for
Scanner
should end at the destroy marker (X) but due to limitation of PlantUML, the lifeline reaches the end of the diagram.
CS2040CFile
to data fileThe function for writing a CS2040CFile
to a data file is facilitated by the FileManager
. When the addEntry
is called, an already created CS2040CFile
and its name is passed to the FileManager
. The FileManager
then
passes the CS2040CFile
to the FileEncoder
which translates it into raw data. The raw data is then written into
the data file using the BufferedWriter
.
Given below is how a single CS2040CFile
is entered into the data file:
Step 1: When a valid
CS2040CFile
is added to the application, it is passed to theFileManager
and addEntry() is invoked.
Step 2: The
CS2040CFile
is then passed to theFileEncoder
and aString
representing theCS2040CFile
is returned to theFileManger
.
Step 3: A
FileWriter
object is then created and aBufferedWriter
object is also created containing theFileWriter
.
Step 4: The previously encoded
String
is then passed to theBufferedWriter
andwrite()
andnewLine()
is called. This writes the encodedString
to the relevant data file and adds a new line to the data file.
Step 4:
close()
is called for both theBufferedWriter
andFileWriter
to stop them from writing to the data file further.
The following Sequence Diagram shows how a CS2040CFile
is encoded before being written to
the relevant data file.
Note: The lifeline for
FileWriter
andBufferedWriter
should end at the destroy marker (X) but due to limitation of PlantUML, the lifeline reaches the end of the diagram.
The help mechanism is facilitated by HelpCommand
. It extends the abstract Command
with an overridden execute()
method. Within the execute()
method, the input command after the c/
delimiter is parsed and checked against the
valid commands supported by CLIAlgo
. The command to which it matches is invoked from the Ui class.
Given below is an example usage of how the help c/add
mechanism behaves at each step.
Step 1: The user enters the
help
command, which is processed by theParser
which instantiates aHelpCommand
using the appropriate constructor and returns it toCLIAlgo
.
Step 2: The
execute()
method ofHelpCommand
is called byCLIAlgo
.
Step 3: Since the command provided is
add
, theHelpCommand
calls theprintHelpAdd()
method from theUi
. This method prints out instructions on how theadd
command should be used inCLIAlgo
.
Step 4: The
HelpCommand
object is destroyed and control is handed back to theCLIAlgo
.
The following Sequence Diagram shows how the help operation works.
Note: The lifeline for
HelpCommand
should end at the destroy marker (X) but due to limitation of PlantUML, the lifeline reaches the end of the diagram.
The add mechanism is facilitated by AddCommand
. It extends the abstract Command
with an overridden execute()
method. Within the execute()
method, the path of the CS2040CFile
, as specified by its name, is checked using
checkFileType
, to determine if the CS2040CFile
exists within the directory of the program. The topic of the
CS2040CFile
to be added is also checked using isValidTopic()
to ensure it is a valid topic in CS2040C,
and also the name of the CS2040CFile
is checked using isRepeatedCS2040CFile()
, to ensure that no other files
of the same name exists. Following which, 1 of 2 different other executions is called, depending on the type of the
CS2040CFile
.
Given below is an example usage of how the add feature behaves at each step.
Step 1: The user enters the add command, which invokes the
getUserInput()
method ofUi
object and returns the user input to theCLIAlgo
object. After which, it invokes theparse()
method of theParser
object and determines that it is an add command and creates a newAddCommand
object.
Step 2: The
CLIAlgo
object than invokes theexecute()
method of theAddCommand
object.
Step 3: The name of
CS2040CFile
is checked, to see if a file of that name exists within the directory. If it is not, theprintFileDoesNotExist()
method of theUi
object is invoked
Step 4: The topic name of the
CS2040CFile
is checked, to see if it belongs to one of the topics in CS2040C. If it is not, a newInvalidTopicCommand
object is created and executed.
Step 5: The name of
CS2040CFile
is checked, to see if a file of that name already exists inside theTopicManager
object, which means that there are duplicates.
Step 6: The
checkFileType
method is then used to check the type of theCS2040CFile
to be added. Given that theCS2040CFile
to be added is a.txt
file, a newAddNoteCommand
object would be created and itsexecute()
method invoked.
Step 7: The
execute()
method of theAddNoteCommand
object will then be invoked, and it will then handle the adding of the file into theFileManager
object by calling theaddEntry()
method. This updatesCLIAlgo
’s data file to include this newCS2040CFile
. Additionally, theCS2040CFile
is added into theTopicManager
object using theaddCS2040CFile()
method, to keep track of the name of theCS2040CFile
that the user has added.
The Sequence Diagram below shows how the AddCommand
works.
Note: The lifeline for
AddCommand
,InvalidTopicCommand
,AddNoteCommand
andInvalidCommand
should end at the destroy marker (X) but due to limitation of PlantUML, the lifeline reaches the end of the diagram.
The remove mechanism is facilitated by RemoveCommand
. It extends the abstract Command
with an overridden execute()
method.
Given below is an example usage of how the remove feature behaves at each step.
Step 1: The user enters the remove command, which is processed by the
Parser
using theparse()
method. TheParser
determines that it is remove command and creates a newRemoveCommand
object.
Step 2: The
CLIAlgo
object than invokes theexecute()
method of theRemoveCommand
object.
Step 3: The
TopicManager
object is checked, which invokes theprintRemoveFail()
method of theUi
object ifTopicManager
object is empty.
Step 4: The
TopicManager
object is checked to see if theCS2040CFile
to be removed exists inside theTopicManager
object. If it is not, a newNameNotFoundCommand
object is created and executed.
Step 5: After steps 3 and 4 checks are done, the
removeCS2040CFile()
method is invoked on theTopicManager
object.
Step 6: If the
CS2040CFile
is unsuccessfully removed from theTopicManager
object, theprintRemoveFail()
method is invoked by theUi
object.
Step 7: The
deleteEntry()
method ofFileManager
object is invoked. This updates the data file to no longer contain theCS2040CFile
that is being removed, andCLIAlgo
stops tracking thatCS2040CFile
.
Step 8: If the
CS2040CFile
is not deleted successfully fromFileManager
object, the control is returned back toCLIAlgo
object.
Step 9: Otherwise, the
updateBuffer()
method of theBuffer
object is invoked to clear the buffer, and theprintRemoveSuccess()
method of theUi
object is invoked.
The Sequence Diagram below shows how the RemoveCommand
works.
The list feature mechanism is facilitated by ListCommand
. It extends Command
with an
overridden execute()
method. It calls the getAllCS2040CFiles()
method from the TopicManager
to get all the
CS2040CFile
s stored in CLIAlgo
. It then prints them out to the user.
Given below is an example usage scenario and how the list feature behaves at each step.
Step 1: The user will input a command in the format
list
. The input will be read by theUi
and processed by theParser
. TheParser
will then call theprepareListCommand
to create a newListCommand
object.
Step 2: The
execute()
method of theListCommand
object will be executed.ListCommand
first checks if theTopicManager
is empty by calling theisEmpty()
method of theTopicManager
. If theTopicManager
is empty,ListCommand
will print out a message to inform the user that theTopicManager
is empty.
Step 3: If the
TopicManager
is not empty,ListCommand
calls thegetAllCS2040CFiles()
method from theTopicManager
which returns anArrayList<String>
containing the names and labels of allCS2040CFile
stored inCLIAlgo
.
Step 4:
ListCommand
iterates through theArrayList<String>
and prints the names of all theCS2040CFile
stored inCLIAlgo
.
The following Sequence Diagram shows how the list operation work.
Note: The lifeline for
ListCommand
should end at the destroy marker (X) but due to limitation of PlantUML, the lifeline reaches the end of the diagram.
The filter mechanism is facilitated by FilterCommand
. It extends Command
with an overridden execute()
method. The
FilterCommand
has 2 subclasses FilterByTopicCommand
and FilterByImportanceCommand
. Each with their own overridden
execute()
method. During execution, the FilterCommand
decides which of its subclass to instantiate and execute
depending on the keyWord
provided. Both FilterByTopicCommand
and FilterByImportanceCommand
objects calls either the getNotesByTopic()
or the getAllNotesByTopic()
methods in the TopicManager
.
FilterByTopicCommand
printAllTopics()
- Prints out all CS2040CFile
s stored in CLIAlgo that is sorted by topic
.printSingleTopic()
- Prints out all CS2040CFile
s stored in CLIAlgo that is tagged to the given topic
.FilterByImportanceCommand
printAllTopics()
- Prints out all CS2040CFile
s stored in CLIAlgo sorted by importance
.printSingleTopic()
- Prints out all CS2040CFile
s stored in CLIAlgo that is tagged to the given topic
sorted
by importance
.The access modifiers of these methods are private
can can only be accessed within FilterCommand
.
Given below is an example usage of how the filter by topic
mechanism behaves at each step.
Step 1: The user enters a command. The full command is read in by the
Ui
and processed by theParser
. If the user entered a valid command, theParser
will process the full command using theStringManipulation
interface and prepare the appropriateFilterCommand
object.
Step 2: If the
topic
field is left empty, theParser
will instantiate a newFilterCommand
object, setting thetopic
field to benull
. If thetopic
field is filled with a valid topic name, theParser
will instantiate a newFilterCommand
usingtopic
in its constructor.
Step 3: The
FilterCommand
is executed. Based on thekeyWord
used to instantiate it,FilterCommand
invokes the constructor of its subclass (FilterByTopicCommand
orFilterByImportanceCommand
) and calls theexecute()
method.
Step 4: If
topic
isnull
,FilterByTopicCommand
self-invokesprintAllTopics()
method which in turns callsgetAllCS2040CFilesGroupedByTopic()
from theTopicManager
. Iftopic
is notnull
and is valid, it self-invokesprintSingleTopic()
method which in turns callsgetCS2040CFilesByTopic()
from theTopicManager
.
Step 5: If
getAllCS2040CFilesGroupedByTopic()
is called, the TopicManager calls thegetAllCS2040CFilesInTopic()
for all non-emptyTopic
. TheFilterByTopicCommand
then prints out theCS2040CFile
s to the user.
The following Sequence Diagram shows how the filter by topic operation work.
Note: The lifeline for
FilterCommand
andFilterByTopicCommand
should end at the destroy marker (X) but due to limitation of PlantUML, the lifeline reaches the end of the diagram.
The TopoSort mechanism is facilitated by TopoCommand
. It extends Command
with an
overridden execute()
method, and stores internally the name of the CS2040CFile
and
topologically sorted notes as name
and topoSortedCS2040CFiles
.
Additionally, it implements the following operations:
printTopoSortedCS2040CFiles()
- Prints all CS2040CFile
s within and before a specific
target CS2040CFile
’s topic in a topological order.printSingleTopic()
- Prints all CS2040CFile
s of a single specific topic.These operations are private
and can only be accessed in TopoCommand
.
Given below is an example usage scenario and how the TopoSort mechanism behaves at each step.
Step 1: The user will input a command in the format
topo n/noteName
. The input will be read by theUi
and processed by theParser
. TheParser
will then call theprepareTopoCommand()
to create a newTopoCommand
object.
Step 2: The
execute()
method of theTopoCommand
object will be executed, which will check whether there are any saved notes (via theisEmpty()
method ofTopicManager
) and whether thenoteName
exists as a note in the application (via theisRepeatedCS2040CFile()
method ofTopicManager
).
Step 3: The
printTopoSortedCS2040CFiles()
method is called to obtain the relevant note files in topological order fromTopicManager
via thegetAllCS2040CFilesBeforeTopic()
method. This will be stored internally in aLinkedHashMap
calledtopoSortedCS2040CFiles
.
Step 4: For all topics present in
topoSortedCS2040CFiles
,printTopoSortedCS2040CFiles()
will be executed to print all note names present in topological order by topic. As the topics are saved in topological order, the printedCS2040CFile
names will be printed in the correct order.
The following sequence diagram shows how the TopoCommand
works.
Note: The lifeline for
TopoCommand
should end at the destroy marker (X) but due to limitation of PlantUML, the lifeline reaches the end of the diagram.
The export function is supported by a singleton object, Buffer
.
Whenever a filter
or topo
command is called, the method
within the Buffer
object, updateBuffer()
would be called which
replaces the CS2040CFile
objects stored within the buffer with the
output CS2040CFile
objects being output from the filter
command.
When an export
command is entered, a ExportCommand
object is instantiated. The ExportCommand
object extends
Command
with an overridden execute()
method. When the
execute()
method is called, the exportBuffer()
method in the
Buffer
is called. This copies all the CS2040CFile
stored in
the buffer to the export folder stored at ./export
and opens
the folder by using the default file explorer of the system.
Take note that this does not work for some Operating Systems without a file explorer (e.g. some Linux-based systems)
The following sequence diagram shows how the export feature works.
Note: The lifeline for
ExportCommand
andEmptyBufferCommand
should end at the destroy marker (X) but due to limitation of PlantUML, the lifeline reaches the end of the diagram.
Manage notes faster and more efficiently than a typical mouse/GUI driven application
Version | As a(n) … | I want to … | So that I can … |
---|---|---|---|
v1.0 | user | be able to add notes | view them later |
v1.0 | user | be able to delete notes | replace existing notes with new ones |
v1.0 | user | be able to save my notes | reuse the saved data after closing and reopening the application |
v1.0 | user | list all my notes | see the amount of content I have to study |
v1.0 | first time user | to be able to know how to use the application | N/A |
v1.0 | tutor teaching CS2040C | organize my notes according to their topic | easily find the relevant content |
v1.0 | student in CS2040C | be able to study CS2040C according to their topic linkages in Visualgo | study the prerequisite topics for more advanced topics |
v1.0 | efficiency-obsessed student in CS2040C | be able to find relevant topic notes easily | study the relevant topics efficiently |
v2.0 | organized student in CS2040C | be able to sort my notes according to level of importance | identify which topics to study first when I am preparing for my exam |
v2.0 | student in CS2040C | be able to list my notes in topological sort order | study the prerequisite topics first before studying the more advanced topics |
v2.0 | CS2040C student with weekly programming assignments | be able to save my .cpp files |
refer to them in the future |
v2.0 | student in CS2040C | be able to extract out relevant files into a folder | easily access them during revision |
(For all use cases below, the System refers to the CLIAlgo
Notes Manager and the Actor is the user
unless
specified otherwise)
Use case: Delete a note
MSS
Use case ends.
Extensions
help
command.Use case ends.
help
command.Use case ends.
11
or above installed..txt
or .cpp
Below are guidelines for testers to test the application
Open in Terminal
java -jar .\NAME_OF_JAR_FILE
where NAME_OF_JAR_FILE
is the file name of the jar file.data
folder created with some .txt
files in the same directory as the
jar file. There also would be an export
folder
created.exit
.
======================================================
Thank you for using CLIAlgo! Study hard!
======================================================
Note
add n/NOTE_NAME t/TOPIC_NAME
or add n/CODE_NAME t/TOPIC_NAME
.
NOTE_NAME
would represent the name of the note.
NOTE_NAME.txt
..jar
file of this application else it’ll print an error
message.CODE_NAME
would represent the name of the code file.
CODE_NAME.cpp
..jar
file of this application else it’ll print an error
message.TOPIC_NAME
would represent the Topic
the note is tagged to.
TOPIC_NAME
is valid.
Example :
add n/name t/LINKED_LIST
TOPIC_NAME
is invalid.
Example :
add n/name t/linkedlist
add n/name t/SOMETHING
Example :
add n/ t/
add n/name t/
n/
or t/
would cause an error message to be printed.
Example :
add name LINKED_LIST
add note LINKED_LIST
Example :
add n/name t/LINKED_LIST i/5
Example:
add n/name t/LINKED_LIST i/100
CS2040CFile
list
.
CS2040CFile
stored.
CS2040CFile
stored.CS2040CFile
include both Notes
and Codes
.CS2040CFile
stored.
File
remove n/FILE_NAME
.
NAME
would represent the name of the note or code
stored.Note
or Code
with FILE_NAME
exists.
Note
or Code
is deleted successfully and a message would be printed.Note
or Code
with FILE_NAME
does not exist.
Example :
remove n/
n/
or t/
would cause an error message to be printed.
Example :
remove name
CS2040CFile
filter k/KEYWORD [t/TOPIC_NAME]
.
KEYWORD
would be topic
representing filtering by
Topic
or importance
representing filtering by the
importance attribute tagged to each Note
or Code
added into the application.TOPIC_NAME
would represent the Topic
the note is
tagged to or Importance
level.TOPIC_NAME
is an optional field
TOPIC_NAME
is valid.
Example :
filter k/topic t/LINKED_LIST
TOPIC_NAME
is invalid.
Example :
filter k/topic t/linkedlist
filter k/topic t/SOMETHING
k/
blank would cause an error message to be printed.
Example :
filter k/
t/
is valid
Example :
filter k/topic
CS2040CFile
filter
or topo
, the CS2040CFile
that were listed would be stored in the Buffer
.CS2040CFile
would be copied to the export
folder and given that it is supported by the Operating
System, the export
folder would automatically be opened.
CS2040CFile
would still be copied into the export
folder.CS2040CFile
copied would be identical to the CS2040CFile
in the directory where the .jar
file is located.filter
or topo
is called again, the export
folder would not be updated until export
is called
again.Notes
and Codes
are represented as :
NAME&@PATH_TO_FILE&@TOPIC_NAME&@IMPORTANCE
TOPIC_NAME
only&@
Example:
Initial .txt file:
TEST1&@test1.txt&@wrr TEST2&@test2.txt&@SORTING
After running application:
TEST2&@test2.txt&@SORTING
Example:
Initial .txt file:
TEST1&@ TEST2test2.txtSORTING
After running application:
- If any of the data files is/ are removed while the application is running, CLIAlgo would recreate the data files using the most recent data during the next
add
orremove
operation.- If a file stored in the data file does not exist in the directory, it is considered to be a corrupted entry.