{ list here sources of all reused/adapted ideas, code, documentation, and third-party libraries -- include links to the original source as well }
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 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.The following sequence diagram illustrates the interactions between the UI and Logic components when executing a Find name command attribute on the updated UI.
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.The find command allows users to filter the displayed person list based on the specified search criteria.
The diagram below shows the parser classes involved in handling the find command.
When the user enters a find command, AddressBookParser identifies the command word and creates a FindCommandParser.
FindCommandParser then parses the input arguments and constructs a FindCommand, which is returned as a Command object for execution.
Upon execution, FindCommand calls Model#updateFilteredPersonList(...) to update the displayed list according to the given predicate.
The find command can support different forms of filtering through different predicates, making the search functionality flexible and extensible.
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 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.

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.
addAdds a new tutor profile to Tuto.
The sequence diagram below illustrates the interactions between the Logic and Model components during the execution of the add command.
The add command is processed in two main phases: parsing and execution.
The input string from user is first parsed into an Person object, which is then wrapped in an AddCommand object and executed to update the Model object.
The sequence of interactions is as follows:
add command with the correct arguments, which is received by LogicManager.LogicManager calls AddressBookParser to parse the input.AddressBookParser identifies the command word and delegates parsing to AddCommandParser.AddCommandParser parses the arguments and constructs a Person object based on the given attributes stated in the arguments.AddCommandParser creates an AddCommand object containing the Person.AddCommand is returned to LogicManager.LogicManager executes the command by calling AddCommand#execute(Model).AddCommand performs validation checks:
Person is added to the Model.CommandResult is created and returned to the user.ParseException is thrown during parsing and the command object is not created.CommandException is thrown and the operation is aborted.CommandException is thrown and the operation is aborted.To ensure data integrity, the application enforces uniqueness constraints on each Person.
The uniqueness of a Person is determined by the following fields:
Duplicate checks are performed in AddCommand and EditCommand before delegating to the model.
If a duplicate is detected, a CommandException is thrown immediately with an appropriate error message.
If any of the following conditions are met:
The operation is rejected and an appropriate error message is shown to the user.
Duplicate checks are performed in the following priority:
This ensures that name conflicts are detected first, followed by contact information conflicts.
Aspect: What defines a duplicate person
Alternative 1 (current choice): Use phone number, and email address as uniqueness constraints
Alternative 2: Use full object equality
The following class diagram shows the key classes involved in enforcing uniqueness constraints, and how they interact structurally.
AddCommand and EditCommand depend on the Model interface to perform duplicate checks.
ModelManager implements Model and delegates to AddressBook, which contains a
UniquePersonList that stores all Person objects.
The following diagram illustrates how duplicate checks are performed during an add or edit operation:
Aspect: How undo & redo executes:
Alternative 1 (current choice): Saves the entire address book.
Alternative 2: Individual command knows how to undo/redo by itself.
delete, just save the person being deleted).{more aspects and alternatives to be added}
{Explain here how the data archiving feature will be implemented}
Target user profile:
Value proposition: Our address book allows Parents to easily manage a stored list of manually added freelance Tutors contacts for their Children’s subjects. The address book will present useful data in a structured format for Parents to make decisions of a Tutor for their Children.
Priorities: High (must have) - * * *, Medium (nice to have) - * *, Low (unlikely to have) - *
| Priority | As a … | I can… | So that... |
|---|---|---|---|
* * * | parent | view a tutor profile | I can decide whether the tutor is good for my child |
* * * | parent | delete a tutor from the address book | the address book stays relevant and uncluttered |
* * * | parent | add a tutor profile | I can keep track of tutors |
* * * | parent | view a tutor's hourly rate | I can find someone who fits within my family's budget |
* * | parent | search for tutors by subject | I can match a tutor to my child's academic needs |
{More to be added}
(For all use cases below, the System is the Tuto and the Actor is the Parent, unless specified otherwise)
Preconditions: Tuto is running
MSS:
Parent requests to list all tutor contactsTuto returns a list of all stored Tutor Profiles
Use Case endsExtensions
1a1. Tuto returns an error message
Use case ends
2a. The contact list is empty
2a1. Tuto displays a message indicating no contacts have been added yet.
Use case ends.
Preconditions: Tuto is running
MSS:
Parent requests to list all Tutor Contacts (U1)Parent enters the command specifying the IndexTuto displays the tutor's full profile
Use Case endsExtensions
2a. The provided index is invalid
2a1. Tuto shows an error message
Use case ends
2b. The command format is invalid
2b1. Tuto shows an error message.
Use case ends
Preconditions: Tuto is running and Tuto contains at least one Tutor Contact
Guarantees: The Tutor Contact is removed from storage upon successful completion.
MSS:
Parent requests to list all Tutor Contacts (U1)Parent enters the delete command specifying the Index of the tutor.Tuto deletes the contactTuto displays a confirmation message that the Tutor Contact has been deleted successfully
Use Case endsExtensions
2a. The provided index is invalid.
2a1. Tuto shows an error message.
Use case ends
2b. The command format is invalid
2b1. Tuto shows an error message.
Use case ends
Preconditions: Tuto is running
Guarantees: If MSS completes until step 3, Tutor contact will be added to Tuto’s storage
MSS:
Parent enters the add command specifying the required ParametersTuto validates the parameters.Tuto adds the Tutor Profile to the contact listTuto displays a success message on the addition
Use Case endsExtensions
2a. One or more compulsory Parameters are missing
2a1. Tuto returns an error message indicating the missing fields.
Use case ends
2b. One or more Parameters are in an invalid format
2b1. Tuto returns an error message indicating the constraint violation.
Use case ends
2c. A tutor with the same details (Duplicate) already exists.
2c1. Tuto shows a duplicate entry error message.
Use case ends
Preconditions: Tuto is running
Guarantees: If MSS completes until step 3, Tuto displays all tutors in the contact list with matching subjects
MSS:
Parent enters the find command specifying a Subject keywordTuto validates the entered detailsTuto searches and displays a list of tutors matching the subject.
Use Case endsExtensions
2a. The command format is invalid
2a1. Tuto shows an error message.
Use case ends
3a. No tutors found in contacts list matching the keyword
3a1. Tuto shows a message indicating no results found.
Use case ends
Preconditions: Tuto is running and Tuto contains at least one Tutor Contact
Guarantees: If MSS completes until step 4, the Tutor Contact will be updated in Tuto's storage.
MSS:
Parent requests to list all Tutor Contacts (U1).Parent enters the edit command, specifying the Index of the tutor and the Parameters to update.Tuto validates the index and the new parameters.Tuto updates the Tutor ProfileTuto displays the updated details of the tutor.
Use Case endsExtensions
3a. The provided Index is invalid (e.g., 0, negative, or out of bounds).
3a1. Tuto shows an error message.
Use case ends
3b. The provided Parameters violate validation rules.
3b1. Tuto returns an error message indicating the invalid format.
Use case ends
3c. The update results in a Duplicate Entry of an existing Tutor Contact.
3c1. Tuto shows a duplicate entry error message.
Use case ends
17 or above installed.17.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
Saving window preferences
{ more test cases … }
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. Timestamp in the status bar is updated.
Test case: delete 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)
Expected: Similar to previous.
{ more test cases … }
Dealing with missing/corrupted data files
{ more test cases … }