original source: AddressBook-Level3
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 child).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,
persons and subjectScores. Each score entry in subjectScores has a stable link to the person achieved through an internal map from name to id. Refer to typical JSON data file hereRead / write flow (high level)
Write (save): convert in‑memory ScoreEntry and Person objects to JSON DTOs and write them to the configured data file(s).
Read (load): read persons first and reconstruct the in‑memory AddressBook. Then read the subjectScores section and convert each DTO into a domain ScoreEntry while resolving each entry's link to a Person in the loaded AddressBook.
Validation happens during DTO→domain conversion. Any malformed or semantically invalid fields should produce clear, testable errors.
DTOs (the JSON adapter classes) map raw JSON to typed fields and perform syntactic validation (presence, types, basic formats). They convert to domain objects via a conversion method (e.g., toModelType()), which throws a clear exception on invalid data.
Validation rules (examples to document)
Classes used by multiple components are in the seedu.address.commons package.
This section describes some noteworthy details on how certain systems are implemented.
The subject system manages student enrollment and academic scores through three main components:
Subject (enum): Represents fixed subjects (MATH, ENGLISH, SCIENCE)ScoreDict: Manages score records for each subjectSubjectRegistry: Provides centralized access to enrollment and score dataClass Diagram:
The subject system implements enrollment and scoring functionality as follows:
How it works:
Subject::enrollPerson()ScoreDict with a default score of -1
How it works:
Subject::unenrollPerson()ScoreDict
How it works:
Subject::setScore()ScoreDict to the provided value.
ScoreDict within each Subject Person object
PersonObservableMap for UI bindingTarget user profile:
Value proposition:
Priorities: High (must have) - * * *, Medium (nice to have) - * *, Low (unlikely to have) - *
| ID | Priority | Epic | As a … | I want to … | So that I can… |
|---|---|---|---|---|---|
| C1 | * * * | Contact Management | kindergarten teacher | view a child's parents' contact details | quickly contact them during emergencies |
| C2 | * * * | Contact Management | kindergarten admin | store and retrieve parents' phone numbers and addresses | send out updates and notices efficiently |
| C3 | * * * | Contact Management | kindergarten teacher | search for a child by name | access their profile quickly |
| C4 | * * | Contact Management | kindergarten admin | see the name of the primary guardian | know who to contact first |
| C5 | * * | Contact Management | kindergarten teacher | update a parent's phone number | ensure the system always reflects the latest contact information |
| P1 | * * * | Child Profiling | kindergarten teacher | record important facts about each child | tailor care and instructions to their needs |
| P2 | * * * | Child Profiling | kindergarten teacher | record emergency care instructions | act quickly in case of an incident |
| U1 | * * | System Usability & Data Integrity | kindergarten teacher | delete outdated child information | ensure the database remains accurate |
| U2 | * * | System Usability & Data Integrity | kindergarten teacher | edit outdated child information | ensure the database remains accurate |
| A1 | * * | Academic Tracking | kindergarten teacher | record test scores for each child | track their progress over time |
| A2 | * * | Academic Tracking | kindergarten teacher | tag notes alongside attendance | ensure context is preserved in records |
| A3 | * * | Academic Tracking | kindergarten teacher | bulk delete child records | |
| A4 | * * | Academic Tracking | kindergarten teacher | bulk enroll/unenroll children | |
| A5 | * * | Academic Tracking | kindergarten teacher | enroll/unenroll specified children into subjects | |
| F1 | * * | Filtering and Grouping | kindergarten teacher | filter children by food allergies | inform the kitchen staff accordingly |
| F2 | * * | Filtering and Grouping | kindergarten teacher | filter children with special needs | prepare inclusive activities |
| F3 | * | Filtering and Grouping | kindergarten teacher | filter children who are on medication | remind staff to monitor them more closely |
(For all use cases below, the System is the ParentConnect and the Actor is the user, unless specified otherwise)
Use case: UC01 - View all child records
MSS
Use case ends.
Extensions
1a. There are no existing child records.
Use case ends.
Use case: UC02 - Add a child record
MSS
Use case ends.
Extensions
1a. The provided details are invalid.
1a1. ParentConnect shows an error message.
Use case ends.
1b. Some necessary details are not provided by user.
1b1. ParentConnect shows an error message.
Use case ends.
1c. The provided details match an existing child record.
1c1. ParentConnect shows an error message.
Use case ends.
Use case: UC03 - Delete child record(s)
MSS
User requests to delete child record(s) in the displayed list.
ParentConnect deletes the child record(s) and displays details of the deleted child record.
ParentConnect updates the displayed child records.
Use case ends.
Extensions
1a. The displayed list is currently empty or provided index(es) is invalid.
1a1. ParentConnect shows an error message.
Use case ends.
1b. No index is provided.
1b1. ParentConnect shows an error message.
Use case ends.
Use case: UC04 - Edit a child record
MSS
User requests to edit a specific child record in the displayed list and provides necessary details.
ParentConnect updates the child record with the new info provided.
ParentConnect updates the displayed child records.
Use case ends.
Extensions
1a. The displayed list is empty or the provided index is invalid.
1a1. ParentConnect shows an error message.
Use case ends.
1b. The provided details are invalid.
1b1. ParentConnect shows an error message.
Use case ends.
1c. No details are provided.
1c1. ParentConnect shows an error message.
Use case ends.
Use case: UC05 - Find child records
MSS
User enters search command and provides search details.
ParentConnect displays a list of child records based on search details.
Use case ends.
Extensions
1a. The provided details are invalid.
1a1. ParentConnect shows an error message.
Use case ends.
1b. The provided details are missing.
1b1. ParentConnect shows an error message.
Use case ends.
Use case: UC06 - Clear child records
MSS
User requests to clear all child records.
ParentConnect clears all child records.
ParentConnect displays an empty list.
Use case ends.
Use case: UC07 - Enroll child(ren) into subject(s)
MSS
User requests to enroll the selected child(ren) into the selected subject(s).
ParentConnect enrolls the selected child(ren) into the selected subject(s).
ParentConnect updates the displayed child records.
Use case ends.
Extensions
1a. The provided details are invalid.
1a1. ParentConnect shows an error message.
Use case ends.
1b. The provided details are missing.
1b1. ParentConnect shows an error message.
Use case ends.
1c. The selected child(ren) is/are already enrolled in the selected subjects.
1c1. ParentConnect shows a message informing the user.
Use case ends.
Use case: UC08 - Unenroll child(ren) from subject(s)
MSS
User requests to unenroll the selected child(ren) from the selected subject(s).
ParentConnect unenrolls the selected child(ren) from the selected subject(s).
ParentConnect updates the displayed child records.
Use case ends.
Extensions
1a. The provided details are invalid.
1a1. ParentConnect shows an error message.
Use case ends.
1b. The provided details are missing.
1b1. ParentConnect shows an error message.
Use case ends.
1c. The selected child(ren) is/are not enrolled in the selected subjects.
1c1. ParentConnect shows a message informing the user.
Use case ends.
Use case: UC09 - Set score of child(ren) for subject
Guarantees
MSS
User requests to set the score of the selected child(ren) for the selected subject.
ParentConnect sets the score of the selected child(ren) for the selected subject.
ParentConnect updates the displayed child records.
Use case ends.
Extensions
1a. The provided details are invalid.
1a1. ParentConnect shows an error message.
Use case ends.
1b. The provided details are missing.
1b1. ParentConnect shows an error message.
Use case ends.
17 or above installed.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 a command terminal and cd into the folder with the jar file.
Run java --version to ensure that you are using Java 17 or above.
Run java -jar parentconnect.jar to open the application. Expected: A window appears loaded with placeholder 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.
Finding a child record while some child records are being shown
Prerequisites: Sample data provided upon initialisation is used.
Test case: find c/Li David
Expected: Child records for David Li and Charlotte Oliveir are displayed. Number of child records found is shown in the status message.
Test case: find t/adhd
Expected: Child records for Alex Jr and Bernice Yu are displayed. Number of child records found is shown in the status message.
Test case: find a/City
Expected: Displayed records will not change. Error details shown in the status message.
Other incorrect find commands to try: find, find c/Li c/David
Expected: Similar to previous.
Adding a child record
Test case: add c/Hua Cheng b/Xie Lian a/Paradise Mansion p/66661111 e/xielian@example.com
Expected: Child record is added to the list. Details of the added child record shown in the status message. Displayed child records are updated.
Test case: add c/Hua Cheng b/Xie Lian a/Paradise Mansion p/66661111 e/xielian@example.com
Expected: If this is done again after step 1., an error message will be shown in the status message due to detected duplicate. No child record is added.
Test case: add c/Nyx Xia b/Selene Yan a/Ocean City p/88888888 e/selene@example.com r/cats t/ocd
Expected: Child record is added to the list. Details of the added child record shown in the status message. Displayed child records are updated.
Test case: add c/inval!d N@me
Expected: No child record is added. Error details shown in the status message.
Other incorrect add commands to try: add, add e/invalid_email, add c/Nyx Xia b/Selene Yan a/Ocean City p/88888888
Expected: Similar to previous.
Deleting child record(s) while some child records are being shown
Prerequisites: At least three child records in the displayed list.
Test case: delete 1
Expected: First child record is deleted from the list. Details of the deleted child record shown in the status message.
Test case: delete 1 2
Expected: The first and second child records are both deleted from the list. Details of the deleted child records shown in the status message.
Test case: delete 0
Expected: No child record 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 child record while some child records are being shown
Prerequisites: Multiple child records in the list.
Test case: edit 1 p/12345678 a/123, Nice Nature Road
Expected: First child record's parent phone number and address are updated. Details of the updated record are shown in the status message.
Test case: edit 0
Expected: No record is updated. Error details shown in the status message.
Other incorrect edit commands to try: edit, edit 1, edit p/1234
Expected: Similar to previous.
Enrolling a child into a subject while some child records are being shown
Prerequisites: Multiple child records are being displayed in the list.
Test case: enroll 1 2 s/science s/math s/english
Expected: First two child records' subjects are updated. Details of the enrollment are shown in the status message.
Test case: enroll all s/math
Expected: All displayed child records' subjects are updated. Details of the enrollment are shown in the status message.
If a child is already enrolled in the subject before running this command, they will be skipped. This is reflected in the status message.
If all the displayed children are already enrolled in the subject before running this command, the status message will inform the user about this.
Test case: enroll 1
Expected: No record is updated. Error details shown in the status message.
Other incorrect enroll commands to try: enroll, enroll 0 s/math
Expected: Similar to previous.
Setting the score of a child for a subject while some child records are being shown
Prerequisites: Multiple child records are being displayed in the list. The following tests are done right after the manual testing for enrollment above.
Test case: setscore 1 2 s/science g/50
Expected: First two child records' scores are updated. Details of the update are shown in the status message.
Test case: setscore all s/math g/20
Expected: All displayed child records' subjects are updated. Details of the update are shown in the status message.
Test case: setscore 1 2 s/science s/math g/50
Expected: No record is updated. Error details shown in the status message.
Other incorrect set score commands to try: setscore, setscore 1 s/science g/50 g/20, setscore 1
Expected: Similar to previous.
Unenrolling a child from a subject while some child records are being shown
Prerequisites: Multiple child records are being displayed in the list. The following tests are done after the manual testing for enrollment above.
Test case: unenroll 1 2 s/science s/math s/english
Expected: First two child records' subjects are updated. Details of the unenrollment are shown in the status message.
Test case: unenroll all s/math
Expected: All displayed child records' subjects are updated. Details of the unenrollment are shown in the status message.
If a child is not enrolled in the subject before running this command, they will be skipped. This is reflected in the status message.
If all the displayed children are not enrolled in the subject before running this command, the status message will inform the user about this.
Test case: unenroll 1
Expected: No record is updated. Error details shown in the status message.
Other incorrect unenroll commands to try: unenroll, unenroll 0 s/math
Expected: Similar to previous.
Automatic data saving
1.1. Test automatic save after add command:
add c/Test Child b/Test Parent a/Test Address p/12345678 e/test@example.com.java -jar parentconnect.jar.1.2. Test automatic save after edit command:
edit 1 p/87654321.java -jar parentconnect.jar.1.3. Test automatic save after delete command:
delete 1.java -jar parentconnect.jar.1.4. Test automatic save after enroll command:
enroll 1 s/math.java -jar parentconnect.jar.1.5. Test automatic save after setscore command:
setscore 1 s/math g/85.java -jar parentconnect.jar.subjectScores section contains an entry with the child's name, subject "math", and score 85.math, science or english, since we use an enum to keep track of subjects. Later on we plan on adding ways to add your own subjects to improve the customizability of the app.Difficulty level: Moderate ~ High
Domain Model Integration
Data Consistency Guarantees
Intuitive UI/UX
Robust and secure system