Developer Guide
- Table of Contents
Acknowledgements
- {list here sources of all reused/adapted ideas, code, documentation, and third-party libraries – include links to the original source as well}
Setting up, getting started
Refer to the guide Setting up and getting started.
Design
.puml files used to create diagrams are in this document docs/diagrams folder. Refer to the PlantUML Tutorial at se-edu/guides to learn how to create and edit diagrams.
Architecture

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.
- At app launch, it initializes the other components in the correct sequence, and connects them up with each other.
- At shut down, it shuts down the other components and invokes cleanup methods where necessary.
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),
- defines its API in an
interfacewith the same name as the Component. - implements its functionality using a concrete
{Component Name}Managerclass (which follows the corresponding APIinterfacementioned 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.
UI 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,
- executes user commands using the
Logiccomponent. - listens for changes to
Modeldata so that the UI can be updated with the modified data. - keeps a reference to the
Logiccomponent, because theUIrelies on theLogicto execute commands. - depends on some classes in the
Modelcomponent, as it displaysPersonobject residing in theModel.
Logic component
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.

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:
- When
Logicis called upon to execute a command, it is passed to anAddressBookParserobject which in turn creates a parser that matches the command (e.g.,DeleteCommandParser) and uses it to parse the command. - This results in a
Commandobject (more precisely, an object of one of its subclasses e.g.,DeleteCommand) which is executed by theLogicManager. - The command can communicate with the
Modelwhen it is executed (e.g. to delete a person).
Note that although this is shown as a single step in the diagram above (for simplicity), in the code it can take several interactions (between the command object and theModel) to achieve. - The result of the command execution is encapsulated as a
CommandResultobject which is returned back fromLogic.
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:
- When called upon to parse a user command, the
AddressBookParserclass creates anXYZCommandParser(XYZis a placeholder for the specific command name e.g.,AddCommandParser) which uses the other classes shown above to parse the user command and create aXYZCommandobject (e.g.,AddCommand) which theAddressBookParserreturns back as aCommandobject. - All
XYZCommandParserclasses (e.g.,AddCommandParser,DeleteCommandParser, …) inherit from theParserinterface so that they can be treated similarly where possible e.g, during testing.
Model component
API : Model.java

The Model component,
- stores the address book data i.e., all
Personobjects (which are contained in aUniquePersonListobject). - stores the currently ‘selected’
Personobjects (e.g., results of a search query) as a separate filtered list which is exposed to outsiders as an unmodifiableObservableList<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. - stores a
UserPrefobject that represents the user’s preferences. This is exposed to the outside as aReadOnlyUserPrefobjects. - does not depend on any of the other three components (as the
Modelrepresents data entities of the domain, they should make sense on their own without depending on other components)
Tag list in the AddressBook, which Person references. This allows AddressBook to only require one Tag object per unique tag, instead of each Person needing their own Tag objects.
Storage component
API : Storage.java

The Storage component,
- can save both address book data and user preference data in JSON format, and read them back into corresponding objects.
- inherits from both
AddressBookStorageandUserPrefStorage, which means it can be treated as either one (if only the functionality of only one is needed). - depends on some classes in the
Modelcomponent (because theStoragecomponent’s job is to save/retrieve objects that belong to theModel)
Common classes
Classes used by multiple components are in the seedu.address.commons package.
Implementation
This section describes some noteworthy details on how certain features are implemented.
TODO: Add the implementations of some of our features here
Documentation, logging, testing, configuration, dev-ops
Appendix: Requirements
Product scope
Target user profile:
- is a NUS computer science teaching assistant managing multiple tutorial classes
- needs to manage students in each tutorial session efficiently
- needs to organize and track contacts across distinct academic roles (students, professors, fellow TAs)
- requires the ability to categorize and quickly retrieve contacts using specific fields (e.g., by tutorial group)
- frequently handles incomplete contact profiles that need to be updated iteratively (e.g., adding Telegram handles later)
- needs a reliable way to archive and export contact data at the end of the academic semester (e.g., a JSON file)
- prefers a streamlined, role-specific tool over a general-purpose address book
- can type fast
- prefers desktop apps over other types
- prefers typing to mouse interactions
- is reasonably comfortable using CLI apps
Value proposition: This product aims to streamline communication from TAs‘ to their students, other TAs, teaching staff,and professors. It achieves this by organizing contacts into courses, tutorial groups and tags. It supports custom contact categories (e.g., Telegram handles), and more searching functionality (e.g., by groups and/or by email etc.). It also makes contacts storing more flexible by only making names mandatory.
User stories
Priorities: High (must have) - * * *, Medium (nice to have) - * *, Low (unlikely to have) - *
| Priority | As a … | I want to … | So that I can… |
|---|---|---|---|
* * * |
TA | add a contact to the address book | keep a record of a person. |
* * * |
TA | delete a contact from the app | remove unwanted entries and keep my contact list accurate. |
* * * |
TA | view all contacts in the app | see all entries in the contact list. |
* * |
TA | edit details of a contact | keep contact information up to date |
* * |
TA | find contacts from the app by one or more specific attributes | see specific types of contacts(e.g.,a specific tag/course) in the contact list. |
* * |
TA | view detailed information of a contact | access all relevant information including attendance record about the student |
* |
TA | enroll a student to a course and a tutorial group | distinguish my students from different courses |
* |
TA | remove a student from a tutorial or course | update course droppings or enrollment mistakes |
* |
TA | mark a tutorial session from a course of a student as attended | identify if a student needs help |
* |
TA | update a student’s attendance record | fix any incorrect attendance records (i.e.,unattend a session) |
* |
TA | assign a contact tags | specify roles for my contacts (e.g.,fellow TAs) or mark them (e.g.,mark a student as an absentee) |
Use cases
(For all use cases below, the System is TAConnect and the Actor is NUS Computer Science Teaching Assistant (NUS CS TA) unless specified otherwise)
Use case: UC01 - View All Contacts
Guarantees: All the contacts in the address book are displayed in the contact list.
MSS
- TA requests to view their list of all contacts.
-
TAConnect lists all contacts and displays a success message.
Use case ends.
Extensions
- 2a. No contacts exist.
-
2a1. TAConnect displays an empty state message.
Use case ends.
-
Use case: UC02 - Add A Contact
Guarantees: A new contact is stored in the address book only if the input is valid.
MSS
- TA requests to add a contact with a name and any optional details (phone number, email, address, Telegram handle, tags).
- TAConnect validates the input.
-
TAConnect adds the contact, displays a success message, and shows the updated contact list with the new contact’s details.
Use case ends.
Extensions
- 2a. TAConnect detects invalid input.
-
2a1. TAConnect informs TA of invalid input and displays the correct format with an example.
Use case ends.
-
Use case: UC03 - Delete A Contact
Preconditions: TA has at least one contact in their list.
Guarantees: The chosen contact is removed from the address book only if the contact index is valid.
MSS
- TA requests to delete a specific contact.
-
TAConnect deletes the contact, displays a success message, and shows the updated contact list.
Use case ends.
Extensions
- 1a. TAConnect detects an invalid or out-of-range contact index.
-
1a1. TAConnect informs TA of the invalid index and displays the correct format with an example.
Use case ends.
-
- 1b. TAConnect detects other invalid input.
-
1b1. TAConnect informs TA of the invalid input and displays the correct format with an example.
Use case ends.
-
Use case: UC04 - Edit A Contact
Preconditions: TA has at least one contact in their list.
Guarantees: The contact’s details are updated only if the input and contact index are valid.
MSS
- TA requests to edit specific field(s) of a specific contact with new value(s).
- TAConnect validates the new value(s) for the specified field(s).
-
TAConnect updates the contact, displays a success message, and shows the updated contact list.
Use case ends.
Extensions
- 1a. TAConnect detects an invalid or out-of-range contact index.
-
1a1. TAConnect informs TA of the invalid index and displays the correct format with an example.
Use case ends.
-
- 1b. TAConnect detects other invalid input (e.g. no fields provided, invalid field values).
-
1b1. TAConnect informs TA of the invalid input and displays the correct format with an example.
Use case ends.
-
Use case: UC05 - Search/Filter Contacts
Preconditions: TA has at least one contact in their list.
Guarantees: Contacts matching the search criteria are displayed only if the input is valid.
MSS
- TA enters a search query with a valid combination of filter criteria (e.g. name, course, tutorial group, tag).
-
TAConnect retrieves the relevant contacts, displays a success message, and shows the filtered contact list.
Use case ends.
Extensions
- 1a. TA specifies a tutorial group without a course code.
-
1a1. TAConnect informs TA that a course code is required when filtering by tutorial group.
Use case ends.
-
- 1b. TAConnect detects other invalid input.
-
1b1. TAConnect informs TA of the invalid input and displays the correct format with an example.
Use case ends.
-
- 2a. No contacts match the given criteria.
-
2a1. TAConnect informs TA that no matching contacts were found.
Use case ends.
-
Use case: UC06 - View A Contact
Preconditions: TA has at least one contact in their list.
Guarantees: The full details of the specified contact are displayed only if the contact index is valid.
MSS
- TA requests to view the full details of a specific contact.
-
TAConnect displays the full details of the contact.
Use case ends.
Extensions
- 1a. TAConnect detects an invalid or out-of-range contact index.
-
1a1. TAConnect informs TA of the invalid index and displays the correct format with an example.
Use case ends.
-
- 1b. TAConnect detects other invalid input.
-
1b1. TAConnect informs TA of the invalid input and displays the correct format with an example.
Use case ends.
-
Use case: UC07 - Enroll A Student
Preconditions: TA has at least one contact in their list.
Guarantees: The specified student is enrolled in the given course and tutorial group only if the input is valid.
MSS
- TA requests to enroll a specific contact into a course and tutorial group.
- TAConnect validates the input.
-
TAConnect enrolls the student into the course and tutorial group, displays a success message, and shows the updated contact details.
Use case ends.
Extensions
- 1a. TAConnect detects an invalid or out-of-range contact index.
-
1a1. TAConnect informs TA of the invalid index and displays the correct format with an example.
Use case ends.
-
- 1b. TAConnect detects other invalid input (e.g. missing course code or tutorial group).
-
1b1. TAConnect informs TA of the invalid input and displays the correct format with an example.
Use case ends.
-
- 2a. Student is already enrolled in the given course and tutorial group.
-
2a1. TAConnect informs TA that the student is already enrolled.
Use case ends.
-
Use case: UC08 - Unenroll A Student
Preconditions: TA has at least one contact in their list.
Guarantees: The specified student is unenrolled from the given course only if the input is valid.
MSS
- TA requests to unenroll a specific contact from a course.
- TAConnect validates the input.
-
TAConnect unenrolls the student from the course, displays a success message, and shows the updated contact details.
Use case ends.
Extensions
- 1a. TAConnect detects an invalid or out-of-range contact index.
-
1a1. TAConnect informs TA of the invalid index and displays the correct format with an example.
Use case ends.
-
- 1b. TAConnect detects other invalid input (e.g. missing course code, or unnecessarily provided tutorial group).
-
1b1. TAConnect informs TA of the invalid input and displays the correct format with an example.
Use case ends.
-
- 2a. Student is not enrolled in the given course.
-
2a1. TAConnect informs TA that the student is not enrolled in the given course.
Use case ends.
-
Use case: UC09 - Mark Attendance
Preconditions: TA has at least one contact in their list.
Guarantees: The specified student’s attendance is marked for the given course and week only if the input is valid.
MSS
- TA requests to mark attendance for a specific contact for a given course and week.
- TAConnect validates the input.
-
TAConnect marks the attendance, displays a success message, and shows the updated contact details.
Use case ends.
Extensions
- 1a. TAConnect detects an invalid or out-of-range contact index.
-
1a1. TAConnect informs TA of the invalid index and displays the correct format with an example.
Use case ends.
-
- 1b. TAConnect detects other invalid input (e.g. missing course code, missing week number, week number out of range 1-13, unnecessarily provided tutorial group).
-
1b1. TAConnect informs TA of the invalid input and displays the correct format with an example.
Use case ends.
-
- 2a. Student is not enrolled in the given course.
-
2a1. TAConnect informs TA that the student is not enrolled in the given course.
Use case ends.
-
Use case: UC10 - Unmark Attendance
Preconditions: TA has at least one contact in their list.
Guarantees: The specified student’s attendance is unmarked for the given course and week only if the input is valid.
MSS
- TA requests to unmark attendance for a specific contact for a given course and week.
- TAConnect validates the input.
-
TAConnect unmarks the attendance, displays a success message, and shows the updated contact details.
Use case ends.
Extensions
- 1a. TAConnect detects an invalid or out-of-range contact index.
-
1a1. TAConnect informs TA of the invalid index and displays the correct format with an example.
Use case ends.
-
- 1b. TAConnect detects other invalid input (e.g. missing course code, missing week number, week number out of range 1-13, unnecessarily provided tutorial group).
-
1b1. TAConnect informs TA of the invalid input and displays the correct format with an example.
Use case ends.
-
- 2a. Student is not enrolled in the given course.
-
2a1. TAConnect informs TA that the student is not enrolled in the given course.
Use case ends.
-
Non-Functional Requirements
- All commands should have a response within 500ms.
- All contact information should be stored locally.
- Whenever a typo or mistake is made there is a message instead of a crash.
- The software should be able to host at least 100 students in total.
- The software should take no more than 200MB of space.
- Exported files for backup should be stored in a user-editable format (e.g., a JSON file).
- The software should be platform-independent, supporting all Windows, macOS and Linux.
- The software should not require any installers and should be able to be packaged into a single JAR file.
- The software should not depend on any remote server.
- GUI should provide visual feedback, but input is primarily text-based.
- The software should be able to handle corrupted and missing files.
- The software should be single-user based only.
Glossary
- Teaching Assistant (TA): A member of the teaching team who supports a course by running tutorials/labs, facilitating discussions, answering student questions, and coordinating with professors, course admins, and other TAs.
- Tag: A user-defined label attached to a contact to classify and organize them (e.g., student, prof, cs2103, tut01, projectgrpA). Tags enable quick filtering and searching across the contact list.
- Course: A structured module offered by the university with a unique course code (e.g. CS2101).
- Tutorial/Lab Group: A specific class grouping of students with a tutorial/lab code (e.g. Tut10, Lab11) of a course assigned to a TA.
- Student: A NUS Computer Science enrolled in a course supported by the TA.
Appendix: Instructions for manual testing
Given below are instructions to test the app manually.
Launch and shutdown
- 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.
-
Adding a person
- Adding a new person with all fields
- Test case:
add n/John Doe p/98765432 e/johnd@example.com a/John street, block 123, #01-01 tg/@johndoe t/student
Expected: A new contact with the specified details is added to the list. Details of the newly added contact shown in the status message.
- Test case:
- Adding a new person with only mandatory fields
- Test case:
add n/Alex Yeoh
Expected: A new contact with the name “Alex Yeoh” is added to the list. Details of the newly added contact shown in the status message.
- Test case:
- Adding a person with missing mandatory fields
- Test case:
add p/98765432 e/johnd@example.com
Expected: No person is added. Error details indicating the missing name and the correct command format are shown in the status message.
- Test case:
Deleting a person
- Deleting a person while all persons are being shown
-
Prerequisites: List all persons using the
listcommand. Multiple persons are displayed. -
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: 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.
-
Saving data
- Dealing with missing/corrupted data files
- {explain how to simulate a missing/corrupted file, and the expected behavior}