This project is based on the AddressBook-Level3 project created by the SE-EDU initiative.
Use of AI
Yueh-Ching:
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.
Note: The lifeline for DeleteCommandParser should end at the destroy marker (X) but due to a limitation of PlantUML, the lifeline continues till the end of diagram.
How the Logic component works:
Logic is called upon to execute a command, it is passed to an 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)Note: An alternative (arguably, a more OOP) model is given below. It has a Tag and ModTutGroup list in the AddressBook, which Person references. This allows AddressBook to only require one Tag object per unique tag as well as only one ModTutGroup per unique ModTutGroup object, instead of each Person needing their own Tag or ModTutGroup objects.
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.
This section describes some noteworthy details on how certain features are implemented.
The "View All" button changes the view mode to "View All", if it is not already in "View All"
The "View Tabs" button works similarly, changing the view mode to "View Tabs", if it is not already in "View Tabs"
In order to maintain a similar architecture to the original AB3, new methods such as setViewAll() have been implemented.
The find command only allows for one field of information to be used as a query keyword at a time. The FindCommandParser
parses the keyword and creates an appropriate subclass of the abstract class FieldContainsKeywordPredicate. This predicate subclass
is then passed on to the ModelManager class which uses it to filter the list which the user then sees.
The delete module feature allows the user to delete the specified module from every tutee's module-tutorial module-tutorial list. In addition, if after the deletion, a tutee does not belong to any module-tutorial group, that tutee will be automatically deleted.
The behaviour of the deleteMod feature can be seen below.
The sort tutees feature allows the user to sort the entire list of tutees by their names in lexicographical order.
The behaviour of the sort feature can be seen below.
The pinning feature allows the user to pin a tutee to the top of the list.
The behaviour of the pinning feature can be seen below.
Target user profile:
Computing Student TAs who...
Value proposition: Allows computing students to quickly sort contacts and grab information. Optimised for typing instead of mouse. Simplify managing social life. Allows TAs to group their tutees by course and tutorial group.
Priorities: High (must have) - * * *, Medium (nice to have) - * *, Low (unlikely to have) - *
| Priority | As a … | I want to … | So that… |
|---|---|---|---|
* * * | new user | easily find instructions on commands that I need to use | I can quickly lookup the commands I want |
* * * | impatient user | see my contacts with all its details | I can have a clear picture of all my contacts |
* * * | forgetful user | add a contact to a list with a name | I can store information related to the contact |
* * * | forgetful user | add telegram handles to a contact | I can look it up when I forget, since telegram is popular amongst university students |
* * * | forgetful user | add email to a contact | I can look it up when I forget |
* * * | forgetful user | add tutorial groups to a contact | I can see which group a student belongs to when I forget |
* * * | forgetful user | add modules to a contact | I can see which module a student belongs to when I forget |
* * * | clumsy user | delete a contact | I can remove contacts I accidentally added/don't need |
* * * | user that prefers typing | perform all commands by typing instead of using a mouse to click | I can execute commands faster because i type faster than i use a mouse to click |
* * | busy user | find contacts quickly with some of his incomplete information key in to the search bar | I do not waste time on the nitty-gritty |
* * | frequent user | pin important contacts on the top | I can easily find them |
* * | impatient user | see my contacts by name | I can read more contacts simultaneously |
* * | new user | have a guided tour of the basic commands | I can start using the app without needing to look up the commands |
* * | TA of multiple courses | easily group contacts based on tutorial group | I can find my students' contacts easily |
* * | TA of multiple courses | easily group contacts based on module | I can find my students' contacts easily |
* * | user that values efficiency | edit an existing contact's information | I can save time not needing to delete and make a new contact |
* * | user that values efficiency | easily find the commands I need by typing in a command to list all commands | I don't have to navigate to an external guide |
* * | TA that values efficiency | easily delete multiple contacts at once by giving a common module/tutorial | I don't waste time deleting contacts one by one |
* * | user who likes to keep things ordered | sort my contacts by alphabetical order (or any specific order) | everything is clear at a glance |
* * | user who's switching phone | be able to load all my contacts easily | I don't have to add them in again |
* * | user with many contacts | find contacts by email | I know who emailed me or forgot who the email belongs to |
* * | user with many contacts | find contacts by telegram handle | I can find out who the handle belongs to |
* * | user with many contacts | tag contacts based on their relationship to me | I can tell from a quick glance the type of contact I'm reading |
* | advanced user | create my own shortcuts in command line | I can execute commands that I use often or commands that are very long faster |
* | forgetful user | set a custom timer for a notification before a contact's birthday | I am reminded to prepare for it |
* | new user | have an autocomplete function predict my typing and show me the potential options | I can use the command even if I'm unsure of the exact structure |
* | new user | see suggestions for commands when I input them wrong | I can quickly correct my mistake instead of needing to refer to another source |
* | new user that prefers to learn visually | watch a video showing the features and functionalities of the product | I can learn better |
* | new user who has a lot of contacts to add | have a command to efficiently add multiple contacts at once or be able to load contacts from phone contacts | I don't waste a lot of time adding multiple contacts as a new user starting with 0 contacts |
* | user that values efficiency | type a quick command and automatically navigate to my contact's email client to write a message to the client | I can save time navigating to my email client and then copying the email in |
* | user that values efficiency | type a quick command and automatically call a contact's phone on a phone or messenger app | I can save time navigating to the appropriate app and typing out their phone number |
* | user that values efficiency | see my commonly searched contacts at the top of the list | I don't waste time searching for contacts |
* | user who has many friends in the contacts | store their birthday and get a notification on that day | I can send them a message or make a phone call, and don't have to remember so many different birthday dates |
* | user with a lot of contacts | hide certain types of contact information when looking at the overall list | the list view is smaller and not clogged with information I don't use often |
* | busy user | type a quick command to paste information to a contact | I can speed up transferring a contact's information |
* | busy user | type a quick command to copy a contact's specific details | I can speed up transferring a contact's information |
* | frequent user | schedule deletion of contacts at a specific date | My contacts are not cluttered with contacts I don't need in case i forget to delete |
* | long-time user | delete a specific tag | I can delete some tags that no longer matter to me |
* | user that values efficiency | press a button to reinput the last executed command into the CLI | I can save time if I'm inputting multiple similar commands |
* | user that values efficiency | select many users at a time then add a tag to all of them | I don't have to do the same thing again and again |
{More to be added}
System: ConnectS
Actor: User
MSS:
User requests a list of contacts matching given keyword(s).
ConnectS shows a list of filtered contacts.
Use case ends.
System: ConnectS
Actor: User
MSS:
User requests to change the view tab to a specified module-tutorial group.
ConnectS changes the view tab to the specified group.
Use case ends.
Extensions
1a. The module-tutorial group provided does not exist.
1a1. ConnectS prompts the user that they are looking for a non-existent view tab.
Use case resumes from step 1.
System: ConnectS
Actor: User
MSS:
User requests to change the view tab to a view all contacts.
ConnectS changes the view tab to all contacts.
Use case ends.
System: ConnectS
Actor: User
MSS:
User requests to list contacts.
ConnectS shows a list of contacts.
Use case ends.
Extensions
2a. The list is empty.
Use case ends.
System: ConnectS
Actor: User
MSS:
User requests add contacts with name, telegram handle, email, module and tutorial group.
ConnectS adds contact.
Use case ends.
Extensions
1a. ConnectS detects invalid parameter content.
1a1. ConnectS prompts user that entered parameter(s) is invalid.
Use case resumes from step 1.
1b. ConnectS detects invalid ordering of parameter.
1b1. ConnectS prompts user to enter parameters in a given order.
Use case resumes from step 1.
System: ConnectS
Actor: User
MSS:
User requests to edit a specific contact in the list.
ConnectS edits the contact.
Use case ends.
Extensions
1a. The list is empty.
Use case ends.
2a. The given index is invalid.
2a1. ConnectS prompts user to enter a valid index.
Use case resumes at step 2.
2b. The edits requested are invalid.
2b1. ConnectS prompts user to enter a valid edit request.
Use case resumes at step 2.
2c. The edits result in the edited contact becoming the same as an already existing contact.
2c1. ConnectS prompts user that such a contact already exists.
Use case resumes at step 2.
System: ConnectS
Actor: User
MSS:
User requests to delete a specific contact in the list.
ConnectS deletes the contact.
Use case ends.
Extensions
1a. The list is empty.
Use case ends.
2a. The given index is invalid.
2a1. ConnectS prompts user to enter a valid index.
Use case resumes at step 2.
System: ConnectS
Actor: User
MSS:
User requests to delete an entire module or tutorial from all contacts.
ConnectS deletes the module/tutorial from all contacts and deletes contacts left without any module-tutorial group.
Use case ends.
Extensions
1a. The given module/tutorial does not exist.
Use case resumes from step 1.
System: ConnectS
Actor: User
MSS:
User requests to sort contacts by lexicographical order.
ConnectS sorts contacts by lexicographical order.
Use case ends.
System: ConnectS
Actor: User
MSS:
User requests to pin/unpin a specific contact in the list.
ConnectS pins/unpins the contact.
Use case ends.
Extensions
1a. The list is empty.
Use case ends.
2a. The given index is invalid.
2a1. ConnectS prompts user to enter a valid index.
Use case resumes at step 2.
System: ConnectS
Actor: User
MSS:
User requests to delete all contacts.
ConnectS deletes all contacts.
Use case ends.
Extensions
1a. There are no contacts in ConnectS.
Use case ends.
17 or above installed..txt and .json)pin, unpin, delete and edit commands.
delete 1 would delete the first person in View All mode rather
than the first person in the current Module-Tutorial tab (in View Tabs mode).ConnectS is made by a team of 4.
- and ..find n/Ada tt/@ada would be valid and interpreted as finding a name of n/Ada tt/@ada, instead of recognising
the typo and attempted invalid use of two keyword fields. We plan to change the prefix PREFIX/ to have spaces on both sides to prevent this situation.edit 1 aaaaa, ConnectS will give an invalid index error. However, an
invalid field/prefix error would be more appropriate. We plan to make these cases have a separate field error message.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
java -jar "ConnectS.jar Saving window preferences
Viewing All and Viewing Tabs
Exiting Application
exit into the command box.
help into the command box.
add n/Peter Parker t/@iamnotspidey e/peter@example.com m/CS2103T-T01 add n/Tony Stark t/@iamnotironman e/stark@example.com m/CS2103T-T01 tag/Rich add n/Steve Rogers e/cap@example.com t/@iamnotold m/CS2103T-T01 m/CS2106-T01 tag/Young tag/Captain add [Duplicate name, email, or telegram handle] Finding by name: find n/Pete Rogers
Expected: All found tutees with name matching “Pete” or “Rogers” are listed
Finding by telegram handle: find t/@iamnot
Expected: All found tutees with telegram handle matching “@iamnot” are listed
Finding by email: find e/pete cap
Expected: All found tutees with email matching “pete” or “cap” are listed
Invalid format
No prefix given: find, find pete, find @iamnot
More than one prefix given: find n/pete t/@iamnot
Expected: Error message showing that only one field can be found at a time
list into command box
pin 1 unpin 1 pin or unpin sort edit 1 n/Michael Jackson edit 1 t/@iamMJ e/Michael@example.com edit 1 m/CS2100-T05 edit 1 tag/ edit or edit 1 deleteMod CS2105 deleteMod deleteTut CS2103T-T11 deleteTut Dealing with corrupted data file
Edit ConnectS.json in the data folder such that the data do not make sense for ConnectS. For example, removing the name field of any person.
Launch ConnectS from your terminal (java -jar “ConnectS.jar”)
Expected: All tutees are cleared from ConnectS
Dealing with missing data file
Delete ConnectS.json
Launch ConnectS from your terminal (java -jar “ConnectS.jar”)
Expected: ConnectS is repopulated with sample tutees