By: M11-02 Since: Feb 2019 Licence: MIT

1. Introduction

Student Buddy is a desktop application tailored for users who are comfortable with using a Command Line Interface (CLI), while retaining a Graphical User Interface (GUI) for ease of use. The use of a CLI for user input allows users to manage their tasks more efficiently than when using a conventional user interface.

2. Setting up

2.1. Prerequisites

  1. JDK 9 or later

    JDK 10 on Windows will fail to run tests in headless mode due to a JavaFX bug. Windows developers are highly recommended to use JDK 9.
  2. IntelliJ IDE

    IntelliJ by default has Gradle and JavaFx plugins installed.
    Do not disable them. If you have disabled them, go to File > Settings > Plugins to re-enable them.

2.2. Setting up the project in your computer

  1. Fork this repo, and clone the fork to your computer

  2. Open IntelliJ (if you are not in the welcome screen, click File > Close Project to close the existing project dialog first)

  3. Set up the correct JDK version for Gradle

    1. Click Configure > Project Defaults > Project Structure

    2. Click New…​ and find the directory of the JDK

  4. Click Import Project

  5. Locate the build.gradle file and select it. Click OK

  6. Click Open as Project

  7. Click OK to accept the default settings

  8. Open a console and run the command gradlew processResources (Mac/Linux: ./gradlew processResources). It should finish with the BUILD SUCCESSFUL message.
    This will generate all resources required by the application and tests.

  9. Open MainWindow.java and check for any code errors

    1. Due to an ongoing issue with some of the newer versions of IntelliJ, code errors may be detected even if the project can be built and run successfully

    2. To resolve this, place your cursor over any of the code section highlighted in red. Press ALT+ENTER, and select Add '--add-modules=…​' to module compiler options for each error

  10. Repeat this for the test folder as well (e.g. check HelpWindowTest.java for code errors, and if so, resolve it the same way)

2.3. Verifying the setup

  1. Run the seedu.address.MainApp and try a few commands

  2. Run the tests to ensure they all pass.

2.4. Configurations to do before writing code

2.4.1. Configuring the coding style

This project follows oss-generic coding standards. IntelliJ’s default style is mostly compliant with ours but it uses a different import order from ours. To rectify,

  1. Go to File > Settings…​ (Windows/Linux), or IntelliJ IDEA > Preferences…​ (macOS)

  2. Select Editor > Code Style > Java

  3. Click on the Imports tab to set the order

    • For Class count to use import with '*' and Names count to use static import with '*': Set to 999 to prevent IntelliJ from contracting the import statements

    • For Import Layout: The order is import static all other imports, import java.*, import javax.*, import org.*, import com.*, import all other imports. Add a <blank line> between each import

Optionally, you can follow the UsingCheckstyle.adoc document to configure Intellij to check style-compliance as you write code.

2.4.2. Updating documentation to match your fork

After forking the repo, the documentation will still have the SE-EDU branding and refer to the se-edu/addressbook-level4 repo.

If you plan to develop this fork as a separate product (i.e. instead of contributing to se-edu/addressbook-level4), you should do the following:

  1. Configure the site-wide documentation settings in build.gradle, such as the site-name, to suit your own project.

  2. Replace the URL in the attribute repoURL in DeveloperGuide.adoc and UserGuide.adoc with the URL of your fork.

2.4.3. Setting up CI

Set up Travis to perform Continuous Integration (CI) for your fork. See UsingTravis.adoc to learn how to set it up.

After setting up Travis, you can optionally set up coverage reporting for your team fork (see UsingCoveralls.adoc).

Coverage reporting could be useful for a team repository that hosts the final version but it is not that useful for your personal fork.

Optionally, you can set up AppVeyor as a second CI (see UsingAppVeyor.adoc).

Having both Travis and AppVeyor ensures your App works on both Unix-based platforms and Windows-based platforms (Travis is Unix-based and AppVeyor is Windows-based)

2.4.4. Getting started with coding

When you are ready to start coding,

  1. Get some sense of the overall design by reading Section 3.1, “Architecture”.

  2. Take a look at Appendix A, Suggested Programming Tasks to Get Started.

3. Design

3.1. Architecture

Architecture
Figure 1. Architecture Diagram

The Architecture Diagram given above explains the high-level design of the App. Given below is a quick overview of each component.

The .pptx files used to create diagrams in this document can be found in the diagrams folder. To update a diagram, modify the diagram in the pptx file, select the objects of the diagram, and choose Save as picture.

Main has only one class called MainApp. It is responsible for,

  • At app launch: Initializes the components in the correct sequence, and connects them up with each other.

  • At shut down: Shuts down the components and invokes cleanup method where necessary.

Commons represents a collection of classes used by multiple other components. The following class plays an important role at the architecture level:

  • LogsCenter : Used by many classes to write log messages to the App’s log file.

The rest of the App consists of four components.

  • UI: The UI of the App.

  • Logic: The command executor.

  • Model: Holds the data of the App in-memory.

  • Storage: Reads data from, and writes data to, the hard disk.

Each of the four components

  • Defines its API in an interface with the same name as the Component.

  • Exposes its functionality using a {Component Name}Manager class.

For example, the Logic component (see the class diagram given below) defines it’s API in the Logic.java interface and exposes its functionality using the LogicManager.java class.

LogicClassDiagram
Figure 2. Class Diagram of the Logic Component

How the architecture components interact with each other

The Sequence Diagram below shows how the components interact with each other for the scenario where the user issues the command delete 1.

SDforDeletePerson
Figure 3. Component interactions for delete 1 command

The sections below give more details of each component.

3.2. UI component

UiClassDiagram
Figure 4. Structure of the UI Component

API : Ui.java

The UI consists of a MainWindow that is made up of parts e.g.CommandBox, ResultDisplay, TaskListPanel, StatusBarFooter, CalendarPanel etc. All these, including the MainWindow, inherit from the abstract UiPart class.

The UI component uses JavaFx UI framework. The layout of these UI parts are defined in matching .fxml files that are in the src/main/resources/view folder. For example, the layout of the MainWindow is specified in MainWindow.fxml

The UI component,

  • Executes user commands using the Logic component.

  • Listens for changes to Model data so that the UI can be updated with the modified data.

3.3. Logic component

LogicClassDiagram
Figure 5. Structure of the Logic Component

API : Logic.java

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

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

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

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

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

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

DeletePersonSdForLogic
Figure 6. Interactions Inside the Logic Component for the delete 1 Command

3.4. Model component

ModelClassDiagram
Figure 7. Structure of the Model Component

API : Model.java

The Model,

  • stores a UserPref object that represents the user’s preferences.

  • stores the user’s data.

  • exposes an unmodifiable ObservableList<Task> that can be 'observed' e.g. the UI can be bound to this list so that the UI automatically updates when the data in the list change.

  • does not depend on any of the other three components.

As a more OOP model, we can store a Tag list in Task Manager, which Task can reference. This would allow Task Manager to only require one Tag object per unique Tag, instead of each Task needing their own Tag object. An example of how such a model may look like is given below.

ModelClassBetterOopDiagram

3.5. Storage component

StorageClassDiagram
Figure 8. Structure of the Storage Component

API : Storage.java

The Storage component,

  • can save UserPref objects in json format and read it back.

  • can save the Task Manager data in json format and read it back.

3.6. Common classes

Classes used by multiple components are in the seedu.address.commons package.

4. Implementation

This section describes some noteworthy details on how certain features are implemented.

4.1. Login Feature

4.1.1. Current Implementation

The login mechanism is facilitated by TaskManager, SignupCommand, LoginCommand, LogoutCommand, DeleteAccountCommand, LoginEvent, GenerateHash, JsonLoginStorage.

The login feature is mainly supported by the Command class and account class.

There are two types of accounts in login feature which are implemented in the account class:

  • A normal user account.

  • An admin account.

All username and hashed password are stored in a JSON file.

AccountClassDiagram

The class diagram above illustrates the account class.

In model class, there are methods to check for:

  • loginStatus (if the user is logged in)

  • adminStatus (if the admin is logged in)

  • userExists (if the username is already taken)

  • accountExists (if there is already an account created)

In this feature, there are 4 main commands.
The flow on how the commands are executed and their respective sequence diagrams will be further elaborated below:
1. Signup and Login Command
2. Section 4.1.3, “Logout Command”
3. Section 4.1.4, “DeleteAcc Command”

4.1.2. Signup and Login Command

Signup Command creates an account for the user and stores their username and password in a JSON file.

Login Command logs in the account for the user by checking the username and password stored in the JSON file.

Given below is an example usage scenario of signup. The command word can be swapped to login for Login Command.

Step 1. The user signs up and keys in username and password using the command signup u/USERNAME p/PASSWORD.

Step 2. The TaskManagerParser recognises the command word as a signup from SignupCommand and calls SignupCommand.

Step 3. SignupCommandParser will parse the arguments to SignupCommand. SignupCommand will call the following commands which are linked to LoginEvent.

getLoginStatus to check if the user is already logged in.
userExists to check if there is already an account with the same username.
accountExists to check if an account has already been created.

If the arguments passes all the commands, newUser(user) {loginUser(user) for Login Command} will be called to store the username and hashed password in a User class. It will then pass the User object to JsonLoginStorage.

Step 4. JsonLoginStorage retrieves the User object to read and write Json files with the correct Json properties.

Step 5. It will then return to loginEvent then to SignupCommand and returns the user a successful signup output.

The following sequence diagram below shows the flow of signup and login respectively from Step 1 to Step 5 above.

SignUpSequenceDiagram
LoginSequenceDiagram

4.1.3. Logout Command

Logout Command logs the user out of their account.

Given below is an example usage scenario of logout.

Step 1. The user logs out by keying in the command logout.

Step 2. The TaskManagerParser recognises the command word as a logout from LogoutCommand and calls LogoutCommand.

Step 3. LogoutCommand will call the following commands which is linked to LoginEvent.

getLoginStatus to check if the user is already logged out.
getAdminStatus to check if the admin is already logged out.

If the arguments passes getLoginStatus and getAdminStatus, logout will be called in LoginEvent.

Step 4. In LoginEvent, getLoginStatus and getAdminStatus will be set to false and will then return to LoginCommand to return the user a successful logout output.

The sequence diagram below shows the flow of logout from Step 1 to Step 4 above.

LogoutSequenceDiagram

4.1.4. DeleteAcc Command

DeleteAcc only accessible to admins. DeleteAcc deletes the entire account.

Given below is an example usage scenario of DeleteAcc.

Step 1. The admin logs in by keying in username and password using the command login u/admin p/admin.

Step 2. The admin keys in DeleteAcc to delete the account.

Step 3. The TaskManagerParser recognises the command word as delete account from DeleteAccountCommand and calls DeleteAccountCommand.

Step 4. DeleteAccountCommand will call the following command which is linked to LoginEvent.

getAdminStatus to check if an admin is logged in.

If the arguments passes getAdminStatus, deleteAccount() will be called in LoginEvent.

Step 5. In LoginEvent, JsonLoginStorage’s deleteAccount() will be called to delete the JSON file.

Step 6. LoginEvent will then call reinitialise() to create the Json file without any username and password stored in it. reinitialise() is assisted by JsonLoginStorage and writeJson().

Step 7. LoginEvent will return to DeleteAccountCommand and returns the user a successful login output.

The sequence diagram below shows the flow of deleteacc from Step 1 to Step 7 above.

DeleteAccountSequenceDiagram

4.1.5. Design Considerations

Aspect: How LoginEvent and JsonLoginStorage works together

Alternative 1 (current choice): LoginEvent and JsonLoginStorage are in separate classes.

  • Pros: Follows OOP coding. The codes will look more organised and clean.

  • Cons: Coders will have to look at both files to code or debug as both calls each other frequently.

Alternative 2: LoginEvent and JsonLoginStorage are in the same class.

  • Pros: Easy to read and debug, all codes are in one file and thus easier for other coders to modify.

  • Cons: Does not follow OOP coding. The codes in the file will look messy.

Aspect: How LoginEvent fits into the code

Alternative 1 (current choice): LoginEvent is implemented into the logic.

  • Pros: The code will be efficient and effective. It will be neat and the flow will be well structured. Single Responsibility Principle and Separation of Concerns is maintained in the code.

  • Cons: Might be confusing as LoginEvent is used frequently. Coders might need to fully understand how other classes work before looking at LoginEvent.

Alternative 2: LoginEvent is implemented on its own.

  • Pros: It would be easier for coders to visualise and debug. LoginEvent can still run the entire Taskmanager.

  • Cons: There would be a lot of repeated and redundant codes. Most of the functions in the logic component will be repeated. This will violate Single Responsibility Principle and Separation of Concerns.

Aspect: How the securing of password is implemented

Alternative 1 (current choice): Create my own hashing function to secure password.

  • Pros: Hashing is a one way function. With a proper hashing design, there is no way to reverse the hashing process to reveal the original password.

  • Cons: Need to code out my own hashing function. More logic and function have to be written. The code will be more complex.

Alternative 2: Use encryption library to secure password. Eg. MD5 hashing

  • Pros: Do not need to code much. Most of the function are one line. Easy to implement.

  • Cons: Encryption is a two-way function. Encrypted strings can be decrypted with a proper key. The password will not be secure. MD5 is not suitable for sensitive information. Collisions exist with the algorithm, and there have been successful attacks against it.

4.2. Add Notes Feature

This feature allow users to add notes regarding miscellaneous matters.

The class diagram below illustrates the Notes class.

ClassDiagramForNotes

4.2.1. Current Implementation

The add notes mechanism is facilitated by AddNotesCommand. A Notes object is instantiated which contains of Heading, Content and Priority.

Given below is an example usage scenario and how the add notes mechanism behaves at each step.

Step 1. The user enters in a note with its associated parameters. e.g note h/popular c/buy pilot G-2 blue pens p/2.

Step 2. The LogicManager calls ParseCommand with that input.

Step 3. The TaskManagerParser is called and returns a AddNotesCommand object to Logic Manager.

Step 4. The LogicManager will call execute method on the AddNotesCommand object.

Step 5. ModelManager is then called and will check if the note already exists.

Step 6. If note already exists, DuplicateNotesException will be thrown. This will return a string message "This note already exists in the task list".

Step 7. Else, addNotes(notes) method is called and note is added.

The sequence diagram below illustrates how the mechanism for adding notes function.

AddNotesSequenceDiagram

4.2.2. Design Considerations

Aspect: Checking for duplicate notes

  • Alternative 1(current choice): Implement a method to check new notes entered. If a new note added is exactly the same as exisitng notes in the Student Buddy, it will be classified as duplicate note and cannot be added.

    • Pros: Easy to implement

    • Cons: May neglect duplicate notes that mean the same because the check is for the exact same heading and content. The following 2 examples shown below will be identified as different notes due to an additional s in example 2

      1. h/popular c/buy ring file

      2. h/popular c/buy ring files

  • Alternative 2: Implement a method to check for similarity of notes. If similarity is more than 90%, note is classified as same note and cannot be added.

    • Pros: Can reduce the amount of duplicate notes that are added.

    • Cons: Difficult to implement and cannot eliminate duplicate notes completely.

Final decision: Alternative 1 was chosen due to the significantly easier implementation.

4.3. Delete Notes Feature

This feature allow users to delete notes that are no longer wanted.

4.3.1. Current Implementation

The Notes mechanism is facilitated by DeleteNotesCommand from the Logic component. Upon executing the DeleteNotesCommand, the unwanted note will be removed from the memory of the Student Buddy.

Given below is an example usage scenario and how the deletenote mechanism behaves at each step.

Step 1. The user calls the DeleteNotesCommand with the note’s displayed index. e.g deletenote 1.

Step 2. The LogicManager calls parseCommand with the user input.

Step 3. The TaskManagerParser is called and it returns a DeleteNotesCommand object to the LogicManager.

Step 4. The LogicManager will call execute() on the DeleteNotesCommand object. If no note of the corresponding index is found,

it would return a string of message MESSAGE_INVALID_NOTES_DISPLAYED_INDEX.

Step 5. The Logic component then interacts with the Model component which then calls TaskManager component within it to execute

deleteNotes(target) to remove the note.

Step 6. The command result would then return the message MESSAGE_DELETE_NOTE_SUCCESS in a string.

The following diagram illustrates how the deletenote operation works:

DeleteNotesSequenceDiagram

4.3.2. Design Considerations

Aspect: Weighing user experience to convenience of users

  • Alternative 1: Implement a method to strike off notes that are completed so that users can keep track of what notes they have added in as well as the ones they finished.

    • Pros: Better user experience

    • Cons: May cause incovenience as users have to delete away completed notes every few days so as to allow easier viewing of latest notes.

  • Alternative 2(current choice): Deleting completed notes away.

    • Pros: Easy to implement

    • Pros: Easy for users to manage completed notes.

    • Cons: No sense of achievement as users are unable to view the amount of work completed.

Final decision: Alternative 2 was chosen due to it being more practical and convenient to users.

4.4. Task Feature

Current Implementation

The task list is created by refactoring the existing code in the Address Book Level 4

The class diagram below illustrates the task class.

TaskClassDiagram

4.5. Sort Task List Feature

4.5.1. Current Implementation

The sorting mechanism is facilitated by TaskManager, Model and SortTaskList.

Given below is an example usage scenario.

Step 1. The user keys in sort ATTRIBUTE, the SortCommandParser will trim the command to get the attribute.

Step 2. If the attribute is valid, it will then create a new SortCommand and execute with the given attribute.

Step 3. SortCommand will then call ModelManager#sortTask(toSortBy).

Step 4. It will then call TaskManager#sortTask(attribute). Then we convert the relevant attributes of the tasks in the Task List to string to compare using string#compareTo().

Step 5. Then, we use setTasks() in UniqueTaskList to update the Task List. After returning the sorted Task List, the Task Manager is then committed.

The Sequence Diagram below illustrates how the sort mechanism functions. More specifically, sorting by module code.

SortSequenceDiagram

4.5.2. Design Considerations

Aspect: How sort executes
  • Alternative 1 (current choice): Write a class separately for handling the sorting of the task list.

    • Pros: Easy to read and debug, Follows OOP coding and thus easier for other coders to modify.

    • Cons: Difficult to implement.

  • Alternative 2: Write a method for each attribute in TaskManager.

    • Pros: Easy to implement.

    • Cons: Does not follow OOP coding.

4.6. [Proposed] Delete overdue

4.6.1. Proposed Implementation

Using the existing daysRemaining variable, upon entering DeleteOverdue in the command line, the command will iterate through all the tasks and check the value of daysRemaining. If it is less than 0, the command will call the DeleteCommand to delete the overdue task.

4.6.3. Aspect: How the delete overdue command executes

  • Alternative 1 (current choice): Write the command such that whenever there is an overdue task, it will call the delete command.

    • Pros: Easy to use as it does not require changing the existing code much.

    • Cons: Will need to iterate through all the tasks.

  • Alternative 2: Create a new class to store all overdue tasks that updates itself whenever a task is overdue.

    • Pros: Faster as it does not require iterating through all tasks.

    • Cons: Requires more space to store all the overdue tasks

4.7. Calendar feature

4.7.1. Current Implementation

The Calendar extends the Student Buddy GUI with an easy to read interface for tracking task deadlines. It is composed of three classes, CalendarPanel, CalendarCell and CalendarCellTask. Furthermore, it uses the JavaFX files CalendarPanel.fxml and CalendarCell.fxml to format and structure the display.

CalendarPanel is the base class, which builds and fills the calendar grid.

CalendarCell represents an individual cell of the grid in CalendarPanel.

CalendarCellTask represents an individual task inside each CalendarCell.

CalendarPanel.fxml is a ScrollPane containing a GridPane. The GridPane acts as the calendar grid.

CalendarCell.fxml is a VBox containing a Text, and a ScrollPane containing another VBox. The Text is the date of a calendar cell, and the second VBox contains the list of tasks in a cell.

The following class diagram illustrates the relationships between CalendarPanel, CalendarCell and CalendarCellTask:

CalendarClassDiagram

The following steps show how the Calendar is built on startup:

Step 1: The constructor of CalendarPanel is called, thereby creating a new instance of CalendarPanel.

Step 2: buildCalendarPane(taskList) is called, which contains function calls to buildGrid(), createHeaderCells(), writeMonthHeader(), writeDayHeaders(), and createCalendarCells(taskList).

Step 3: buildGrid() populates the calendar grid with the correct number of rows and columns.

Step 4: createHeaderCells() fills the first two rows of the calendar with the month header cell and day header cells.

Step 5: writeMonthHeader() writes the current month of the user’s system clock to the month header cell.

Step 6: writeDayHeaders() writes the days of the week to the day header cells, using the enumeration HEADERS.

Step 7: createCalendarCells(taskList) fills in the remaining calendar cells with CalendarCell instances.

  • Step 7.1: CalendarCell calls setDate(date) and setMonth(month) to set the date and month of the cell.

  • Step 7.2: getTasks(taskList) is called, which uses the task list stored in the app to create a list of CalendarCellTask s applicable for the cell according to the date and month.

  • Step 7.3: addTasksToCell() sorts the list of CalendarCellTask s according to their priority, then adds them to the cell.

  • Step 7.4: setAppearance() sets the background and border of the cell.

Step 8: Done.

The following sequence diagram illustrates the process outlined above:

CalendarBuildSequenceDiagram

Whenever the task list is updated, the function createCalendarCells(taskList) is called, which replaces the CalendarCell and CalendarCellTask instances in the CalendarPanel.

If the selected task is changed, or the month to be displayed changes (see Section 4.8, “Month view change feature”), the function resetCalendar() is called, which clears the calendar grid and resets the row and column constraints. Then buildCalendarPane(taskList) is called to rebuild the calendar.

4.7.2. Design Considerations

Aspect: How the Calendar is built
  • Alternative 1 (current choice): Separate the calendar panel, calendar cells and tasks into their own classes.

    • Pros: Reduces complexity of CalendarPanel class, making it easier to understand how the calendar is built.

    • Cons: May have performance issues in terms of memory usage.

  • Alternative 2: Separate every component of the Calendar into their own classes (e.g. into CalendarPane, CalendarGrid, HeaderCell, ContentCell, etc).

    • Pros: Follows the principles of Single Responsibility Principle and Separation of Concerns strictly.

    • Cons: Even more memory usage, may make the code difficult to read and understand for future maintainers if they are unused to code spanning several files.

  • Alternative 3: Combine all Calendar related code into a single class.

    • Pros: No need to navigate between different classes.

    • Cons: The class will be very long and complex, making the code difficult for future maintainers to read, understand and change. Violates the principles of Single Responsibility Principle and Separation of Concerns.

  • Rationale for choice:

    • It is the middle ground between alternatives 2 and 3, and thus strikes a balance between readability, maintainability and following Object-Oriented Programming principles. While it does not strictly follow the principles of OOP, it is easy to read the code and understand the processes involved, and is maintainable. This is important, as it is likely that future maintainters will be new Computer Science student undergraduates.

Aspect: How the calendar is updated in real time
  • Alternative 1 (current choice): Replace the previous CalendarCell and CalendarCellTask instances with with new instances when the task list changes.

    • Pros: Easy to read and to understand, simpler and easier to implement.

    • Cons: Potential performance issues. If the list of tasks is very large, rebuilding the Calendar at every step may result in degraded performance manifested as a loss of responsiveness to user commands.

  • Alternative 2: Have CalendarCell and CalendarCellTask instances automatically update as the task list changes.

    • Pros: No need to rebuild the entire calendar when the task list changes, instead only updating the cells and tasks that are affected.

    • Cons: Adds another layer of abstraction, which can cause difficulty in understanding how the Calendar works.

  • Rationale for choice:

    • The choice of alternative 1 was made due to time constraints and lack of proper understanding of how to implement alternative 2. Ideally, alternative 2 will be implemented by future maintainers.

4.8. Month view change feature

4.8.1. Current Implementation

The month command allows a user to change what month they are currently viewing on the calendar. This is facilitated using the currMonth parameter in Model.

Given below is an example usage scenario of month.

Step 1. The user types in month with its associated parameter, an integer between 1 and 12 inclusive.

Step 2. The TaskManagerParser recognises the command word and calls MonthCommandParser.

Step 3. MonthCommandParser will parse the arguments and call MonthCommand.

Step 4. MonthCommand will then return one the following results:

CommandException(MESSAGE_DUPLICATE_MONTH) if the requested month and the current month are the same. CommandException(MESSAGE_INVALID_MONTH) if the requested month is invalid, for example "aaa" or "0".

If the arguments pass all the checks, the currMonth parameter in Model will be changed, which will then cause the calendar to be updated.

Step 5. MonthCommand will then return a success message to the user.

The following diagram illustrates the operation of the month command.

MonthCommandSequenceDiagram

4.9. Retrieving of notes from storage [coming in V2.0]

4.9.1. Current Implementation

  • Notes added are currently being stored in notes.json file.

  • Retrieving from notes.json file is still in progress.

4.10. Logging

We are using java.util.logging package for logging. The LogsCenter class is used to manage the logging levels and logging destinations.

  • The logging level can be controlled using the logLevel setting in the configuration file (See Section 4.11, “Configuration”)

  • The Logger for a class can be obtained using LogsCenter.getLogger(Class) which will log messages according to the specified logging level

  • Currently log messages are output through: Console and to a .log file.

Logging Levels

  • SEVERE : Critical problem detected which may possibly cause the termination of the application

  • WARNING : Can continue, but with caution

  • INFO : Information showing the noteworthy actions by the App

  • FINE : Details that is not usually noteworthy but may be useful in debugging e.g. print the actual list instead of just its size

4.11. Configuration

Certain properties of the application can be controlled (e.g user prefs file location, logging level) through the configuration file (default: config.json).

5. Documentation

We use asciidoc for writing documentation.

We chose asciidoc over Markdown because asciidoc, although a bit more complex than Markdown, provides more flexibility in formatting.

5.1. Editing Documentation

See UsingGradle.adoc to learn how to render .adoc files locally to preview the end result of your edits. Alternatively, you can download the AsciiDoc plugin for IntelliJ, which allows you to preview the changes you have made to your .adoc files in real-time.

5.2. Publishing Documentation

See UsingTravis.adoc to learn how to deploy GitHub Pages using Travis.

5.3. Converting Documentation to PDF format

We use Google Chrome for converting documentation to PDF format, as Chrome’s PDF engine preserves hyperlinks used in webpages.

Here are the steps to convert the project documentation files to PDF format.

  1. Follow the instructions in UsingGradle.adoc to convert the AsciiDoc files in the docs/ directory to HTML format.

  2. Go to your generated HTML files in the build/docs folder, right click on them and select Open withGoogle Chrome.

  3. Within Chrome, click on the Print option in Chrome’s menu.

  4. Set the destination to Save as PDF, then click Save to save a copy of the file in PDF format. For best results, use the settings indicated in the screenshot below.

chrome save as pdf
Figure 9. Saving documentation as PDF files in Chrome

5.4. Site-wide Documentation Settings

The build.gradle file specifies some project-specific asciidoc attributes which affects how all documentation files within this project are rendered.

Attributes left unset in the build.gradle file will use their default value, if any.
Table 1. List of site-wide attributes
Attribute name Description Default value

site-name

The name of the website. If set, the name will be displayed near the top of the page.

not set

site-githuburl

URL to the site’s repository on GitHub. Setting this will add a "View on GitHub" link in the navigation bar.

not set

site-seedu

Define this attribute if the project is an official SE-EDU project. This will render the SE-EDU navigation bar at the top of the page, and add some SE-EDU-specific navigation items.

not set

5.5. Per-file Documentation Settings

Each .adoc file may also specify some file-specific asciidoc attributes which affects how the file is rendered.

Asciidoctor’s built-in attributes may be specified and used as well.

Attributes left unset in .adoc files will use their default value, if any.
Table 2. List of per-file attributes, excluding Asciidoctor’s built-in attributes
Attribute name Description Default value

site-section

Site section that the document belongs to. This will cause the associated item in the navigation bar to be highlighted. One of: UserGuide, DeveloperGuide, LearningOutcomes*, AboutUs, ContactUs

* Official SE-EDU projects only

not set

no-site-header

Set this attribute to remove the site navigation bar.

not set

5.6. Site Template

The files in docs/stylesheets are the CSS stylesheets of the site. You can modify them to change some properties of the site’s design.

The files in docs/templates controls the rendering of .adoc files into HTML5. These template files are written in a mixture of Ruby and Slim.

Modifying the template files in docs/templates requires some knowledge and experience with Ruby and Asciidoctor’s API. You should only modify them if you need greater control over the site’s layout than what stylesheets can provide. The SE-EDU team does not provide support for modified template files.

6. Testing

6.1. Running Tests

There are three ways to run tests.

The most reliable way to run tests is the 3rd one. The first two methods might fail some GUI tests due to platform/resolution-specific idiosyncrasies.

Method 1: Using IntelliJ JUnit test runner

  • To run all tests, right-click on the src/test/java folder and choose Run 'All Tests'

  • To run a subset of tests, you can right-click on a test package, test class, or a test and choose Run 'ABC'

Method 2: Using Gradle

  • Open a console and run the command gradlew clean allTests (Mac/Linux: ./gradlew clean allTests)

See UsingGradle.adoc for more info on how to run tests using Gradle.

Method 3: Using Gradle (headless)

Thanks to the TestFX library we use, our GUI tests can be run in the headless mode. In the headless mode, GUI tests do not show up on the screen. That means the developer can do other things on the Computer while the tests are running.

To run tests in headless mode, open a console and run the command gradlew clean headless allTests (Mac/Linux: ./gradlew clean headless allTests)

6.2. Types of tests

We have two types of tests:

  1. GUI Tests - These are tests involving the GUI. They include,

    1. System Tests that test the entire App by simulating user actions on the GUI. These are in the systemtests package.

    2. Unit tests that test the individual components. These are in seedu.address.ui package.

  2. Non-GUI Tests - These are tests not involving the GUI. They include,

    1. Unit tests targeting the lowest level methods/classes.
      e.g. seedu.address.commons.StringUtilTest

    2. Integration tests that are checking the integration of multiple code units (those code units are assumed to be working).
      e.g. seedu.address.storage.StorageManagerTest

    3. Hybrids of unit and integration tests. These test are checking multiple code units as well as how the are connected together.
      e.g. seedu.address.logic.LogicManagerTest

6.3. Troubleshooting Testing

Problem: HelpWindowTest fails with a NullPointerException.

  • Reason: One of its dependencies, HelpWindow.html in src/main/resources/docs is missing.

  • Solution: Execute Gradle task processResources.

7. Dev Ops

7.1. Build Automation

See UsingGradle.adoc to learn how to use Gradle for build automation.

7.2. Continuous Integration

We use Travis CI and AppVeyor to perform Continuous Integration on our projects. See UsingTravis.adoc and UsingAppVeyor.adoc for more details.

7.3. Coverage Reporting

We use Coveralls to track the code coverage of our projects. See UsingCoveralls.adoc for more details.

7.4. Documentation Previews

When a pull request has changes to asciidoc files, you can use Netlify to see a preview of how the HTML version of those asciidoc files will look like when the pull request is merged. See UsingNetlify.adoc for more details.

7.5. Making a Release

Here are the steps to create a new release.

  1. Update the version number in MainApp.java.

  2. Generate a JAR file using Gradle.

  3. Tag the repo with the version number. e.g. v0.1

  4. Create a new release using GitHub and upload the JAR file you created.

7.6. Managing Dependencies

A project often depends on third-party libraries. For example, Student Buddy depends on the Jackson library for JSON parsing. Managing these dependencies can be automated using Gradle. For example, Gradle can download the dependencies automatically, which is better than these alternatives:

  1. Include those libraries in the repo (this bloats the repo size)

  2. Require developers to download those libraries manually (this creates extra work for developers)

Appendix A: Suggested Programming Tasks to Get Started

Suggested path for new programmers:

  1. First, add small local-impact (i.e. the impact of the change does not go beyond the component) enhancements to one component at a time. Some suggestions are given in Section A.1, “Improving each component”.

  2. Next, add a feature that touches multiple components to learn how to implement an end-to-end feature across all components. Section A.2, “Creating a new command: remark explains how to go about adding such a feature.

A.1. Improving each component

Each individual exercise in this section is component-based (i.e. you would not need to modify the other components to get it to work).

Logic component

Scenario: You are in charge of logic. During dog-fooding, your team realize that it is troublesome for the user to type the whole command in order to execute a command. Your team devise some strategies to help cut down the amount of typing necessary, and one of the suggestions was to implement aliases for the command words. Your job is to implement such aliases.

Do take a look at Section 3.3, “Logic component” before attempting to modify the Logic component.
  1. Add a shorthand equivalent alias for each of the individual commands. For example, besides typing clear, the user can also type c to remove all tasks in the list.

    • Hints

    • Solution

      • Modify the switch statement in TaskManagerParser#parseCommand(String) such that both the proper command word and alias can be used to execute the same intended command.

      • Add new tests for each of the aliases that you have added.

      • Update the user guide to document the new aliases.

      • See this PR for the full solution.

Model component

Scenario: You are in charge of model. One day, the logic-in-charge approaches you for help. He wants to implement a command such that the user is able to remove a particular tag from every task in the task manager, but the model API does not support such a functionality at the moment. Your job is to implement an API method, so that your teammate can use your API to implement his command.

Do take a look at Section 3.4, “Model component” before attempting to modify the Model component.
  1. Add a removeTag(Tag) method. The specified tag will be removed from every task in the task manager.

    • Hints

      • The Model and the TaskManager API need to be updated.

      • Think about how you can use SLAP to design the method. Where should we place the main logic of deleting tags?

      • Find out which of the existing API methods in TaskManager and Task classes can be used to implement the tag removal logic. TaskManager allows you to update a task, and Task allows you to update the tags.

    • Solution

      • Implement a removeTag(Tag) method in TaskManager. Loop through each task, and remove the tag from each task.

      • Add a new API method deleteTag(Tag) in ModelManager. Your ModelManager should call TaskManager#removeTag(Tag).

      • Add new tests for each of the new public methods that you have added.

      • See this PR for the full solution.

Ui component

Scenario: You are in charge of ui. During a beta testing session, your team is observing how the users use your task manager application. You realize that one of the users occasionally tries to delete non-existent tags from a contact, because the tags all look the same visually, and the user got confused. Another user made a typing mistake in his command, but did not realize he had done so because the error message wasn’t prominent enough. A third user keeps scrolling down the list, because he keeps forgetting the index of the last task in the list. Your job is to implement improvements to the UI to solve all these problems.

Do take a look at Section 3.2, “UI component” before attempting to modify the UI component.
  1. Use different colors for different tags inside task cards. For example, ungraded tags can be all in brown, and graded tags can be all in yellow.

    Before

    getting started ui tag before

    After

    getting started ui tag after
    • Hints

      • The tag labels are created inside the TaskCard constructor (new Label(tag.tagName)). JavaFX’s Label class allows you to modify the style of each Label, such as changing its color.

      • Use the .css attribute -fx-background-color to add a color.

      • You may wish to modify DarkTheme.css to include some pre-defined colors using css, especially if you have experience with web-based css.

    • Solution

      • You can modify the existing test methods for TaskCard 's to include testing the tag’s color as well.

      • See this PR for the full solution.

        • The PR uses the hash code of the tag names to generate a color. This is deliberately designed to ensure consistent colors each time the application runs. You may wish to expand on this design to include additional features, such as allowing users to set their own tag colors, and directly saving the colors to storage, so that tags retain their colors even if the hash code algorithm changes.

  2. Modify NewResultAvailableEvent such that ResultDisplay can show a different style on error (currently it shows the same regardless of errors).

    Before

    getting started ui result before

    After

    getting started ui result after
  3. Modify the StatusBarFooter to show the total number of tasks in the task manager.

    Before

    getting started ui status before

    After

    getting started ui status after
    • Hints

      • StatusBarFooter.fxml will need a new StatusBar. Be sure to set the GridPane.columnIndex properly for each StatusBar to avoid misalignment!

      • StatusBarFooter needs to initialize the status bar on application start, and to update it accordingly whenever the task manager is updated.

    • Solution

Storage component

Scenario: You are in charge of storage. For your next project milestone, your team plans to implement a new feature of saving the task manager to the cloud. However, the current implementation of the application constantly saves the task manager after the execution of each command, which is not ideal if the user is working on limited internet connection. Your team decided that the application should instead save the changes to a temporary local backup file first, and only upload to the cloud after the user closes the application. Your job is to implement a backup API for the task manager storage.

Do take a look at Section 3.5, “Storage component” before attempting to modify the Storage component.
  1. Add a new method backupTaskManger(ReadOnlyTaskManager), so that the task manager can be saved in a fixed temporary location.

A.2. Creating a new command: remark

By creating this command, you will get a chance to learn how to implement a feature end-to-end, touching all major components of the app.

Scenario: As a software maintainer for TaskManager, after the former developer team has moved on, you are. The current users of your application have a list of new feature requests that they hope the software will eventually have. The most popular request is to allow adding additional comments/notes about a particular task, by providing a flexible remark field for each contact, rather than relying on tags alone. After designing the specification for the remark command, you are convinced that this feature is worth implementing. Your job is to implement the remark command.

A.2.1. Description

Edits the remark for a task specified in the INDEX.
Format: remark INDEX r/[REMARK]

Examples:

  • remark 1 r/Need to contact John for further details.
    Edits the remark for the first task to Need to contact John for further details.

  • remark 1 r/
    Removes the remark for the first task.

A.2.2. Step-by-step Instructions

[Step 1] Logic: Teach the app to accept 'remark' as a command

Teach the application how to parse a remark command. The logic of remark will be added later.

Main:

  1. Add a RemarkCommand that extends Command. Upon execution, it should throw an Exception.

  2. Modify TaskManagerParser to accept a RemarkCommand.

Tests:

  1. Add a RemarkCommandTest that tests that execute() throws an Exception.

  2. Add a new test method to TaskManagerParserTest, which tests that typing "remark" returns an instance of RemarkCommand.

[Step 2] Logic: Teach the app to accept 'remark' arguments

Teach the application to parse arguments that our remark command will accept. E.g. 1 r/Need to contact John for further details.

Main:

  1. Modify RemarkCommand to take in an Index and String and print those two parameters as the error message.

  2. Add RemarkCommandParser that knows how to parse two arguments, one index and one with prefix 'r/'.

  3. Modify TaskManagerParser to use the newly implemented RemarkCommandParser.

Tests:

  1. Modify RemarkCommandTest to test the RemarkCommand#equals() method.

  2. Add RemarkCommandParserTest that tests different boundary values for RemarkCommandParser.

  3. Modify TaskManagerParserTest to test that the correct command is generated according to the user input.

[Step 3] Ui: Add a placeholder for remarks in TaskCard

Add a placeholder on all TaskCards to display a remark for each task later.

Main:

  1. Add a Label with placeholder text inside TaskListCard.fxml.

  2. Add FXML annotation in TaskCard to tie the variable to the actual label.

Tests:

  1. Modify TaskCardHandle so that future tests can read the contents of the remark label.

[Step 4] Model: Add a Remark class

Practice proper encapsulation when adding the remark in the Task class. Instead of a String, follow the conventional class structure that the codebase uses by adding a Remark class.

Main:

  1. Add Remark to the model (you can copy from Name, remove the regex and change the names accordingly).

  2. Modify RemarkCommand to take in a Remark instead of a String.

Tests:

  1. Add a test for Remark, to test the Remark#equals() method.

[Step 5] Model: Modify Task to support a Remark field

Implement Remark in Task.

Main:

  1. Add getRemark() in Task.

  2. Assume that the user will not be able to use the add and edit commands to modify the remarks field (i.e. the task will be created without a remark).

  3. Modify SampleDataUtil to add remarks for the sample data (delete data/StudentBuddy.json so that the application will load the sample data when launched).

[Step 6] Storage: Add Remark field to the JsonAdaptedTask class

Modify JsonAdaptedTask to include a Remark field so that it will be saved when the application is exited.

Main:

  1. Add a new JSON field for Remark.

Tests:

  1. Fix invalidAndValidTaskManager.json, typicalTaskTaskManager.json, validTaskManager.json etc., such that the JSON tests will not fail due to a missing remark field.

[Step 6b] Test: Add withRemark() for TaskBuilder

Add a helper method to TaskBuilder, so that users are able to create remarks when building a Task.

Tests:

  1. Add a new method withRemark() for TaskBuilder. This method will create a new Remark for the Task that it is currently building.

  2. Try to use the method on any sample Task in TypicalTasks.

[Step 7] Ui: Connect Remark field to TaskCard

Bind the remark label in TaskCard with the actual remark field.

Main:

  1. Modify TaskCard's constructor to bind the Remark field to the Task 's remark.

Tests:

  1. Modify GuiTestAssert#assertCardDisplaysTask(…​) so that it will compare the now-functioning remark label.

[Step 8] Logic: Implement RemarkCommand#execute() logic

Add in actual logic for the remark command.

Main:

  1. Replace the logic in RemarkCommand#execute() (that currently just throws an Exception), with the actual logic to modify the remarks of a task.

Tests:

  1. Update RemarkCommandTest to test that the execute() logic works.

A.2.3. Full Solution

See this PR for the step-by-step solution for a similar application.

Appendix B: Product Scope

Target user profile:

  • Students who hava a need to manage a significant number of tasks

  • prefer desktop apps over other apps on other platforms

  • can type fast

  • prefers typing over mouse input

  • is reasonably comfortable using CLI apps

Value proposition: Allow students with huge amount of workload to better manage their tasks and notes more effectively using our user-friendly Student Buddy.

Appendix C: User Stories

Priorities: High (must have) - * * *, Medium (nice to have) - * *, Low (unlikely to have) - *

Priority As a …​ I want to …​ So that I can…​

* * *

new user

see usage instructions

remember how to accomplish tasks in the program

* * *

user

add a new task

keep track of tasks and deadlines

* * *

user

delete a task

remove tasks that I no longer need

* * *

user

edit an task

keep tasks up to date

* * *

user

have an intuitive and easy-to-read calender

view upcoming tasks quickly and easily

* * *

user

have the calender update in real time as tasks are added or removed

instantly view changes made to the list of tasks

* * *

user

store miscellaneous notes

keep track of important events other than tasks

* * *

user

delete notes that are no longer wanted

view the relevant notes easily

* * *

user

secure my task manager via a username and password to keep my events safe

keep my events and due dates private and secure to minimize the chances of someone deleting them

* * *

user

have my password hashed

keep my password safe without anyone easily retrieving them through my computer

* * *

administrator

be able to delete an account

assist the user by resetting their account if they forget their password

* *

user

sort my tasks by the attributes

can view my tasks by urgency etc.

* *

user

view all the months of the year on the calendar

can see my tasks that are not on the current month

* *

user

select a task to have it highlighted in the app for easy viewing

so that I can see where it is on the calendar with ease

* *

user

have admins to be able to access over my account

allow them to add or edit any tasks

* *

user

have just one task manager account

make things simple and minimal

* *

user

have tasks on the calendar sorted in order of priority

easily see which tasks are the most urgent

* *

user

have tasks on the calendar colour-coded in order of priority

easily see which tasks are the most urgent

* *

user

have the selected task highlighted on the calendar

easily view the selected task’s deadline

* *

user

find a task by name

locate details of event without having to go through the entire list

* *

user

find tasks by due date, tags, etc.

still find an important task if I forget their name

* *

administrator

be able to use commands like the user

assign task and deadlines to the user

*

user

change the theme of the GUI

allow me to customise the app’s appearance to my liking

*

user

have the program automatically complete my inputs

save time by not having to write out the entire command or search query

*

user

change the colours and sizes of the text

make things easier to read

*

user

play mini games on the application

keep myself occupied while deciding which tasks to add and delete.

*

user

find a task even if I mistype (e.g. incorrect capitalisation)

save time by not having to rewrite the query

Appendix D: Use Cases

(For all use cases below, the System is Student Buddy and the Actor is the user, unless specified otherwise)

D.1. Use case: Help

MSS

  1. User requests for help

  2. Student Buddy shows all the commands with the purpose of the command

    Use case ends.

D.2. Use case: Add task

MSS

  1. User requests to add a new event with given fields

  2. Student Buddy adds the event

    Use case ends.

Extensions

  • 1a. The given fields are invalid

    • 1ai. Student Buddy shows an error message

      Use case resumes at step 1.

D.3. Use case: Add notes

MSS

  1. User requests to add a new event with given fields

  2. Student Buddy adds the event

    Use case ends.

Extensions

  • 1a. The given fields are invalid

    • 1ai. Student Buddy shows an error message

      Use case resumes at step 1.

D.4. Use case: Delete task

MSS

  1. User requests to list tasks

  2. Student Buddy shows a list of tasks

  3. User requests to delete a specific task in the list

  4. Student Buddy deletes the task

    Use case ends.

Extensions

  • 2a. The list is empty.

    Use case ends.

  • 3a. The given index is invalid.

    • 3ai. Student Buddy shows an error message.

      Use case resumes at step 2.

D.5. Use case: Delete notes

MSS

  1. User requests to delete a specific note in the notes list by its index.

  2. Student Buddy deletes the note.

    Use case ends.

Extensions

  • 2a. The given index is invalid.

    • 2ai. Student Buddy shows an error message.

      Use case resumes at step 2.

D.6. Use case: Edit task

MSS

  1. User requests to list tasks

  2. Student Buddy shows a list of tasks

  3. User requests to edit a specific task in the list with the given fields

  4. Student Buddy edits the task

    Use case ends.

Extensions

  • 2a. The list is empty

    Use case ends.

  • 3a. The given index is invalid

    • 3ai. Student Buddy returns an error

      Use case resumes at step 2.

  • 3b. The given fields are invalid

    • 3bi. Student Buddy returns an error

      Use case resumes at step 2.

D.7. Use case: Find task by name

MSS

  1. User requests to find a task by name

  2. Student Buddy shows the tasks according to user’s input

    Use case ends.

Extensions

  • 2a. The list is empty

    Use case ends.

  • 2b. The given index is invalid

    • 2bi. Student Buddy returns an error

      Use case resumes at step 2.

D.8. Use case: Find task by module

MSS

  1. User requests to find a task by module

  2. Student Buddy shows the tasks according to user’s input

    Use case ends.

Extensions

  • 2a. The list is empty

    Use case ends.

  • 2b. The given index is invalid

    • 2bi. Student Buddy returns an error

      Use case resumes at step 2.

D.9. Use case: Find task by date

MSS

  1. User requests to find a task by date

  2. Student Buddy shows the tasks according to user’s input

    Use case ends.

Extensions

  • 2a. The list is empty

    Use case ends.

  • 2b. The given index is invalid

    • 2bi. Student Buddy returns an error

      Use case resumes at step 2.

D.10. Use case: Find task by priority

MSS

  1. User requests to find a task by priority

  2. Student Buddy shows the tasks according to user’s input

    Use case ends.

Extensions

  • 2a. The list is empty

    Use case ends.

  • 2b. The given index is invalid

    • 2bi. Student Buddy returns an error

      Use case resumes at step 2.

D.11. Use case: Sort tasks

MSS

  1. User requests to sort tasks by an attribute

  2. Student Buddy sorts the tasks according to user’s input

    Use case ends.

Extensions

  • 1b. The given index is invalid

    • 1ai. Student Buddy returns an error

      Use case resumes at step 1.

D.12. Use case: Change month

MSS

  1. User requests to change the month being displayed on the calendar

  2. Student Buddy displays a different month on the calendar according to the user’s input

    Use case ends.

Extensions

  • 1a. The given month is invalid

    • 1ai. Student Buddy returns an error

  • 1b. The given month is already being displayed

    • 1bi. Student Buddy returns an error

D.13. Use case: Signup

MSS

  1. User requests to sign up an account

  2. Student Buddy signs up user with an account

    Use case ends.

Extensions

  • 1a. The given username and password are invalid

    • 1ai. Student Buddy shows an error message

  • 1b. The account exists

    • 1bi. Student Buddy shows an error message

D.14. Use case: Login

MSS

  1. User requests to login into account

  2. Student Buddy logs user in with account

    Use case ends.

Extensions

  • 1a. The given username and password are invalid

    • 1ai. Student Buddy shows an error message

  • 1b. The user is logged in

    • 1bi. Student Buddy shows an error message

D.15. Use case: Logout

MSS

  1. User requests to logout of account

  2. Student Buddy logs user out of account

    Use case ends.

Extensions

  • 1a. The user is logged out

    • 1ai. Student Buddy shows an error message

D.16. Use case: Deleteacc

MSS

  1. User requests to delete account

  2. Student Buddy deletes account

    Use case ends.

Extensions

  • 1a. User is not logged in

    • 1ai. Student Buddy shows an error message

  • 1b. User is not an admin

    • 1bi. Student Buddy shows an error message

      {More to be added in V2.0}

Appendix E: Non Functional Requirements

  1. Should work on any mainstream OS as long as it has Java 9 or higher installed.

  2. Should be able to hold up to 250 tasks without a noticeable sluggishness in performance for typical usage.

  3. A user with above average typing speed for regular English text (i.e. not code, not system admin commands) should be able to accomplish most of the tasks faster using commands than using the mouse.

{More to be added}

Appendix F: Glossary

Mainstream OS

Windows, Linux, Unix, OS-X

Private Task Information

A task information that is not meant to be shared with others

CLI

A means of interacting with a computer program where the user issues commands to the program in the form of texts

GUI

A form of user interface that allows users to interact with electronic devices through graphical icons and visual indicators

MSS

Main success scenario

Appendix G: Instructions for Manual Testing

Given below are instructions to test the app manually.

These instructions only provide a starting point for testers to work on; testers are expected to do more exploratory testing.

G.1. Launch and Shutdown

  1. Initial launch

    1. Download the jar file and copy into an empty folder

    2. Double-click the jar file
      Expected: Shows the GUI with a set of sample contacts. The window size may not be optimum.

  2. Saving window preferences

    1. Resize the window to an optimum size. Move the window to a different location. Close the window.

    2. Re-launch the app by double-clicking the jar file.
      Expected: The most recent window size and location is retained.

G.2. Deleting a task

  1. Deleting a task while all tasks are listed

    1. Prerequisites: List all tasks using the list command. Multiple tasks in the list.

    2. Test case: delete 1
      Expected: First task is deleted from the list. Details of the deleted task shown in the status message. Timestamp in the status bar is updated.

    3. Test case: delete 0
      Expected: No task is deleted. Error details shown in the status message. Status bar remains the same.

    4. Other incorrect delete commands to try: delete, delete x (where x is larger than the list size) {give more}
      Expected: Similar to previous.