By: Team F11-4
Since: Aug 2018
Licence: MIT
-
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 JDK9
. -
IntelliJ IDE
ℹ️IntelliJ by default has Gradle and JavaFx plugins installed.
Do not disable them. If you have disabled them, go toFile
>Settings
>Plugins
to re-enable them.
-
Fork this repo, and clone the fork to your computer
-
Open IntelliJ (if you are not in the welcome screen, click
File
>Close Project
to close the existing project dialog first) -
Set up the correct JDK version for Gradle
-
Click
Configure
>Project Defaults
>Project Structure
-
Click
New…
and find the directory of the JDK
-
-
Click
Import Project
-
Locate the
build.gradle
file and select it. ClickOK
-
Click
Open as Project
-
Click
OK
to accept the default settings -
Open a console and run the command
gradlew processResources
(Mac/Linux:./gradlew processResources
). It should finish with theBUILD SUCCESSFUL
message.
This will generate all resources required by the application and tests. -
Open
XmlAdaptedPerson.java
andMainWindow.java
and check for any code errors-
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
-
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
-
-
Repeat this for the test folder as well (e.g. check
XmlUtilTest.java
andHelpWindowTest.java
for code errors, and if so, resolve it the same way)
-
Run the
seedu.address.MainApp
and try a few commands -
Run the tests to ensure they all pass.
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,
-
Go to
File
>Settings…
(Windows/Linux), orIntelliJ IDEA
>Preferences…
(macOS) -
Select
Editor
>Code Style
>Java
-
Click on the
Imports
tab to set the order-
For
Class count to use import with '*'
andNames count to use static import with '*'
: Set to999
to prevent IntelliJ from contracting the import statements -
For
Import Layout
: The order isimport static all other imports
,import java.*
,import javax.*
,import org.*
,import com.*
,import all other imports
. Add a<blank line>
between eachimport
-
Optionally, you can follow the UsingCheckstyle.adoc document to configure Intellij to check style-compliance as you write code.
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:
-
Configure the site-wide documentation settings in
build.gradle
, such as thesite-name
, to suit your own project. -
Replace the URL in the attribute
repoURL
inDeveloperGuide.adoc
andUserGuide.adoc
with the URL of your fork.
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) |
When you are ready to start coding,
-
Get some sense of the overall design by reading Section 2.1, “Architecture”.
-
Take a look at [GetStartedProgramming].
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.
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.
The Sequence Diagram below shows how the components interact for the scenario where the user issues the command delete 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.
ℹ️
|
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.
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 theModel
change. -
Responds to events raised from various parts of the App and updates the UI accordingly.
API :
Logic.java
-
Logic
uses theAddressBookParser
class to parse the user command. -
This results in a
Command
object which is executed by theLogicManager
. -
The command execution can affect the
Model
(e.g. adding a person) and/or raise events. -
The result of the command execution is encapsulated as a
CommandResult
object which is passed back to theUi
.
Given below is the Sequence Diagram for interactions within the Logic
component for the execute("delete 1")
API call.
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.
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.
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 usingLogsCenter.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
This section describes some noteworthy details on how certain features are implemented.
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.
Step 2: user opens a timetable of first person
in the stored location and edits it via microsoft excel or with his preferred software.
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.
The following sequence diagram shows how add_timetable
works.
-
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.
-
-
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.
-
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.
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.
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.
Step 2: The user follows the prompt to create an account, supplying a username and password.
Step 2a: The user supplies a duplicate username and is prompted to choose another.
Step 2b: The user supplies a unique username and the account is successfully created.
Step 3: The user is prompted to login.
Step 3a: The user supplies the wrong login credentials.
Step 3b: The user supplies the right login credentials.
Step 4: The user now have access to most of the commands.
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.
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]
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.
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.
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.
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.
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
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. |
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.
See UsingTravis.adoc to learn how to deploy GitHub Pages using Travis.
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.
-
Follow the instructions in UsingGradle.adoc to convert the AsciiDoc files in the
docs/
directory to HTML format. -
Go to your generated HTML files in the
build/docs
folder, right click on them and selectOpen with
→Google Chrome
. -
Within Chrome, click on the
Print
option in Chrome’s menu. -
Set the destination to
Save as PDF
, then clickSave
to save a copy of the file in PDF format. For best results, use the settings indicated in the screenshot below.
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.
|
Attribute name | Description | Default value |
---|---|---|
|
The name of the website. If set, the name will be displayed near the top of the page. |
not set |
|
URL to the site’s repository on GitHub. Setting this will add a "View on GitHub" link in the navigation bar. |
not set |
|
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 |
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.
|
Attribute name | Description | Default value |
---|---|---|
|
Site section that the document belongs to.
This will cause the associated item in the navigation bar to be highlighted.
One of: * Official SE-EDU projects only |
not set |
|
Set this attribute to remove the site navigation bar. |
not set |
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 |
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 chooseRun '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
)
We have two types of tests:
-
GUI Tests - These are tests involving the GUI. They include,
-
System Tests that test the entire App by simulating user actions on the GUI. These are in the
systemtests
package. -
Unit tests that test the individual components. These are in
seedu.address.ui
package.
-
-
Non-GUI Tests - These are tests not involving the GUI. They include,
-
Unit tests targeting the lowest level methods/classes.
e.g.seedu.address.commons.StringUtilTest
-
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
-
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
-
See UsingGradle.adoc to learn how to use Gradle for build automation.
We use Travis CI and AppVeyor to perform Continuous Integration on our projects. See UsingTravis.adoc and UsingAppVeyor.adoc for more details.
We use Coveralls to track the code coverage of our projects. See UsingCoveralls.adoc for more details.
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.
Here are the steps to create a new release.
-
Update the version number in
MainApp.java
. -
Generate a JAR file using Gradle.
-
Tag the repo with the version number. e.g.
v0.1
-
Create a new release using GitHub and upload the JAR file you created.
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.
|
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.
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}
(For all use cases below, the System is the NUS Hangs
and the Actor is the user
, unless specified otherwise)
MSS
-
User logins to System and prompts to add a timetable
-
System shows the help menu
MSS
-
User logins to System and requests help to add a friend
-
System shows him how to add a friend
-
User input add command accordingly
-
System displays friend is added successfully
Extensions
-
3a. User enters invalid input.
-
3a1.System shows an error message.
Use case resumes at step 2.
-
MSS
-
User logins to System and requests help to find a friend
-
System shows how to find a friend
-
User inputs command accordingly
-
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.
MSS
-
User logins to System and requests help to list all friends
-
System shows a list of all friends
MSS
-
User logins to System and requests help to delete a friend
-
System shows how to delete a friend
-
User enters input accordingly
-
System asks user for confirmation.
-
User confirms his choice.
-
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.
MSS
-
User logins to System and requests help to edit a friend
-
System shows how to edit a friend
-
User enters input accordingly
-
System asks user for confirmation.
-
User confirms his choice.
-
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.
MSS
-
User logins to System and requests help to list all groups a friend have
-
System shows a list of all groups a friend have
MSS
-
User logins to System and requests help to add a timetable
-
System shows how to add a timetable
-
User adds inputs accordingly
-
System shows his timetable and ask user for confirmation.
-
User confirms the addition of his timetable into the System.
-
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
MSS
-
User logins to System and requests help to delete a timetable
-
System shows how to delete a timetable
-
User enters input accordingly
-
System asks user for confirmation.
-
User confirms his choice.
-
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.
MSS
-
User logins to System and requests help to see available time slots
-
System shows how to find available time slot of the group
-
User enters inputs accordingly
-
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.
-
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.
-
MSS
-
User logins to System and requests help to create a group
-
System shows how to create a group
-
User adds inputs accordingly
-
System shows group is created successfully
Extensions
-
3a. User enters invalid input.
-
3a1.System shows an error message.
Use case resumes at step 2.
-
MSS
-
User logins to System and requests help to find a group
-
System shows how to find a group
-
User inputs accordingly
-
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.
MSS
-
User logins to System and requests help to list all groups
-
System shows a list of all groups
MSS
-
User logins to System and requests help to delete a group
-
System shows how to delete a group
-
User enters input accordingly
-
System asks user for confirmation.
-
User confirms his choice.
-
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.
MSS
-
User logins to System and requests help to edit a group
-
System shows how to edit a group
-
User enters input accordingly
-
System asks user for confirmation.
-
User confirms his choice.
-
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.
MSS
-
User logins to System and requests help to list all members a group have
-
System shows a list of all members a group have
MSS
-
User logins to System and requests help to add a member to a group
-
System shows how to add a member to a group
-
User enters input accordingly
-
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.
MSS
-
New user prompted to create an account
-
User enters create account command as prompted
-
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
-
MSS
-
User attempts to enter command
-
System detects that user is not logged in
-
System prompts user to either create account or login to existing account
-
User enters login command
-
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
-
MSS
-
User enters command to reset password
-
System prompts user to answer the security question
-
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}
-
Should work on any mainstream OS as long as it has Java
9
or higher installed. -
Should be able to hold up to 1000 persons without a noticeable sluggishness in performance for typical usage.
-
Time zone,Time,Date format is standardised and is shown before user adds timetable.
{More to be added}
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. |
-
Initial launch
-
Download the jar file and copy into an empty folder
-
Double-click the jar file
Expected: Shows the GUI with a set of sample contacts. The window size may not be optimum.
-
-
Saving window preferences
-
Resize the window to an optimum size. Move the window to a different location. Close the window.
-
Re-launch the app by double-clicking the jar file.
Expected: The most recent window size and location is retained.
-
{ more test cases … }
-
Deleting a person while all persons are listed
-
Prerequisites: List all persons using the
list
command. Multiple persons in the list. -
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. -
Test case:
delete_friend 0
Expected: No person is deleted. Error details shown in the status message. Status bar remains the same. -
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 … }