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 student).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
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.addressbook.commons
package.
This section describes some noteworthy details on how certain features are implemented.
This feature enables users to seamlessly integrate new student profiles into the EduLink-NUS application. To ensure data integrity and completeness, the system necessitates the inclusion of essential parameters such as Name, Student ID, Phone Number, Email, Address, Intake, and Major. Additionally, users have the option to include tags. The activity diagram below shows the sequence of action users will have to take to add a new Student Profile into the EduLink-NUS application.
The below class diagram represents the key classes and their relationships involved in the implementation of the Add feature in the EduLink-NUS application.
Some additional information:
John Doe
will be parsed as John Doe
.Automatic Removal of Additional Whitespaces reasoning: Storing extra whitespaces doesn't add any meaningful information and only introduces unnecessary complexity. By automatically removing these additional whitespaces, the system ensures that data is stored in a clean and consistent format, without sacrificing any essential information.
Creating a new ParserUtil for Data Validation:
Alternative 1 (Current Implementation):
Alternative 2:
We chose Alternative 1 for its centralized validation logic in ParserUtil, promoting code modularity, consistency, and easier maintenance. This approach ensures uniformity across validation rules and We chose Alternative 1 due to the nature of our parameters; name, address, and major share similar validation requirements. Centralized validation in ParserUtil ensures uniformity, simplifying maintenance and testing across classes, promoting code modularity, and enhancing consistency.
This find feature enables the search for students in the EduLink-NUS application based on their Names, Student IDs, or Both. The search specification will vary depending on the search parameter. i.e. using Names, Student IDs, or Both. Below is a brief summary:
Below is a representative class diagram of the feature. The implementation of this feature involved the creation of three new classes, those being IdAndNameContainsQueryIdAndNamePredicate, IdContainsQueryIdPredicate, and NameContainsQueryNamePredicate. Each class is designed to address specific aspects of the search specifications outlined in the description. Essentially, they serve to encapsulate and modularize the logic for finding students based on different search criteria.
In the sequence diagram provided below, the interaction among various classes forming the foundation of the find feature is illustrated. The sequence is initiated when the user enters the command "find n/John D id/A123" into the command box, triggering the execute("find n/John D id/A123")
method call in the LogicManager.
Note: The lifeline for FindCommandParser
should end at the destroy marker (X) but due to a limitation of PlantUML, the lifeline continues till the end of diagram.
The sequence diagram above reveals that the FindCommand
constructor requires a Predicate
argument. The determination of which specific predicate to pass — IdAndNameContainsQueryIdAndNamePredicate
, IdContainsQueryIdPredicate
, or NameContainsQueryNamePredicate
— is elucidated below:
Parsing and Determination by FindCommandParser:
FindCommandParser
is responsible for parsing the command string and extracting relevant search criteria.FindCommandParser
determines the appropriate predicate to use for the search.Predicate Selection Criteria:
n/John
and id/A123
), the FindCommandParser
selects IdAndNameContainsQueryIdAndNamePredicate
.id/A123
), the FindCommandParser
selects IdContainsQueryIdPredicate
.n/John
), the FindCommandParser
selects NameContainsQueryNamePredicate
.Passing Predicate to FindCommand:
FindCommandParser
instantiates a FindCommand
object, passing the selected predicate as an argument to its constructor.FindCommand
is equipped with the correct predicate for executing the search operation effectively.The below sequence diagram highlights this process:
Design of Predicate:
Design of Matching Name Criteria Reasoning:
Design of Matching ID Criteria Reasoning:
This export feature enables the user to effectively export the students data into nicely formatted CSV file, which users can use to port the data to other Applications such as Excel, Spreadsheet
User just need to specify the FileName
and successful execution will create the FileName.csv
at [JAR_FileLocation]/exports/Filename.csv
.
Below is a representative class diagram of the feature. The implementation of this feature involved creation of one new class i.e CSVUtil , to handle the conversion between application data into CSV Format.
Note: The lifeline for ExportCommandParser
should end at the destroy marker (X) but due to a limitation of PlantUML, the lifeline continues till the end of diagram.
This import feature enables the user to import the students data into the application from a valid JSON
file,
User just need to specify the FileName
and successful execution will import the data from FileName.json
located at [JAR_FileLocation]/data/Filename.json
.
Below is a representative class diagram of the feature. The implementation of this feature didn't involved creation of any class , but it requires some new dependencies to be introduced in order to follow OOP Design. i.e Including Storage
Object in the ImportCommand
.
Note: The lifeline for ImportCommandParser
should end at the destroy marker (X) but due to a limitation of PlantUML, the lifeline continues till the end of diagram.
The Grade feature allows users to efficiently manage and update student grades within the EduLink-NUS application. To maintain data integrity and completeness, the system requires the inclusion of essential parameters such as Student ID, Module Code and Score. The feature adds or edits depending on the existence of the grade for the specified module and student.
The activity diagram below illustrates the sequence of actions users will undertake to add or update student grades within the EduLink-NUS application.
Below is a representative class diagram of the feature. The implementation of this feature involved the creation of five new classes:
In the sequence diagram provided below, the interaction among various classes forming the foundation of the grade feature is illustrated.
Note: The lifeline for GradeCommandParser
should end at the destroy marker (X) but due to a limitation of PlantUML, the lifeline continues till the end of diagram.
The sequence diagram reveals that the GradeCommand
constructor requires ID
and Grade
arguments. The Grade
argument contains a numerical value representing the grade. This numerical grade is to be processed by the GradeUtil
class to generate the corresponding letter grade using predefined predicates.
Additional Information:
Design of Parsing Grade Data Input:
Design of Parsing Letter Grade:
Design of Editing Grade:
The Tag feature allows users to add tags to a student's profile. The user needs to specify the student to tag by inputting the student's ID. Users can add several tags at once to improve working efficiency.
Below is a representative class diagram of the tag
feature.
The sequence diagram below shows the interaction of different classes to execute add tag command.
Note: The lifeline for TagCommandParser
should end at the destroy marker (X) but due to a limitation of PlantUML, the lifeline continues till the end of the diagram.
Design of Parsing Tag Input:
Design of Tag message:
Below is a representative class diagram of the feature. The implementation of this feature didn't involved creation of any class, but some additional fields in the preexisting classes and changes in methods.
Aspect: How undo executes:
Alternative 1 (current choice): Saves the entire address book.
Alternative 2: Individual command knows how to undo by itself.
delete
, just save the student being deleted).We decided to choose the Alternative 1 and limit the number of Past History Saved to 20 i.e. User can only revert back from last 20 commands only to avoid the Performance issue and keep the implementation Simple.
Target user profile:
Value proposition:
Priorities: High (must have) - * * *
, Medium (nice to have) - * *
, Low (unlikely to have) - *
Priority | As a… | I can… | So that I can… |
---|---|---|---|
** | new user | access a help guide that provides detailed instructions | effectively utilize the platform's features and functionalities |
* | user | export student data to a .csv file file | perform analytics work, such as data analysis and statistical modeling |
** | user | import student data from .json file | eliminate the need to input every piece of information individually |
*** | user | view a list of student | Easily reach out to them for academic support or research opportunities |
*** | user | add new student information to the system (Grade, Cohort, Module, Contact Information) | keep the database up-to-date with the latest student records |
*** | user | delete a student information from the system when necessary | ensure outdated or incorrect records are removed efficiently and accurately |
*** | user | edit the information of a student in the system | update their details accurately as needed |
** | |||
** | |||
*** | user | search for students by their name or Student ID | quickly locate specific individuals within the system |
*** | user | add tags to students and classify them based on various criteria such as “PotentialTA” | easily identify and group students based on specific attributes or characteristics |
*** | user | edit tag of a student | correct or update student's tag |
*** | user | delete multiple tags from a student at once | remove unnecessary tags easily |
* | |||
* | |||
*** | user | enjoy the benefit of automatic prevention of duplicate entries | ensure data integrity |
*** | user | retrieve specific information based on tags, such as retrieving the emails of all students belonging to a particular cohort | streamline communication with a huge number of students |
* | user | automatically updates student information using the system, e.g. student year group based on current datetime | ensure data accuracy and reduce manual data editing |
* | |||
* | user | perform bulk deletion of data based on specific criteria within the system | efficiently remove outdated or irrelevant records in large quantities |
* | user | undo previous actions within the system | revert changes or mistakes made, providing a safety net for data integrity |
* | |||
** | |||
*** | user | enjoy a user-friendly interface (UI) when interacting with the system | reduce cognitive load |
*** | user | efficiently navigate and interact with the system using typed user commands | access features swiftly, and accomplish tasks with ease |
*** | user | automatically save my modifications every time I make a change within the system | ensure contacts and information are consistently backed up, preventing any major loss of data |
* | user | manage multiple databases within the system | organise and segregate data into distinct databases, such as addressbook1 and addressbook2 |
* | user | view my most recent searches within the system | access previously searched items, saving time and effort when revisiting them |
* | |||
* | |||
** | user | Use keyboard shortcut to undo typing commands and access recent commands | Improve efficiency when using the product (do not need to retype command) |
(For all use cases below, the System is the EduLink NUS
and the Actor is the National University of Singapore professors and teaching assistants
, unless specified otherwise)
MSS
Users executes any valid Command
EduLink-NUS shows a list of students.
User request to export the students data in a .csv
file by inputting a filename (e.g. NUS-CS) (Output filename)
Students data successfully exported and new file create in [JAR_FILE_LOCATION]/exports/NUS-CS.csv
Use case ends.
Extensions
3a. provided filename doesn't follow the Format.
3a1. EduLink-NUS informs user the constraints for filename
3a2. User enters new filename Steps 3a1-3a2 are repeated till a valid filename is given
Use case resumes at Step 4
3a. Application was not able to create the file (e.g. Permissions Conflict)
3a1. EduLink-NUS informs user that , Export was not successfully executed.
3a2. Users verifies the Permissions , etc. Steps 3a1-3a2 are repeated till the issue is resolved
Use case resumes at Step 4
MSS
EduLink-NUS shows list of students , but user wants to import another Student Database.
User request to import the students data from a valid JSON
file by inputting a filename (e.g. NUS-CS) (Output filename)
Students data successfully imported from the file located at[JAR_FILE_LOCATION]/data/NUS-CS.json
Use case ends.
Extensions
3a. provided filename doesn't follow the Format.
3a1. EduLink-NUS informs user the constraints for filename
3a2. User enters new filename Steps 3a1-3a2 are repeated until a valid filename is given
Use case resumes at Step 4
3a. Application was not able to import from the Provided file due to Invalid JSON
file.
3a1. EduLink-NUS informs user that , Import was not successfully executed.
3a2. User places another JSON
file.
Steps 3a1-3a2 are repeated until a valid JSON
file is provided.
Use case resumes at Step 4
3a. Application was not able to import as file with input filename doesn't exist.
3a1. EduLink-NUS informs user that , Import was not successfully executed.
3a2. User verifies the file is present and/or resolve the issue.
Steps 3a1-3a2 are repeated util a valid JSON
is not present with the given filename.
Use case resumes at Step 4
MSS
Users executes any valid Command that changes data of any student in the Application.
EduLink-NUS shows a list of students.
User realise that the previous command has introduced some data inconsistency.
User request to undo
the previous command.
EduLink-NUS revert back to the previous state i.e. state before the execution of the last command.
Use case ends.
Extensions
4a. There is no History available i.e. No previous state available.
Use case ends
3a. User has reached maximum allowed undo
commands i.e. reverted 20 previously executed commands.
3a1. EduLink-NUS informs user that , User have reached the maximum allowed undo
commands.
Use case ends
MSS
Users executes any valid Command.
EduLink-NUS shows a list of students.
User realise that the new command he/she wants to execute is almost same as the previous one.
User requests for the Recent Command either by GUI or CLI.
Recent Command appears in the CommandBox.
Use case ends.
Extensions
4a. No History of Recent Command available
Use case ends
MSS
User requests to list all students. (UC XX)
EduLink-NUS shows a list of all students.
User gets to know the ID of a specific student.
User requests to add tags a specific student by inputting that student's ID and tags.
The tags are successfully added to that student.
Use case ends.
Extensions
2a. The list is empty.
Use case ends.
4a. Invalid student ID entered
4a1. EduLink-NUS informs user the constraints for student ID.
4a2. User enters new student ID and tag information. Steps 4a1 - 4a2 are repeated till a valid student ID is given.
Use case resumes at step 5
4b. Duplicate tag(s) found
Use case resumes at step 5
4c. Invalid tag(s) found
4b1. EduLink-NUS inform the constraints for tag.
4a2. User enters new student ID and tag information. Steps 4a1 - 4a2 are repeated till all inputted tags are valid.
Use case resumes at step 5
MSS
User requests to list all students.
EduLink-NUS shows a list of all students.
User gets to know the ID of a specific student.
User requests to edit a specific student's tag by inputting that student's ID tag to be edited and resulting tag
The student's tag is successfully edited to the resulting tag.
Use case ends.
Extensions
2a. The list is empty.
Use case ends.
4a. Invalid student ID entered
4a1. EduLink-NUS informs user the constraints for student ID
4a2. User enters new student ID and tag information Steps 4a1 - 4a2 are repeated till a valid student ID is given
Use case resumes at step 5
4b. Can't find specified student
4a1. EduLink-NUS informs user that studentID is not found
4a2. User enters new student ID and tag information Steps 4a1 - 4a2 are repeated till a valid student ID is given
Use case resumes at step 5
4c. Duplicate tag found (the resulting tag is already there)
4b1. EduLink-NUS informs user that resulting tag already exist for the student specified
4a2. User enters new student ID and tag information
Steps 4a1 - 4a2 are repeated till all inputted tags are valid
Use case resumes at step 5
4d. Invalid tag found
4b1. EduLink-NUS informs user the constraints for tag.
4a2. User enters new student ID and tag information
Steps 4a1 - 4a2 are repeated till all inputted tags are valid
Use case resumes at step 5
4e. Can't find the tag to edit
4b1. EduLink-NUS informs user that system can't find the tag to be edited.
4a2. User enters new tag. Steps 4a1 - 4a2 are repeated till all inputted tags are valid
Use case resumes at step 5
MSS
User request to list all students.
EduLink-NUS shows a list of all students.
User gets to know the name or ID of a specific student.
User requests to delete tags from a specific student by inputting that student's ID and tags.
The tags are successfully deleted from that student.
Use case ends.
Extensions
2a. The list is empty.
Use case ends.
4a. Invalid student ID entered
4a1. EduLink-NUS informs user the constraints for student ID
4a2. User enters new student ID and tag information Steps 4a1 - 4a2 are repeated till a valid student ID is given
Use case resumes at step 5
4b. Invalid tag found
4b1. EduLink-NUS informs user the constraints for tag
4a2. User enters new student ID and tag information Steps 4a1 - 4a2 are repeated till all inputted tags are valid
Use case resumes at step 5
4c. Can't find the tag to delete
4b1. EduLink-NUS informs user that system can't find the tag to delete.
4a2. User enters new tags. Steps 4a1 - 4a2 are repeated till all inputted tags are valid
Use case resumes at step 5
MSS
User request to list students.
AddressBook shows a list of all students.
User get to know the name or ID of a specific student.
User prompt to edit a specific student by inputting that student's ID and updated information.
The student's information is successfully changed.
Use case ends. Extensions
2a. The list is empty.
Use case ends.
4a. Invalid student ID entered
4a1. AddressBook inform user that student does not exist
4a2. User enters new student ID and updated information Steps 4a1 - 4a2 are repeated till a valid student ID is given
Use case resumes at step 5.
4b. detect error in any updated information entered
4b1. inform user on the information that does not meet requirement
4c1. user enters new updated information (all information) Steps 4b1 - 4b2 are repated till the data entered are correct.
Use case resumes at step 5.
4c. updated information is the same as current information
4c1. No changes made to information
Use case ends.
MSS
User request to list students.
EduLink-NUS shows a list of all students.
User get to know the name, ID or index of a specific student.
User prompts to delete the specified student by its ID or index.
That student is successfully deleted.
Use case ends. Extensions
2a. The list is empty.
Use case ends.
4a. Can't find selected student.
4a1. EduLink-NUS inform user that student does not exist.
4a2. User enters new student ID Steps 4a1 - 4a2 are repeated till a valid student ID is given
Use case resumes at step 5.
4b. Detect error in delete command entered e.g. invalid ID, index or command
4b1. EduLink-NUS informs user about invalid format and reminds valid format.
4b2. User enters new updated command. Steps 4b1 - 4b2 are repated till the data entered are correct.
Use case resumes at step 5.
MSS
Use case ends.
Extensions
2a. No students match the filter criteria.
Use case ends.
3a. User decides not to delete any students.
Use case ends.
Use Case: Add Grade to a Student
MSS
Use case ends.
Extensions
2a. The list is empty.
Use case ends.
3a. User can't find the student he is looking for in the filtered list.
3a1. User requests to list students.
3a2. User filter students based on specific criteria.
3a3. EduLink-NUS shows a filterd list of students. Steps 3a1 - 3a3 are repeated till the student is found in the list shown.
Use case resumes at step 4.
4a. Can't find the selected student in the filtered list.
4a1. EduLink-NUS informs the user that the student does not exist.
4a2. User enters new student ID, together with the module code and score. Steps 4a1 - 4a2 are repeated till a valid student ID is given
Use case resumes at step 5.
4b. Detect error in grade command entered e.g. score out of range, invalid module code
4b1. EduLink-NUS informs user about invalid format and reminds valid format.
4b2. User enters new updated command. Steps 4b1 - 4b2 are repated till the data entered are correct.
Use case resumes at step 5.
4c. Duplicate module code to be graded found.
4c1. The grade for the specified module code is successfully edited with the new given score in the selected student's record.
Use case ends.
MSS
Use case ends.
Extensions
2a. The list is empty.
Use case ends.
3a. User can't find the student he is looking for in the filtered list.
3a1. User requests to list students.
3a2. User filter students based on specific criteria.
3a3. EduLink-NUS shows a filterd list of students. Steps 3a1 - 3a3 are repeated till the student is found in the list shown.
Use case resumes at step 4.
4a. Can't find the student in the filtered list.
4a1. EduLink-NUS informs the user that the student does not exist.
4a2. User enters new student ID, together with the module code and score. Steps 4a1 - 4a2 are repeated till a valid student ID is given
Use case resumes at step 5.
4b. Detect error in grade command entered e.g. invalid module code
4b1. EduLink-NUS informs user about invalid format and reminds valid format.
4b2. User enters new updated command. Steps 4b1 - 4b2 are repated till the data entered are correct.
Use case resumes at step 5.
4c. The selected student does not have a grade recorded for the specified module code.
4c1. EduLink-NUS informd the user that there are no grades to delete for the specified module code in the selected student's record.
Use case ends.
11
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
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.
{ more test cases … }
Deleting a student while all students are being shown
Prerequisites: List all students using the list
command. Multiple students 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 student 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 … }