{ 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, 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 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, UserPrefsStorage, and TimeslotsStorage, which means it can be treated as either one (if only the functionality of only one is needed).JsonSerializableAddressBook / JsonAdaptedPerson for the address book and JsonSerializableTimeslots / JsonAdaptedTimeslot for timeslots.JsonAddressBookStorage, JsonUserPrefsStorage, and JsonTimeslotsStorage which read/write files on disk.The StorageManager class,
MainApp, Logic, and other components access persistence through a single entry pointThe timeslots file location is configurable via UserPrefs and the application will create or populate the file with sample timeslots when none is present.
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 undo mechanism is facilitated by ModelManager. It stores a single previous state of the address book and
timeslots, stored internally as previousAddressBookState and previousTimeslotsState. Additionally, it implements
the following operations:
Model#saveAddressBook() — Saves the current address book and timeslots state before modification.Model#undoAddressBook() — Restores the previous address book and timeslots state.Model#canUndoAddressBook() — Checks if there is a previous state available to undo to.These operations are exposed in the Model interface as Model#saveAddressBook(), Model#undoAddressBook() and
Model#canUndoAddressBook() respectively.
Given below is an example usage scenario and how the undo mechanism behaves at each step.
Step 1. The user launches the application for the first time. The ModelManager will be initialized with the
initial address book and timeslots state, with previousAddressBookState and previousTimeslotsState set to null
(no previous state to undo to).
Step 2. The user executes delete 5 command to delete the 5th person in the address book. The delete command
calls Model#saveAddressBook() before deleting, saving the current state. After the deletion, the current state is
modified but the previous state preserves the state before deletion.
Note: If a command fails its execution, it will not call Model#saveAddressBook(), so the previous state will
not be updated.
Step 3. The user executes add n/John Doe … to add a new student. The add command also calls
Model#saveAddressBook() before adding, which replaces the previous state with the current state (ab1),
then adds the new student.
Step 4. The user now decides that adding the student was a mistake, and decides to undo that action by
executing the undo command. The undo command will call Model#undoAddressBook(), which restores the address book
to the previous state (ab1) and sets both previousAddressBookState and previousTimeslotsState to null.
Note: If previousAddressBookState is null, then there is no previous state to restore. The undo command
uses Model#canUndoAddressBook() to check if this is the case. If so, it will return an error to the user rather than
attempting to perform the undo.
Important: This implementation only supports undoing one command at a time. After undoing once, you must execute another modifying command before you can undo again. There is no redo functionality.
The following sequence diagram shows how an undo operation goes through the Logic component:
Note: The lifeline for UndoCommand should end at the destroy marker (X) but due to a limitation of PlantUML,
the lifeline reaches the end of diagram.
Similarly, how an undo operation goes through the Model component is shown below:
Step 5. The user then decides to execute the command list. Commands that do not modify the address book,
such as list, find, or get-timeslots, will not call Model#saveAddressBook(). Thus, the previous state remains null.
Step 6. The user executes clear, which calls Model#saveAddressBook() before clearing. The current state (ab1)
is saved as the previous state, then all persons are deleted, creating a new current state.
The following activity diagram summarises what happens when a user executes a new command:
The following commands call Model#saveAddressBook() and thus support undo:
add - Adds a studentdelete - Deletes a studentedit - Edits a studentclear - Clears all studentsmarke - Marks an exercisemarka - Marks attendancegrade - Marks grade of an assessmentblock-timeslot - Adds a timeslotclear-timeslots - Clears all timeslotsThe following commands do NOT support undo (read-only commands):
list - Lists all studentsfind - Finds studentsfilter - Filters studentssort - Sorts students base on some criteriaget-timeslots - Displays timeslotshelp - Shows helpexit - Exits the applicationAspect: How undo executes:
Alternative 1 (current choice): Saves only one previous state (address book + timeslots).
Alternative 2: Save entire history in a list with pointer.
Alternative 3: Individual command knows how to undo itself (Command Pattern with undo).
Rationale for Alternative 1: For the scope of this project, a simple single-level undo is sufficient for most use cases. Users typically need to undo only their most recent action, and the simplicity of implementation outweighs the benefits of a full undo/redo stack. The minimal memory overhead and straightforward logic make this approach ideal for a student project with limited development time.
Multiple undo levels: Implement a full history stack (Alternative 2) to support undoing multiple commands in sequence. This would involve storing a list of states and maintaining a current state pointer.
Redo functionality: Allow users to redo commands that were undone. This would require preserving the "future" states after an undo operation until a new modifying command is executed.
Selective undo: Allow undoing specific commands in history rather than just the most recent one. This would require implementing Alternative 3 with command-specific undo logic.
Undo command confirmation: For destructive commands like clear, prompt the user to confirm before executing,
reducing the need for undo in the first place.
{Explain here how the data archiving feature will be implemented}
Target user profile:
Value proposition: manage students, submissions, attendance, and resources faster and more efficiently than traditional spreadsheets or GUI-based systems
Priorities: High (must have) - * * *, Medium (nice to have) - * *, Low (unlikely to have) - *
| Priority | As a … | I want to … | So that I can… |
|---|---|---|---|
* * * | CS2030S TA | add a GitHub username to the student | track their exercises easily (auto-link) |
* * * | Grader | mark student's exercise as graded after grading it | know which students' exercises are graded / not graded yet |
* * * | New user | receive help from the app | learn how to use it quickly |
* * * | TA | search for students based on their name | easily find the student im looking for |
* * * | TA | delete student's information | remove false information |
* * * | TA conducting labs | mark students attendance | know which students attended the lab and which students didnt |
* * * | TA with many students | add, update students data | have their accurate information in LambdaLabs |
* * | Grader | tag my student based on their exercise performance | know how much effort I would need to help each student |
* * | New user | input student data quickly | focus on teaching |
* * | New user | undo my mistakes | recover from them quickly |
* * | TA | review statistics regarding performance | see if the class has room for improvement |
* * | TA | search for students based on their student ID | easily find the student im looking for |
* * | TA | I can visualise the students' performance through charts and graph | see which part students are doing well/lacking at and put a sufficient amount of effort for that topic |
* * | TA | sort based on alphabetical order | easily look for a student and his/her data by his/her name |
* * | TA | I can sort based on students grades | see who is underperforming and needs help |
* * | TA | sort students based on assignment submitted/ graded/ not submitted | better visualise the class's progress on current assignment |
* * | TA | I can sort based on students attendance rate | see who is missing the most classes |
* * | TA | I can add a tag to signal I need to follow up with a student | ensure all students are well taught |
* * | TA | I can filter based on specific assignment submissions | check who did which assignment |
* * | TA accepting consultations | get my available time slots | schedule consultations easily by allowing students to choose from all my free time |
* * | TA accepting consultations | block out timeslots by inputting manually | use the scheduling feature |
* * | TA marking for attendance | filter students based on attendance | accurately grade my students' attendance |
* | Experienced user | quickly access my students data | save time |
* | Experienced user | add aliases to commonly used commands | easily call frequently used commands |
* | Grader | be notified if any new students have submitted the assignment since I last opened the app | grade their exercises promptly |
* | TA | receive notifications if I have class/consultations the next day | not miss any classes/consultations |
* | TA who is making my own slides | add my slides as a link or filepath | easily retrieve my slides |
* | TA accepting consultations | block out timeslots by importing the .ics file from NUSMods | use the scheduling feature wiithout much setup |
* | TA who is teaching for multiple semesters | archive my student data from previous semesters | focus on the current students |
* | TA who is teaching for multiple semesters | unarchive my past student data | find something that happened in previous semester if I need that |
* | TA who is teaching multiple semesters | I can archive my timetable data | schedule consultations based on current semester's timetable |
(For all use cases below, the System is the LambdaLab and the Actor is the user, unless specified otherwise)
Use case: Grade an exercise
Precondition: A student has submitted their programming exercise
MSS
Extensions
Use case: Mark student attendance
MSS
Extensions
Use case: Schedule a consultation
Precondition: User has uploaded his schedule
Actor:User
MSS
Extensions
{More to be added}
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
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 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 … }