This project is adapted from the AddressBook-Level3 (AB3) foundation created for NUS’ CS2103T Software Engineering course.
Refer to the guide Setting up and getting started.
The Architecture Diagram given above explains the high-level design of the App.
Given below is a quick overview of main components and how they interact with each other.
Main components of the architecture
Main (consisting of classes Main and MainApp) is in charge of the app launch and shut down.
The bulk of the app's work is done by the following 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.Commons represents a collection of classes used by multiple other components.
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.
Each of the four main components (also shown in the diagram above),
interface with the same name as the Component.{Component Name}Manager class (which follows the corresponding API interface mentioned in the previous point.For example, the Logic component defines its API in the Logic.java interface and implements its functionality using the LogicManager.java class which follows the Logic interface. Other components interact with a given component through its interface rather than the concrete class (reason: to prevent outside component's being coupled to the implementation of a component), as illustrated in the (partial) class diagram below.
The sections below give more details of each component.
The API of this component is specified in Ui.java
The UI consists of a MainWindow that is made up of parts e.g.CommandBox, ResultDisplay, PersonListPanel, StatusBarFooter etc. All these, including the MainWindow, inherit from the abstract UiPart class which captures the commonalities between classes that represent parts of the visible GUI.
The UI component uses the 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,
Logic component.Model data so that the UI can be updated with the modified data.Logic component, because the UI relies on the Logic to execute commands.Model component, as it displays Person object residing in the Model.API : Logic.java
Here's a (partial) class diagram of the Logic component:
The sequence diagram below illustrates the interactions within the Logic component, taking execute("delete 1") API call as an example.
This sequence diagram illustrates a more complex interaction within the Logic component, taking execute("filter ev/cycling") API call as the example.
How the Logic component works:
Logic is called upon to execute a command, it is passed to the LinkUp AddressBookParser object which in turn creates a parser that matches the command (e.g., DeleteCommandParser) and uses it to parse the command.Command object (more precisely, an object of one of its subclasses e.g., DeleteCommand) which is executed by the LogicManager.Model when it is executed (e.g. to delete a person).Model) to achieve.CommandResult object which is returned back from Logic.Here are the other classes in Logic (omitted from the class diagram above) that are used for parsing a user command:
How the parsing works:
AddressBookParser class creates an XYZCommandParser (XYZ is a placeholder for the specific command name e.g., AddCommandParser) which uses the other classes shown above to parse the user command and create a XYZCommand object (e.g., AddCommand) which the AddressBookParser returns back as a Command object.XYZCommandParser classes (e.g., AddCommandParser, DeleteCommandParser, ...) inherit from the Parser interface so that they can be treated similarly where possible e.g, during testing.API : Model.java
The Model component,
Person objects (which are contained in a UniquePersonList object).Person objects (e.g., results of a search query) as a separate filtered list which is exposed to outsiders as 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.UserPref object that represents the user’s preferences. This is exposed to the outside as a ReadOnlyUserPref objects.Model represents data entities of the domain, they should make sense on their own without depending on other components)API : Storage.java
The Storage component,
AddressBookStorage and UserPrefStorage, which means it can be treated as either one (if only the functionality of only one is needed).Model component (because the Storage component's job is to save/retrieve objects that belong to the Model)Classes used by multiple components are in the seedu.address.commons package.
Target user profile:
Primary Users:
User Persona:
Value proposition:
LinkUp empowers club leaders and small organizations to streamline people and event management, offering a simple yet focused solution which is comprehensive enough to handle real-world coordination, allowing leaders to focus on leading rather than organizing.
Priorities: High (must have) - * * *, Medium (nice to have) - * *, Low (unlikely to have) - *
| Priority | As a(n) … | I want to … | So that I can… |
|---|---|---|---|
* * * | new user | see sample contact data/command instructions/help | familiarise with LinkUp's interface and refer to instructions when needed |
* * * | user | add a contact | record down people’s details |
* * * | user | delete a contact | remove unnecessary entries |
* * * | user | view the contact list | see all contacts |
* * | user | edit a contact | update their details |
* * | user | search a contact by name | find them quickly |
* * | leader | tag contacts with skills | assign them to tasks |
* * | leader | add skills from contacts | update contacts with their skills easily |
* * | leader | remove skills from contacts | remove skills from contacts with ease |
* * | leader | view contacts participating in the same event | know who to contact for that event |
* * | leader | add additional events and roles to contacts | update contacts with their event/role easily |
* * | leader | filter people by any field | find the relevant contacts for an event or role, etc. |
* * | leader | add favourite contacts | access key people easily |
* * | leader | remove favourite contacts | manage key contacts with ease |
* * | leader | list favourite contacts | view all key contacts |
* * | leader | delete multiple contacts/clear all contacts | delete contacts faster after event |
* * | experienced user | use command shortcuts | speed up workflow |
* * | new user | remove all default contacts | start inputting my own contacts |
(For all use cases below, the System is LinkUp and the Actor is the user, unless specified otherwise)
Use case: Viewing Contacts
MSS
Use case: Add Contact
MSS
Extensions
1a. LinkUp detects missing field information.
1a1.LinkUp displays an error message.
Use case ends.
1b. Phone number and/or name and/or email already exist in LinkUp.
1b1. LinkUp shows duplicate contact error message.
Use case ends.
1c. Invalid field format (E.g. usage of alphabets in phone number)
1c1. LinkUp shows invalid input message.
Use case ends.
1d. Invalid command format.
1d1. LinkUp shows error message.
Use case ends.
Use case: Find Contact
MSS
Extensions
1a. LinkUp finds no matching contacts.
Use case ends.
1b. Invalid command format.
1b1. LinkUp shows error message.
Use case ends.
Use case: Delete Contact
MSS
Extensions
2a. The list is empty.
Use case ends.
3a. The given index is invalid.
3a1. LinkUp shows an error message.
Use case resumes at step 2.
3b. Invalid command format.
3b1. LinkUp shows error message.
Use case resumes at step 2.
Use case: Mark Contact as Favourite
MSS
Extensions
2a. The list is empty.
Use case ends.
3a. The given index is invalid.
3a1. LinkUp displays an error message.
Use case resumes at step 2.
3b. The contact is already marked as favourite.
3b1. LinkUp displays a message indicating that the contact is already favourite.
Use case resumes at step 2.
3c. Invalid command format.
3c1. LinkUp shows error message.
Use case resumes at step 2.
Use case: Unmark Favourite Contact
MSS
Extensions
2a. The list is empty.
Use case ends.
3a. The given index is invalid.
3a1. LinkUp displays an error message.
Use case resumes at step 2.
3b. The contact is not as favourite.
3b1. LinkUp displays a message indicating that the contact is not a favourite.
Use case resumes at step 2.
3c. Invalid command format.
3c1. LinkUp shows error message.
Use case resumes at step 2.
Use case: List Favourite Contacts
MSS
Extensions
1a. There are no favourite contacts.
1a1. LinkUp displays a message indicating that there are no favourites.
Use case ends.
1b. Invalid command format.
1b1. LinkUp shows error message.
Use case ends.
Use case: Filter Contacts
MSS
Extensions
1a. No contacts match the filter condition.
1a1. LinkUp displays an empty list.
Use case ends.
1b. Invalid command format.
1b1. LinkUp shows error message.
Use case ends.
Use case: Clear All Contacts
MSS
Use case: Add Skill to Contact
MSS
Extensions
2a. The list is empty.
Use case ends.
3a. The given index is invalid.
3a1. LinkUp displays an error message.
Use case resumes at step 2.
3b. The skill to add already exists for the contact.
3b1. LinkUp displays a error message indicating which skills are already present.
Use case resumes at step 2.
3c. Invalid skill added to contact
3c1. Linkup shows invalid skill error message.
Use case resumes at step 2.
3d. Invalid command format.
3d1. LinkUp shows an error message.
Use case resumes at step 2.
Use case: Delete Skill from Contact
MSS
Extensions
2a. The list is empty.
Use case ends.
3a. The given index is invalid.
3a1. LinkUp displays an error message.
Use case resumes at step 2.
3b. The skill to delete does not exist for the contact.
3b1. LinkUp displays a error message indicating which skills are missing.
Use case resumes at step 2.
3c. Invalid skill added to contact
3c1. Linkup shows invalid skill error message.
Use case resumes at step 2.
3d. Invalid command format.
3d1. LinkUp shows an error message.
Use case resumes at step 2.
Use case: Copy Add Command string to Clipboard
MSS
Extensions
2a. The list is empty.
Use case ends.
3a. The given index is invalid.
3a1. LinkUp displays an error message.
Use case resumes at step 2.
3b. Invalid command format.
3b1. LinkUp shows an error message.
Use case resumes at step 2.
Use case: Edit Contact
MSS
Extensions
2a. The list is empty.
Use case ends.
3a. The given index is invalid.
3a1. LinkUp displays an error message.
Use case resumes at step 2.
3b. The user provides invalid or incomplete fields (e.g., invalid email or phone format).
3b1. LinkUp displays an error message.
Use case resumes at step 2.
3c. The user does not specify any field to edit.
3c1. LinkUp displays a message indicating that at least one field must be provided.
Use case resumes at step 2.
3d. The edited information results in a duplicate contact.
3d1. LinkUp displays a duplicate contact error message.
Use case resumes at step 2.
3e. Invalid command format.
3e1. LinkUp shows error message.
Use case ends.
3f. The user edits only role or only event without the other field.
3f1. LinkUp displays an error message.
Use case resumes at step 2.
Use case: View Help
MSS
Extensions
1a. Invalid command format.
1a1. LinkUp shows error message.
Use case ends.
Use case: Exit LinkUp
MSS
.jar file) for ease of distribution and deployment.Given below are instructions to test the app manually.
Note: 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.
Open the command terminal and navigate into the folder with LinkUp.jar.
Type java -jar LinkUp.jar to run the application.
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.
Shutdown
exit. Adding a person while all persons are being shown
Test case: add n/John Doe p/98765432 e/johnd@example.com t/abc123 ev/Double or Nothing r/Orientation Camp Organiser sk/Cooking sk/Python
Expected: Contact is added to the list. Details of the new contact will be shown.
Test case: add n/John Doe p/98765432 e/johnd@example.com t/abc123 ev/Double or Nothing r/Orientation Camp Organiser sk/Cooking sk/Python
Expected: Duplicate contact. No person is added. Error details shown in the status message.
Test case: add n/John Doe e/johnd@example.com t/abc123 ev/Double or Nothing r/Orientation Camp Organiser sk/Cooking sk/Python
Expected: Invalid command format. No person is added. Error details shown in the status message.
Other incorrect add commands to try: add, add n/John Doe p/^^^^^5432 e/johnd@example.com t/abc123 ev/Double or Nothing r/Orientation Camp Organiser, ...
Expected: Similar to previous.
Deleting a person while all persons are being shown
Prerequisites: List all persons using the list command. Multiple persons in the list.
Test case: delete 1
Expected: First contact is deleted from the list. Details of the deleted contact shown in the status message.
Test case: delete 0
Expected: Invalid command. No person is deleted. Error details shown in the status message.
Other incorrect delete commands to try: delete, delete x, ... (where x is larger than the list size)
Expected: Similar to previous.
Editing a person while all persons are being shown
Prerequisites: List all persons using the list command. Multiple persons in the list.
Test case: edit 1 n/John
Expected: First contact name is changed to John. Details of the deleted contact shown in the status message.
Test case: edit 0 n/John
Expected: Invalid command. No person is edited. Error details shown in the status message.
Other incorrect edit commands to try: edit, edit 1 p/^^^, edit x, ... (where x is larger than the list size)
Expected: Similar to previous.
Filtering persons while all persons are being shown
Test case: filter r/Organiser
Expected: All contacts with the role as Organiser are listed.
Test case: filter
Expected: Invalid command. Error details shown in the status message.
Finding a person while all persons are being shown
Test case: find John
Expected: All contacts with the name as John are listed.
Test case: find
Expected: Invalid command. Error details shown in the status message.
Marking/Unmarking a person as favourite while all persons are being shown
Prerequisites: List all persons using the list command. Multiple persons in the list.
Test case: fav 1
Expected: First contact is marked as favourite. A heart symbol appears beside the contact.
Test case: fav 1 again
Expected: Message that says 1st contact is already marked as favourite is shown.
Test case: unfav 0
Expected: Invalid command. No person is unmarked from favourites. Error details shown in the status message.
Other incorrect favourite commands to try: fav, fav x, ... (where x is larger than the list size)
Expected: Similar to previous.
Adding skills to a person while all persons are being shown
Prerequisites: List all persons using the list command. Multiple persons in the list.
Test case: addskill 1 sk/adobe sk/python
Expected: First contact is added the skill adobe and python.
Test case: addskill 1 sk/adobe again
Expected: Message that says 1st contact already has the inputted skill.
Test case: addskill 0 sk/jokes
Expected: Invalid command. No skill is added. Error details shown in the status message.
Test case: addskill 1 sk/jok*91es
Expected: Invalid skill. No skill is added. Error details shown in the status message.
Other incorrect favourite commands to try: addskill, addskill 1 sk/9%aggss ejd, addskill x sk/fight
(where x is larger than the list size)
Expected: Similar to previous.
Adding skills to a person while all persons are being shown
Prerequisites: List all persons using the list command. Multiple persons in the list.
Test case: dskill 1 sk/adobe
Expected: First contact removed of the skill adobe.
Test case: dskill 1 sk/adobe again
Expected: Message that says the contact does not have the inputted skill.
Test case: dskill 0 sk/jokes
Expected: Invalid command. No skill is removed. Error details shown in the status message.
Test case: dskill 1 sk/jok*91es
Expected: Invalid skill. No skill is added. Error details shown in the status message.
Other incorrect skills commands to try: dskill, dskill 1 sk/9%aggss hi, dskill x sk/fight
(where x is larger than the list size)
Expected: Similar to test case 4.
Copy the command of the person while all persons are being shown
Prerequisites: List all persons using the list command. Multiple persons in the list.
Test case: copy 1
Expected: Add command string of the first contact is copied to the clipboard.
Success message shown in the result display box.
Test case: copy 0
Expected: Invalid command. No command is copied. Error details shown in the status message.
Other incorrect copy commands to try: copy abc, copy 9%aggss, copy x
(where x is larger than the list size)
Expected: Similar to previous.
Simulate saving data
Simulate a missing file
data folder of LinkUp.addressbook.json file.Simulate a corrupted file
data folder of LinkUp.addressbook.json file and add invalid characters (eg. $%^#).Difficulty level: 8/10
LinkUp's main difficulty was in having to understand the classes already implemented in AB3 and using those classes to implement our new features.
Challenges faced:
Some challenges faced include the implementation of Event and Role as a Key-Value pair in a HashMap so that
it can take in multiple Event and Role with each Role corresponding to an Event. To implement this, the storage
component had to be updated with a JsonAdaptedEventWithRole class so that the data could be stored and read from the
Json file.
Another challenging feature would be the Filter Command which filters the address book based on any number of fields.
To implement this we created a FilterPredicate class which would take in a PersonFilter to create a predicate to test
each contact with.
Achievements:
New features from AB3:
skills(tags in AB3)Telegram instead of AddressTeam Size: 5
FilterPredicate class created for the Filter feature we can implement a Delete by field feature where
the user can delete all contacts matching the field. (Example input: Delete n/Alex will delete all contacts with
Alex in their name). edit 1 p/p1121211 ;
Error Message : Phone numbers must only include digits, pluses, dashes, commas, round brackets, may start with 0, and must contain between 3 and 18 digits.)
This can be better improved by stating a more specific message such as phone numbers cannot have alphabets in it, so that
the users will be aware of the specific error instead of spending time figuring it out, improving their overall user experience.