AttendanceWindow's logic to handle new and existing student listeners was assisted by ChatGPT, with minor tweaks and adjustments to fit the desired functionality.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 deletes n/John Doe.
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, StudentListPanel, 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.
AttendanceWindow and AttendanceRow are separate classes from the main UI, which are used to display the attendance of students in a class.
The UI component uses the JavaFx UI framework. The layout of these UI parts is 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 Student object residing in the Model.AttendanceWindow Class
The AttendanceWindow Class represents a window displaying the attendance records of students in a specific tutorial group. It,
Logic component, as they need to execute commands to update the attendance.Model component, as they need to access the Student objects to display the attendance.Model data so that the table view can be refreshed and updated with the modified data.AttendanceRow Class
The AttendanceRow class represents a single row in the attendance table, displaying a student's name and attendance status for each date. It,
Model component, as they need to access the Student objects to display the attendance.Model data so that the row can be refreshed and updated with the modified data.Each AttendanceRow is updated in real-time as the underlying attendance records are modified, allowing the UI to maintain up-to-date attendance statuses for each student.
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("view Diddy") API call as an example.
Note: The lifeline for ViewStudentCommandParser should end at the destroy marker (X,) but due to a limitation of PlantUML, the lifeline continues until the end of the 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 WXYZCommandParser (WXYZ 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 WXYZCommand object (e.g., AddCommand) which the AddressBookParser returns back as a Command object.WXYZCommandParser classes (e.g., AddCommandParser, DeleteCommandParser, ...) inherit from the Parser interface so that they can be treated similarly where possible, e.g during testing.
How the undo works:
LogicManger pushes the command onto the CommandStack.
undo command is called, the LogicManager pops the latest command.
API : Model.java
The Model component,
Student objects (which are contained in a UniqueStudentList object).Student objects (e.g., results of a search query) as a separate filtered list which is exposed to outsiders as an unmodifiable ObservableList<Student> 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 changes.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,
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.
Students by their associative tags (e.g Tutorial Group, Assignments)Assignment DetailsGrade details to be case-insensitiveView Command's parameters to be case-insensitivePhone numbers from being assigned to more than 1 Student.Names to include special charactersStudents who have yet to submit AssignmentsDeadline for AssignmentAssignmentTarget user profile: NUS SOC Teaching Assistants managing students
Value proposition:
Priorities: High (must have) - * * *, Medium (nice to have) - * *, Low (unlikely to have) - *
| Priority | As … | I want to … | So that … |
|---|---|---|---|
* * * | a tutor who gives homework | easily keep track of my students' assignments | I know whether they have submitted them or not, and whether I need to grade them or remind them to submit work |
* * * | a tutor who wants to keep his personal and work life separate | keep in contact with students and their parents without needing to give them my personal email or number | my privacy is kept intact and my personal information is not shared |
* * * | a tutor who cares about his students' progress | easily keep track of my students' performance in school as well as his participation and learning in tuition | I am better equipped to help my students do well |
* * * | a not so tech-savvy tutor | easily understand the applications' functions and uses, and how to navigate through the application smoothly | I would not have any issues using the app to better organise my tasks and schedule as a tutor |
* * * | a part-time tutor (student) with tight deadlines | take a glance through the app to see exactly what needs my attention | I can instantly filter out the important tasks that I need to do, like marking and preparing for tutorials, so I can shift my focus back to my other deadlines |
* * * | a tutor ready to start using the app | import the data of all my students | I can use the app instantly |
* * * | a first time user | get a list of commands that cover the main features of the app | I can explore and get a feel for the functionalities |
* * * | a tutor who prefers CLI to GUI | use the keyboard for all purposes in the app instead of needing to scroll and click using a mouse | I am comfortable and enjoy using the app |
* * * | a veteran tutor with a set of pre-existing students | synchronize list of contacts into the app | I do not need to manually enter each contact which is a hassle |
* | a tutor | have timely reminders for upcoming deadlines | I can make sure the students submit them on time |
* | a tutor who wants to keep tabs on a student's grades | track the scores of students across several assessments | I can determine which student requires more attention |
* | a full-time tutor | track the hours I've worked each week | I can ensure accurate payment |
* | a tutor who has different classes of students | sort my students by their class | I can find the appropriate information quickly |
* | a tutor | quickly search for tasks or appointments based on keywords | I can find specific tasks or sessions easily |
* | a tutor | set recurring tasks (like weekly lesson planning) | I don't have to manually input them every time |
* | a forgetful tutor | receive notifications when new sessions or tasks are coming up | the task of remembering these timings can be relegated to the app |
* | a 1-1 tutor | keep track of individual student progress and test scores | I can better tailor tuition efforts to improve outcomes |
* | an organised tutor | set task priorities (high, medium, low) | I can focus on the most important tasks first |
* | a tutor | update contact details | students information is up to date |
* * | a detailed tutor | add notes to contact details | I can track important information |
* * | a tutor of a class of students | mark the attendance of students of the class I am currently teaching | I can monitor which students did not attend the class for that week so that I can contact their parents |
* * * | a tutor | add new students manually | new students that join the class midway can be added |
* * | an organised tutor | color-code tasks and appointments based on their type (tutorials, marking, meetings) | I can visually differentiate between various commitments |
* * | a tutor | search students by certain attribute e.g., name | I can access all details about them |
* * * | a longtime tutor | clear the data of my ex students | I can keep my contacts organised |
* * | a tutor with a messy filing system for notes and other additional content | use the app to organise these contents based on the class | it will be more efficient for finding the notes required for that class |
* * | a tutor | be notified when an input task or session overlaps with another commitment | I can avoid scheduling conflicts |
* * | a paranoid tutor | backup my contacts to a local file | I do not accidentally lose all contacts |
* * | a tutor | extend or adjust deadlines if needed | I can manage unexpected delays without losing track |
* | a tutor who would like the option of switching between light and dark themes | switch between the modes in the application | I would get my preferred layout theme |
* * | a data-centric tutor | view a summary of all contacts | I can analyze key information about my students |
* * | a tutor who doesn't use a mouse | use the keyboard shortcuts provided by the application | I can utilize and learn the features efficiently |
* * | a tutor with a long history of students | archive certain contacts | I only keep track of currently active students |
* * | a careless tutor | undo latest command | I can easily update contacts |
* * | a tutor | receive alerts when upcoming tasks and lessons are nearing | I can better stay on schedule |
* | a tech savvy tutor | set up macros to quickly switch between commonly used features | I can customise the application to my preferences and master the features of the application |
(For all use cases below, the System is the TeleTutors App and the Actor is the tutor, unless specified otherwise)
Use case: Grading an assignment (for one student)
MSS
Tutor requests to add a new assignment for the specified student upon release of the assignment.
Teletutors App confirms the assignment has been successfully added and displays the newly added assignment.
Upon receiving the assignment, tutor requests to mark the assignment's submission status as submitted.
Teletutors App confirms the assignment has been successfully marked as submitted and displays the assignment as submitted.
Tutor requests to give the assignment a grade.
Teletutors App confirms the assignment has been successfully graded and displays the grade for the assignment.
Use case ends.
Extensions
1a. Specified student does not exist.
Use case resumes from step 2.
1b. There are multiple students specified by the same name.
Use case resumes from step 2.
1c. Tutor enters an invalid deadline for the assignment.
Use case resumes from step 2.
Use case: Mark attendance for a class that most students attended
MSS
Tutor requests to mark everyone as present for a selected tutorial session.
Teletutors App confirms everyone in that tutorial group has been marked present for that session.
Tutor requests to mark a specific student who did not attend the session as absent.
Teletutors App updates the attendance record and confirms the action. Step 3-4 is repeated for each student who did not show up until they have all been marked absent.
Use case ends.
Extensions
1a. Specified tutorial group does not exist.
Use case resumes from step 2.
3a. Specified student does not exist.
Use case resumes from step 4.
3b. There are multiple students specified by the same name.
Use case resumes from step 4.
Use case: Add student details
MSS
Tutor requests to add a new student.
Teletutors App prompts for the student's details.
Tutor provides the required student details.
Teletutors App confirms the student has been successfully added.
Use case ends.
Extensions
3a1. Teletutors App displays an error message.
3a2. Tutor re-enters the correct prefix argument.
Use case resumes from Step 4.
Use case: Delete student details
MSS
Tutor requests to delete a student's details.
Teletutors App prompts for the compulsory name field and, optionally, the student number.
Tutor provides the required student's details.
Teletutors App deletes the student and associated records.
Use case ends.
Extensions
3a. The student name does not exist in the system.
3a1. Teletutors App informs the tutor that the student cannot be found.
Use case resumes from Step 3.
3b. There are multiple students that share the same name in the system.
3b1. Teletutors App informs the tutor that there are multiple students with the same name.
Use case resumes from Step 3.
3c. The student number does not exist in the system.
3c1. Teletutors App informs the tutor that the student cannot be found.
Use case resumes from Step 3.
Use case: Add an assignment to a student
MSS
Tutor requests to add an assignment to a student
Teletutors App prompts for the assignment details
Tutor provides the required assignment details
Teletutors App confirms the assignment has been successfully added
Use case ends.
Extensions
3a. Tutor enters an invalid deadline for the assignment.
3b. Tutor enters an invalid grade for the assignment.
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
Launch the jar using the java -jar command.
Expected: Shows the GUI with no contacts currently. 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 using the java -jar command.
Expected: The most recent window size and location is retained.
Deleting a student while all students are being shown
Prerequisites: List all students using the list command. The student uniquely named John Doe is in the list, but not the student Jane.
Test case: deletes n/John Doe
Expected: John Doe is deleted from the list. The name and student number of the deleted contact are shown in the status message.
Test case: deletes n/Jane
Expected: No student is deleted. Error details shown in the status message. State of command box remains the same, i.e. the command that was typed in remains in the command box.
Other incorrect delete commands to try: deletes, deletes x/, ... (where x is any invalid prefix)
Expected: Similar to previous case.
Marking attendance for a mostly-present tutorial group (2 - 3 Students absent)
Prerequisites: The tutorial group T01 is added to a class worth of students. The students John Doe and Jane Doe are in the tutorial group.
Test case: markpresentall tg/T01 dt/2025-01-20 → markat n/John Doe dt/2025-01-20 pr/a → markat n/Jane Doe dt/2025-01-20 pr/a → getattg tg/T01
Expected: On the date column Jan 20 2025, all students in the tutorial group T01 are marked present, except for John Doe and Jane Doe who are marked absent. The status message shows the name of the last Tutorial Group's attendances that were shown.
Test Case: markpresentall tg/T11 dt/2025-01-20
Expected: The tutorial group T11 does not exist. Error message shown in the status message. State of command box remains the same, i.e. the command that was typed in remains in the command box.
Other incorrect mark commands to try: markpresentall, markpresentall x/ x/, markat, markat x/ x/ x/, ... (where x is any invalid prefix)
Expected: Similar to previous case.
Marking Attendance for a mostly-absent Tutorial Group (2 - 3 Students present).
Prerequisites: The Tutorial Group T02 is added to a class' worth of students. The Students John Doe and Jane Doe are in the tutorial group.
Test case: markabsentall tg/T02 dt/2025-01-20 → markat n/John Doe dt/2025-01-20 pr/p → markat n/Jane Doe dt/2025-01-20 pr/p → getattg tg/T02
Expected: On the date column Jan 20 2025, all students in the tutorial group T02 are marked absent, except for John Doe and Jane Doe who are marked present. The status message shows the name of the last Tutorial Group's attendances that were shown.
Test case: markabsentall tg/T11
Expected: The tutorial group T11 does not exist. Error message shown in the status message. State of command box remains the same, i.e. the command that was typed in remains in the command box.
Other incorrect mark commands to try: markabsentall, markabsentall x/ x/, markat, markat x/ x/ x/, ... (where x is any invalid prefix)
Expected: Similar to previous case
Currently, users may only list students by name. We plan to expand this to include other relevant fields such as tutorial group and assignments
Currently, users cannot view assignment deadlines. We plan to implement a feature which can allow users to view assignment details.
Currently, the input for grade is case-sensitive which may be inconvenient for the user. We plan to make the input for grade case-insensitive.
view is case-sensitiveCurrently, the input for name in view is case-sensitive which may be inconvenient for the user. We plan to make the input for name in view case-insensitive.
Currently, users can input duplicate phone numbers for different students. This is likely to be an error from the user and we plan to prompt the user about this error in the future.
Currently, names can only contain alphanumeric characters and characters like '/' are not allowed. We plan to allow characters like '/' to allow a wider range of names to be entered.
Currently, there is no way to sort the displayed list of students. We plan to add ways for the user to sort the displayed list of students (e.g. sorting by number of ungraded assignment)
Currently, entering extremely large inputs may cause the UI to truncate the display of these fields. Inputs beyond a reasonable length are likely an error. We plan to limit the length of input to prevent truncation errors.
Currently, deadlines do not have a timestamp. We plan to allow deadlines to include a timestamp.
Currently, assignment does not track its associated submission date. We plan to allow users to input a relevant submission date.