Skip to content

Latest commit

 

History

History
1342 lines (910 loc) · 49.5 KB

DeveloperGuide.adoc

File metadata and controls

1342 lines (910 loc) · 49.5 KB

AddressBook Level 4 - Developer Guide

1. Setting up

1.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.

1.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 XmlAdaptedPerson.java and 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 XmlUtilTest.java and HelpWindowTest.java for code errors, and if so, resolve it the same way)

1.3. Verifying the setup

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

  2. Run the tests to ensure they all pass.

1.4. Configurations to do before writing code

1.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.

1.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.

1.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)

1.4.4. Getting started with coding

When you are ready to start coding,

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

  2. Take a look at [GetStartedProgramming].

2. Design

2.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. Two of those classes play important roles at the architecture level.

  • EventsCenter : This class (written using Google’s Event Bus library) is used by components to communicate with other components using events (i.e. a form of Event Driven design)

  • 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

Events-Driven nature of the design

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

SDforDeletePerson
Figure 3. Component interactions for delete 1 command (part 1)
ℹ️
Note how the Model simply raises a AppChangedEvent when the Address Book data are changed, instead of asking the Storage to save the updates to the hard disk.

The diagram below shows how the EventsCenter reacts to that event, which eventually results in the updates being saved to the hard disk and the status bar of the UI being updated to reflect the 'Last Updated' time.

SDforDeletePersonEventHandling
Figure 4. Component interactions for delete_friend 1 command (part 2)
ℹ️
Note how the event is propagated through the EventsCenter to the Storage and UI without Model having to be coupled to either of them. This is an example of how this Event Driven approach helps us reduce direct coupling between components.

The sections below give more details of each component.

2.2. UI component

UiClassDiagram
Figure 5. Structure of the UI Component

API : Ui.java

The UI consists of a MainWindow that is made up of parts e.g.CommandBox, ResultDisplay, PersonListPanel, StatusBarFooter, BrowserPanel 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.

  • Binds itself to some data in the Model so that the UI can auto-update when data in the Model change.

  • Responds to events raised from various parts of the App and updates the UI accordingly.

2.3. Logic component

LogicClassDiagram
Figure 6. Structure of the Logic Component

API : Logic.java

  1. Logic uses the AddressBookParser 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 person) and/or raise events.

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

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

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

2.4. Model component

ModelClassDiagram
Figure 8. Structure of the Model Component

API : Model.java

The Model,

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

  • stores the Address Book data.

  • exposes an unmodifiable ObservableList<Person> 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.

2.5. Storage component

StorageClassDiagram
Figure 9. 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 Erium data in xml format and read it back.

2.6. Common classes

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

2.7. 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 2.8, “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

2.8. Configuration

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

3. Implementation

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

3.1. Timetable Feature

3.1.1. Current Implementation

The timetable is contained in person which is in model.

  • add_timetable — adds a timetable from the csv file to the person.

  • delete_timetable — delete a timetable from the person and creates a default timetable in person. It will also find the timetable csv file of the person and deletes it.

  • download_timetable — downloads a timetable into a csv file into a stored folder location from the person.

These operations are handled by the logic component and uses the person in model to do the execution.

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

Step 1: The user launches the application for the first time. The NUS Hangs will initialise the person with the timetable with the details which was stored using Storage.

addTimetable step 1

Step 2: user opens a timetable of first person in the stored location and edits it via microsoft excel or with his preferred software.

addTimetable step 2

Step 3: The user executes add_timetable 1 to add the timetable of first person in stored folder to NUS hangs. A new timetable will be created containing the data of the timetable of first person in stored folder. The timetable of first person will be replaced by this new timetable. The timetable is then added to storage as a String.

addTimetable step 3

The following sequence diagram shows how add_timetable works.

addtimetablediagram

3.1.2. Design Considerations

  • Alternative 1 (current choice for v1.2): adds the timetable via a csv file.

    • Pros: Easier for user to visualise and edit his timetable

    • Cons: Hard to implement. No choice other than to edit his timetable from the stored folder defined.

  • Alternative 2 : adds the timetable via a csv file from other locations.

    • Pros: Easier for user to visualise and edit his timetable and allows user a choice on where to edit his timetable.

    • Cons: Hard to implement, and user has to know how to get file location of a file.

  • Alternative 3: User knows how to edit via the xml file of the person.

    • Pros: Easier to implement

    • Cons: User must know how to edit via the xml file of the person, and harder for User to visualise.

Aspect: Data structure to support the add_timetable commands
  • Alternative 1 (current choice): Use a String [][] Matrix to store entries of the timetable.

    • Pros: Easy for new Computer Science student undergraduates to understand, who are likely to be the new incoming developers of our project.

    • Cons: Slower Time efficiency because using 2 for loops to fill the Matrix with the data.

  • Alternative 2: Use ArrayList<ArrayList<String>>

    • Pros: Faster Time efficiency because using 1 for loops to fill the Matrix with the data.

    • Cons: Harder for new Computer Science student undergraduates to understand, who are likely to be the new incoming developers of our project.

3.2. Security Mechanism

The main objectives of the security mechanism includes:

  • Preventing unauthorised usage of the application

  • Preventing unauthorised access and editing rights to the data stored within the application

The following activity diagram illustrates how the workflow is restricted through the security mechanism.

SecurityMechanismActivityDiagram
Figure 10. Activity Diagram of Security Mechanism

To prevent unauthorised access (read, edit and other commands) of application users are required to login to the application. Each users would only be able to access data created by themselves or data which they have been granted rights to access.

To meet this end, various functions are implemented.

3.2.1. Current Implementation

Account Creation and Login [implemented in v1.1, incomplete]

The first step in securing the system is to restrict access to unauthorised users. This is accomplished by setting up create and login functions.

  • create: creates an account

  • login: login to account

Both functions are handled by the logic component, make use of the model component and is eventually managed through the storage component.

The username is stored as a key in a hashmap while the password is encrypted and stored as the value. By using a hashmap to store the account login credentials, it becomes easy to implement the create and login function.

*To be implemented: *

convert hashmap storage into XML and vice-versa

Password Encryption [implemented in v1.2, to be improved]

To prevent unauthorised users from getting the password by looking at the .xml files, the password is encrypted before storage. This is done by implementing Java Cryptography module.

Login Status Check [to be implemented in v1.3]

Next, there is a need to check if user is logged in before executing any entered commands. This is done by implementing a check function in the AddressBookParser.

Step 1: A new user launches the application for the first time. The welcome page would prompt the user to create an account and refer to help function for more details.

LeslieTODO: to be updated - add image

Step 2: The user follows the prompt to create an account, supplying a username and password.

LeslieTODO: to be updated - add image

Step 2a: The user supplies a duplicate username and is prompted to choose another.

LeslieTODO: to be updated - add image

Step 2b: The user supplies a unique username and the account is successfully created.

LeslieTODO: to be updated - add image

Step 3: The user is prompted to login.

LeslieTODO: to be updated - add image

Step 3a: The user supplies the wrong login credentials.

LeslieTODO: to be updated - add image

Step 3b: The user supplies the right login credentials.

LeslieTODO: to be updated - add image

Step 4: The user now have access to most of the commands.

LeslieTODO: to be updated - add image

In version 1.1, the implementation is up to step 3b. In version 1.2, the user password is encrypted to prevent loss of password. In version 1.3, step 4 would be implemented.

In version 2.0, encryption would be extended to other essential data stored within the system.

3.2.2. Design Considerations

Aspect: Create and Login

Alternative 1 (current choice): create stores data in a hashmap.

Pros:

  • hashmap does not allows duplicate keys, making it easy to implement

Cons:

  • [LeslieTODO: to be updated]

Alternative 2:

Pros:

  • [LeslieTODO: to be updated]

Cons:

  • [LeslieTODO: to be updated]

Aspect: How encryption executes

Alternative 1 (current choice): a function call to encryption before storing password data into hashmap. when logging in, a function call encrypts the user entered password before comparing to stored password in hashmap

Pros:

  • hashmap does not allows duplicate keys, making it easy to implement

Cons:

  • [LeslieTODO: to be updated]

3.3. Group Feature

The Group class extends the Entity abstract class just like a Person class does. An Entity contains an abstract method isSame that is necessary for the class to be used in UniqueList<T extends Entity>. Group class is an immutable class that is contained inside Model.

Group features make use of Storage to load information on groups added by the user before the UI is closed. XmlAdaptedGroup class helps the convert groups detail from xml files to the AddressBook when MainApp starts and similarly convert Group objects into xml files.

Group features also updates the Group Panel inside the UI using a predicate.

Current Implementation

The current group commands added are:

  • add_group — adds a group with an optional description

  • delete_group — deletes a group and all references from its members to it

  • edit_group — edit name/description of a group, maintaining uniqueness in group names

  • find_group — search for groups using keywords that must match exactly a word in Group name (TODO v1.4: Edit to find_group keyword matches substring of a word in group name or description)

  • register — register a member into an existing group and include a reference to the group in the member (Person class)

  • delete_member — delete an existing member from an existing group and remove reference to that group in the member

  • view_group — view the existing members in the group and is updated whenever any member is added or deleted.

  • list — lists both the updated list of groups and persons

These functions and their parsers are handled in Logic, makes use of and updates Model and Storage and displaying the updated result on the UI.

Given below is an example usage scenario and how register behaves at each stop.

Step 1: The user launches the application. (Assuming that the user has already added a group and person.) VersionedAddressBook will be loaded with the final addressbook state before the application is closed. Lists of groups and persons added previously will be loaded from storage xml file into Model using XmlAdaptedPerson and XmlAdaptedGroup classes. The updated lists will be displayed in the UI.

Step 2:The user enters the index of the person and name of the group he wants to add the person into. RegisterParser creates a new RegisterCommand object with the Person and Group that is involved which checks whether the person and group already exist (else throwing CommandException).

Step 3: RegisterCommand adds the person as a member in the group and adds a reference to the group inside the person’s List<Group>. Since Group and Person are immutable classes, a new object has to be created in this step.

Step 4: Model is updated of the new Group and Person. FilteredPersonList and FilteredGroupList is also updated to display the new groups and persons in the UI. A successful message is also displayed to the user below the UI’s command box.

Design Considerations

Aspect: How to implement Group class

Alternative 1 (current choice): Group as an immutable class.

Pros: Immutable objects are good Map keys and Set elements, since these typically do not change once created. Immutability makes it easier to write, use and reason about the code.

Cons: Doing so might restrict the way one can call the class and its methods. It may be slower as you have to create new objects with every command.

Alternative 2: Setter methods for Groups

Pros: Easier and less code for methods involving groups. Faster as do not have to create new objects each time you change a Group (e.g. edit its description or group members).

Cons: Miss out on the advantages of immutable object (above). Good practice to use immutable objects.

Aspect: Interactions between person and groups

Deleting a person from a group will affect the person’s reference to that group and vice versa (similar for adding and editing).

Alternative 1 (current choice): Having a UniqueList<Groups> in Person and UniqueList<Person> in Group.

Pros: Easy to retrieve groups from Person and persons from Group. Existing UniqueList class available (since already used in Model).

Cons: Have to update both lists in most group commands (e.g. registering a new member in a group). Issue of enforcing referential integrity - defensive programming.

Alternative 2 Just update the list of groups in Model and have person refer to that list of group as to whether it is a member of the group.

Pros: Less issues with enforcing referential integrity (see alternative 1).

Cons: Can be more expensive to look for groups for a particular person.

3.4. Person Feature

The 'Person' class extends the Entity abstract class and it is contained within 'Model'.

'Person' feature make use of 'Timetable' and 'Group' class to assign respective information to each instance of a person.

3.4.1. Current Implementation

The current person implementation are:

  • 'add' — add any person with the choice of adding address, phone, email and tags

  • 'find' — find all functions that search all details of any person, except for email

  • 'find_address' — find address in any person and returns any matching keywords

  • 'find_email' — find email in any person and returns any matching keywords

  • 'find_phone' — find phone in any person and returns any matching keywords

  • 'find_name' — find name in any person and returns any matching keywords

  • 'find_tag' — find tag in any person and returns any matching keywords

3.4.2. Design Considerations

To be continued :)

4. 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.

4.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.

4.2. Publishing Documentation

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

4.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 11. Saving documentation as PDF files in Chrome

4.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

4.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

4.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.

5. Testing

5.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)

5.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

5.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.

6. Dev Ops

6.1. Build Automation

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

6.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.

6.3. Coverage Reporting

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

6.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.

6.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.

6.6. Managing Dependencies

A project often depends on third-party libraries. For example, Address Book depends on the Jackson library for XML parsing. Managing these dependencies can be automated using Gradle. For example, Gradle can download the dependencies automatically, which is better than these alternatives.
a. Include those libraries in the repo (this bloats the repo size)
b. Require developers to download those libraries manually (this creates extra work for developers)

eryone in the address book, 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 2.4, “Model component” before attempting to modify the Model component.

Appendix A: Product Scope

Target user profile: .We target: . Small to medium scale interest groups in NUS . Groups who find organising a common / least conflicted dtime slot to meet a hassle

Value proposition: Automate the process of organising meetings and finding least conflicted time slot for the group in a way faster than manually checking everyone’s timetables.

Appendix B: 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

refer to instructions when I forget how to use the App

* * *

user

add a new person

* * *

user

delete a person

remove entries that I no longer need

* * *

user

find a person by name

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

* *

user

hide timetable by default

minimize chance of someone else seeing them by accident

* * *

user

Add my new Timetable

I can plan for the week

* * *

user

Delete a timetable

Remove the timetable i no longer need

* * *

user

View my timetable

I can see when i am free for the week

* * *

user

Have standardised Date,time,time zone format

I am clear on the meeting time and dates

* * *

user

view timetable in horizontal mode or vertical mode

I can view my timetable faster for the mode i am familiar with

* *

user

Upload my timetable In excel format

I do not need to key in manually my timetable

* * *

Organiser of the group

See if there are any available time slots which are not in conflict with everyone’s time table.

I can plan or attend an activity accordingly

* *

Organiser of the group

See the time slot with the least number of conflicts if there are no time slots available for everyone

I can ensure maximum participation if it is not possible for everyone to make it

* *

Organiser of the group

See all of the time slots listed in order in terms of number of conflicts.

I can pick the best slots if maximum participation isn’t required.

* *

Organiser of the group

See the time slot with the least number of conflicts given a set of specific time slots.

I can ensure maximum participation with the additional constraint

* *

user

See the people whose time table have conflicts with the time slot with the least number of conflicts.

I can adjust my time table if I am one of the people and increase participation

* * *

Organiser of the group

Choose to create either open or closed group

Dont need to reject people because they know if they can join the group

* *

Organiser of the group

Book venues based on decide free time slot

I can have a venue to hold my event

* *

member of a group

Sync with the real-time (almost) information to get updated time and venues

I am always updated with the latest timetable of everyone in the group

* *

member of a group

Notify organiser or other members of change of timetable/clashes

To update the timings of future possible meetings/RSVP

* *

member of a group

Have a list of groups i am currently in

I can remember what groups i am in

* *

Organiser of the group

Be notified of each members’ changes in available time slot

I can decide how and what to plan for the upcoming meeting

* * *

Organiser of the group

Be able to ‘close’ or finalise the planning

So that no changes can be made thereafter

* * *

user

I want to be able to retrieve my password back

I will still be able to log in, even in urgent cases

* *

user

I want to be able to export the information from the server

So that I can print, convert or edit in another file

* * *

Organiser of the group

I want to dismiss members who are no longer affiliated to the group

So that the time slot available is up to date, to ensure maximum participation

* *

user

I want to easily change my password

To keep my account details secure

* *

user

I want to view my meeting on all my devices

I have a back up in the event I lost access to one of my devices

* *

user

The system to be password protected

My information will not be shared with everyone

* *

Organiser of the group

I want to send an invite link

So that I can easily coordinate the meeting timing with my group members

{More to be added}

Appendix C: Use Cases

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

Use case: help

MSS

  1. User logins to System and prompts to add a timetable

  2. System shows the help menu

Use case: add friend

MSS

  1. User logins to System and requests help to add a friend

  2. System shows him how to add a friend

  3. User input add command accordingly

  4. System displays friend is added successfully

Extensions

  • 3a. User enters invalid input.

    • 3a1.System shows an error message.

      Use case resumes at step 2.

Use case: Find friend by Name

MSS

  1. User logins to System and requests help to find a friend

  2. System shows how to find a friend

  3. User inputs command accordingly

  4. System shows friend details

Extensions

  • 3a. User enters invalid input.

    • 3a1.System shows an error message.

      Use case resumes at step 2.

  • 4a.System cannot find friend.

    Use case resumes at step 2.

Use case: List all friends

MSS

  1. User logins to System and requests help to list all friends

  2. System shows a list of all friends

Use case: Delete a friend

MSS

  1. User logins to System and requests help to delete a friend

  2. System shows how to delete a friend

  3. User enters input accordingly

  4. System asks user for confirmation.

  5. User confirms his choice.

  6. System shows friend is deleted successfully.

Extensions

  • 3a. User enters invalid input.

    • 3a1.System shows an error message.

      Use case resumes at step 2.

  • 4a. Friend is not in the System.

    • 4a1.System shows an error message.

      Use case ends.

  • 5a. User does not confirm the deletion of the friend

    Use case ends.

Use case: Edit a friend

MSS

  1. User logins to System and requests help to edit a friend

  2. System shows how to edit a friend

  3. User enters input accordingly

  4. System asks user for confirmation.

  5. User confirms his choice.

  6. System shows friend is edited successfully.

Extensions

  • 3a. User enters invalid input.

    • 3a1.System shows an error message.

      Use case resumes at step 2.

  • 4a. Friend is not in the System.

    • 4a1.System shows an error message.

      Use case resumes at step 2.

  • 5a. User does not confirm the editing of the friend

    Use case ends.

Use case: List all groups a friend have

MSS

  1. User logins to System and requests help to list all groups a friend have

  2. System shows a list of all groups a friend have

Use case: add a timetable

MSS

  1. User logins to System and requests help to add a timetable

  2. System shows how to add a timetable

  3. User adds inputs accordingly

  4. System shows his timetable and ask user for confirmation.

  5. User confirms the addition of his timetable into the System.

  6. System shows his timetable is added successfully.

Extensions

  • 3a. User enters invalid input.

    • 3a1.System shows an error message.

      Use case resumes at step 2.

  • 3b. User adds timetable via a link and there is no internet.

    • 3b1.System shows there is no internet connection.

      Use case resumes at step 2.

  • 4a.User does not confirm the addition of the timetable into the System.

    Use case ends

Use case: Delete a timetable

MSS

  1. User logins to System and requests help to delete a timetable

  2. System shows how to delete a timetable

  3. User enters input accordingly

  4. System asks user for confirmation.

  5. User confirms his choice.

  6. System shows the timetable is deleted successfully.

Extensions

  • 3a. User enters invalid input.

    • 3a1.System shows an error message.

      Use case resumes at step 2.

  • 4a. Timetable is not in the System.

    • 4a1.System shows an error message.

      Use case ends.

  • 5a. User does not confirm the deletion of the timetable

    Use case ends.

Use case: check available time slot of the group

MSS

  1. User logins to System and requests help to see available time slots

  2. System shows how to find available time slot of the group

  3. User enters inputs accordingly

  4. System asks if user wants to see the time slots listed in descending order in terms of the number of conflict if there are no available time slots.

  5. System shows time slots listed in descending order in terms of the number of conflict

Extensions

  • 3a. User enters invalid input.

    • 3a1.System shows an error message.

      Use case resumes at step 2.

  • 4a. Group or Person or both is not in the System.

    • 4a1.System shows an error message.

      Use case resumes at step 2.

Use case:create a group

MSS

  1. User logins to System and requests help to create a group

  2. System shows how to create a group

  3. User adds inputs accordingly

  4. System shows group is created successfully

Extensions

  • 3a. User enters invalid input.

    • 3a1.System shows an error message.

      Use case resumes at step 2.

Use case: Find group by Name

MSS

  1. User logins to System and requests help to find a group

  2. System shows how to find a group

  3. User inputs accordingly

  4. System shows group details

Extensions

  • 3a. User enters invalid input.

    • 3a1.System shows an error message.

      Use case resumes at step 2.

  • 4a.System cannot find group.

    Use case resumes at step 2.

Use case: List all groups

MSS

  1. User logins to System and requests help to list all groups

  2. System shows a list of all groups

Use case: Delete a group

MSS

  1. User logins to System and requests help to delete a group

  2. System shows how to delete a group

  3. User enters input accordingly

  4. System asks user for confirmation.

  5. User confirms his choice.

  6. System shows group is deleted successfully.

Extensions

  • 3a. User enters invalid input.

    • 3a1.System shows an error message.

      Use case resumes at step 2.

  • 4a. Group is not in the System.

    • 4a1.System shows an error message.

      Use case ends.

  • 5a. User does not confirm the deletion of the group

    Use case ends.

Use case: Edit a group

MSS

  1. User logins to System and requests help to edit a group

  2. System shows how to edit a group

  3. User enters input accordingly

  4. System asks user for confirmation.

  5. User confirms his choice.

  6. System shows group is edited successfully.

Extensions

  • 3a. User enters invalid input.

    • 3a1.System shows an error message.

      Use case resumes at step 2.

  • 4a. Group is not in the System.

    • 4a1.System shows an error message.

      Use case resumes at step 2.

  • 5a. User does not confirm the editing of the group

    Use case ends.

Use case: List all members a group have

MSS

  1. User logins to System and requests help to list all members a group have

  2. System shows a list of all members a group have

Use case: add a member to a group

MSS

  1. User logins to System and requests help to add a member to a group

  2. System shows how to add a member to a group

  3. User enters input accordingly

  4. System shows a member is added to a group successfully.

Extensions

  • 3a. User enters invalid input.

    • 3a1.System shows an error message.

      Use case resumes at step 2.

  • 3b. Group or member is not in the System.

    • 3b1.System shows an error message.

      Use case ends.

  • 3c.Group is closed

    Use case ends.

Use case: Create an Account

MSS

  1. New user prompted to create an account

  2. User enters create account command as prompted

  3. System displays account creation success message

Extensions

  • 2a. User enters a duplicate username (username already in use)

    • 2a1.System prompts user to choose a different username

    Use case resumes at step 2

Use case: Login to Account

MSS

  1. User attempts to enter command

  2. System detects that user is not logged in

  3. System prompts user to either create account or login to existing account

  4. User enters login command

  5. System displays login success message

Extensions

  • 1a. System detects that user is not logged in

    • 1a1.System prompts user to login

      Use case resumes at step 2

  • 3a. User does not have an account

    • 3a1.User enters create account command [the continuation of this extension can be found on create an account use case]

      Use case ends prematurely

  • 3b. User have an account

    Use case resumes at step 4

  • 4a. User enters wrong credentials (username and password combination does not match)

    • 4a1.System prompts user on login fail and to try again

      Use case resumes at step 4

Use case: reset password

MSS

  1. User enters command to reset password

  2. System prompts user to answer the security question

  3. After successfully answering the security question, system prompts user to choose a new password

Extensions

  • 1a. User enters username that does not exist in the system

    • 1a1.System prompts user to enter username again

      Use case resumes at step 1.

  • 2a. User entered wrong security answer

    • 2a1.System prompts user to enter security answer again

      Use case resumes at step 2.

{More to be added}

Appendix D: 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 1000 persons without a noticeable sluggishness in performance for typical usage.

  3. Time zone,Time,Date format is standardised and is shown before user adds timetable.

{More to be added}

Appendix E: Glossary

Mainstream OS

Windows, Linux, Unix, OS-X

vertical mode

Vertical mode means the rows are days of the week and the columns are time

horizontal mode

Horizontal mode means the rows are time and the columns are days of the week

Appendix F: 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.

F.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.

{ more test cases …​ }

F.2. Deleting a person

  1. Deleting a person while all persons are listed

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

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

    3. Test case: delete_friend 0
      Expected: No person 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.

{ more test cases …​ }