About the project
Our team consisting of 4 computer science students were tasked with enhancing a basic command line interface (CLI) desktop addressbook application for our Software Engineering project. We chose to morph the application into a study assistant application catering to NUS students called ModuleBook. ModuleBook is specially designed to help NUS students find and keep track of the modules they are taking each semester; add and maintain deadlines related to each module; keep a list of helpful and commonly used website links for easy access. This document presents my contributions to this project.
This is what our project looks like:
Note the use of the following symbols and formatting in this document:
Words
- phrases in this format indicates that this is a command that can be inputted into the command line and executed by the application, or they are referring to components, classes or objects in the architecture of the application.
This symbol indicates important information |
Indicates a tip or advice |
Summary of contributions
This section gives a summary of my contribution to the team project in terms of coding, documentation and other feature improvements.
-
Major enhancement: Added link feature to manage links in a TrackedModule.
-
What it does: The link command allows the user to manage a set of website links. The link command currently supports add, delete , edit, go and mark actions.
-
Justification: Some modules may have a module website, or the user may have found other academic websites that contain information helpful to their studies. In this case, the user can add the links to the specific module in ModuleBook and access it easily from the application.
-
Highlights: This feature checks for validity of links provided and ensures that the user does not entire the same name for links twice so it would be easier for the user to manage. This feature was designed with the user’s needs in mind. Commands has been simplified so each action can be done with minimal typing. Some commands can be done through the GUI as well.
-
Credit: A third-party library, Apache Commons, was imported to check for the validity of links provided.
-
-
Code contributed: [RepoSense]
-
Other contributions:
-
Documentation:
-
Community:
-
Reviewed Pull Requests (with non-trivial review comments): #16, #57
-
Reported bugs and offered suggestions for other teams: PE Dry Run Repo
-
-
Tools:
-
Integrated a third-party library (Apache Commons) to the project: #40
-
-
Contributions to the User Guide
We had to update the original addressbook user guide to match our morphed application, ModuleBook. The following section are excerpts from my contribution to this task. They showcase my ability to write documentation targeting end-users. |
Manage links in modules: link
Link commands are only available when viewing a module and only valid on currently displayed tracked modules.
Before you use any link command, make sure you are viewing your desired course module first.
|
If you happen to forget any of the url paired with the names you have entered, simply hover over the button and the information will be displayed. |
Adding link to module: link add n/LINK_NAME l/LINK_URL
You can use this command to add a link with the given name to a selected TrackedModule. This is useful if you manage to come across an important website related to a certain module you are currently taking and wish to note it down. A button will be created in ModuleBook with name you specified.
Suppose you are taking CS2103, and you will frequently visit the course website to check for new updates or tasks to complete by the next milestone. You wish to put the link somewhere so you can access it easily and also manage them effectively. You can do so using the following steps:
-
Enter the command. Make sure you are viewing the CS2103 module.
-
Press Enter. You should see a new button created in the Links section and a success message.
Editing existing link: link edit n/LINK_NAME [nn/NEW_NAME nl/NEW_URL]
You can use this command to edit the name and/or url of an existing link.
Suppose the name "Nusmods Timetable" is too long and you want to change it to just "Nusmods". It is very simple to achieve:
-
Enter the corresponding command
-
Press Enter. The link should be updated with the new name and a success message should appear.
Launching the link: link go n/LINK_NAME
You can use this command to access a link in the default browser of your system.
If you are using any lesser known operating system, the app may not be able to detect it and this feature may not work as intended. |
Now suppose you wish to access a link you provided previously (from the add
command). Doing that is very simple:
-
Enter the command
link go n/Course Website
-
The website should open in the default browser of your system and a success message should display.
Alternatively, you can access the link by clicking on it through the GUI as well. |
Marking/unmarking a link: link mark/unmark n/LINK_NAME
Some links may be more important than others, and you may access them more frequently. To keep track of that, you can mark them using the mark
feature.
Suppose you go to the course website of CS2103 very often and want to make sure you can identify the link immediately, mark it so it stays at the front all available links:
-
Enter the command
link mark n/Course Website
-
Press Enter. The specified link will now be marked with a symbol and brought to the front of the list.
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. |
Link Management Feature
The link management feature allows users to add and manage a set of website links that will be associated with a given module.
Overview of link feature
Implementation
Our application currently supports adding and managing of links specific to certain modules.
The link management feature is primarily facilitated by the following classes:
-
Link
- represents a link object -
TrackedModule
- represents a module that was tracked. Stores theLink
objects related to it. -
LinkCommand
- embodies thelink
command input given by the user and contains the necessary changes that will be made to theTrackedModule
object. -
LinkCommandParser
- parses user input related tolink
commands and returns the correspondingLinkCommand
to be executed.
Each link
object is stored in an ArrayList<Link>
, which in turn is stored in its corresponding TrackedModule
.
In summary, the class diagram of how Link
is implemented is shown as:
The link feature currently recognizes and supports add, delete, edit and launch commands.
Link commands are parsed through the LinkCommandParser
class, which in turn calls the respective XYZLinkCommandParser
class (i.e. AddLinkCommandParser
, EditLinkCommandParser
).
The XYZLinkCommandParser
class parses and returns a corresponding XYZLinkCommand
class, which calls execute()
and the TrackedModule
will be updated accordingly if the execution was successful.
The following activity diagram summarizes what happens when the link command is entered and executed:
An example usage scenario of an add link operation is given below and the behavior of the link management feature is shown.
-
The user launches the application with an existing save file.
ModuleBook
is initialized with existingTrackedModule
. -
The user inputs
link add n/LINK_NAME l/LINK_URL
to add a link with nameLINK_NAME
, linked toLINK_URL
to theTrackedModule
with the correspondingMODULE_INDEX
. -
LogicManager
receives user input and parses it usingModuleBookParser#parseCommand()
.ModuleBookParser
reads theCOMMAND_WORD
and identifies the input as aLink
related command and passes the input toLinkCommandParser
. -
LinkCommandParser
determines theadd
action required. It then proceeds to pass the relevant input toAddLinkCommandParser
. -
AddLinkCommandParser
checks for the validity ofLINK_URL
given by the user and creates the relevantLink
andAddLinkCommand
objects. -
AddLinkCommand
callsModel#getDisplayedModule()
to find the required module. If it does not exist or is not currently tracked,AddLinkCommand
throws aCommandException
. Otherwise, it then proceeds to callTrackedModule#hasLinkTitle(LINK_NAME)
to check for an existingLink
object with the sameLINK_NAME
. -
If such a
Link
object exists,AddLinkCommand
aborts and throws aCommandException
. Otherwise, the createdLink
will be added to the specifiedTrackedModule
. -
If the operation is successful, a
CommandResult
with the success message will be returned.
Design Considerations
Aspect: Data structure used for link management
-
Alternative 1: All
TrackedModule
maintain aArrayList<Link>
. AddingLink
objects will add to thisArrayList
.-
Pros: Easy to implement and edit for beginner programmers.
-
Cons: Accessing and editing existing
Link
might be less efficient. If number ofLink
objects maintained increases,ArrayList
may not be optimal.
-
-
Alternative 2: Use
HashSet<Link>
to maintainLink
in eachTrackedModule
-
Pros: Reduces access time, since
Link
objects can be obtained by givingLINK_TITLE
, rather than searching the list linearly for a matching object. -
Cons: Difficult to add features. Future implmentations may add a
Priority
feature toLink
objects.HashSet
does not support any form of sorting and thus may pose a problem.
-
-
Solution (current implementation): Adopt alternative 1. Since from a user standpoint, the number of links added to any module should not be too large to affect performance of application.