PROJECT: TAble

Overview

TAble is your handy desktop app, optimized for TAs who prefer to work with a Command Line Interface (CLI) while still having the benefits of a Graphical User Interface (GUI)! Mark attendance, arrange consults, add module notes, and more with TAble! It has a GUI created with JavaFX and written in Java, and has about 20 kLoC.

Summary of contributions

  • Major enhancement: Implemented the feature to insert Tutorials, including students enrolled and their attendance. This included implementing the attendance panel in the GUI to display attendance of students in a tutorial.

    • What it does: Tutorial in TAble represents a tutorial that the user, a Teaching Assistant, is assigned to. With Tutorial features, he is able to manage the enrolled students in his tutorial, as well as keep track of their attendance for convenient reference. The Tutorial feature also includes a command to allow users to directly copy all emails of students in a tutorial to the user’s clipboard, useful in aiding teaching assistants when they have to mass email their tutorial group.

  • Code contributed: As seen on RepoSense

  • Other contributions:

    • Project Management

      • Contributed to creating relevant issues in team repo, to organise and keep track of our progress throughout the various milestones

    • Enhancements to existing features:

      • Tutorial is not simply a CRUD feature, but integrates other components in the project such as Student and attendance to increase functionality of the feature.

      • Viewing of attendance in the GUI is made more intuitive for the user by having different coloured backgrounds depending on whether a student in a given tutorial is present or not.

      • Copying of students' emails to user’s clipboard

      • Responsible for implementing error handling methods in the relevant command parsers for when multiple of the same prefix is included in an input command, which should not be allowed

    • Documentation:

      • Updated User Guide and Developer Guide for Tutorial features, including adding relevant PlantUML diagrams in the Developer Guide to enhance comprehensibility of the codebase and the structure of the feature.

    • Summary of contributions:

Contributions to the User Guide

Given below are sections I contributed to the User Guide. They showcase my ability to write documentation targeting end-users.

Tutorials Feature (Written by Sarah Lim)

Switch GUI Display to Tutorial List View: listTutorial

Focuses the display in the GUI to the Tutorials list view, without requiring the user to click on the tab. Format: listTutorial

Add a tutorial slot: addTutorial

Add a tutorial slot for a particular module at the given time, day and place.
Format: addTutorial modCode/MODULE_CODE tutorialName/TUTORIAL_NAME day/WEEKDAY_VALUE beginTime/START_TIME endTime/END_TIME place/PLACE

A tutorial is distinguished by its module and name. Only one session is allowed per tutorial. If you wish to have a tutorial with multiple slots per week, you may use unique tutorial names (eg. T02A and T02B).
The module for addTutorial MODULE_CODE should already exist in TAble before adding the desired Tutorial
  • The tutorial name provided is capped at 8 alphanumeric characters.

  • The time provided must be in HH:MM format, i.e: 24-hour format

  • The day provided is the value of the weekday (ie. MONDAY = 1, TUESDAY = 2, …​ SUNDAY = 7)

  • The module code provided is case insensitive, e.g. Cs2103 is equivalent to CS2103

  • The module with the referenced module code should already be present in TAble

  • The place provided can be any valid string

  • Note that you are not allowed to add tutorials with clashing times (ie. periods overlap)

Example:

  • addTutorial modCode/CS2103 tutorialName/T02 day/3 beginTime/12:00 endTime/13:00 place/SR3

  • addTutorial modCode/CS1101S tutorialName/T11 day/4 beginTime/12:00 endTime/13:00 place/SR3

addTutorial

Delete a tutorial slot: deleteTutorial

Delete a tutorial slot for a particular module.
Format: deleteTutorial INDEX

  • Deletes the tutorial at the specified INDEX.

  • The index refers to the index number shown in the displayed tutorial list.

  • The index must be a positive integer 1, 2, 3, …​

Example:

  • listTutorial
    deleteTutorial 2

deleteTutorial

Add student to tutorial: addTutorialStudent

Enroll an existing student to an existing tutorial. Format: addTutorialStudent tutorialIndex/INDEX student/STUDENT_INDEX

  • The index refers to the index number shown in the displayed tutorial list.

  • The index must be a positive integer 1, 2, 3, …​

  • The STUDENT_INDEX should be referred to by index as referred to in the student list.

  • The student should already exist in TAble.

  • The tutorial should already exist in TAble.

  • Note that listAttendance (see Section 3.4.9) has to be called after adding a student to view the updated list

Example:

  • addTutorialStudent tutorialIndex/3 student/12

Marks students as present: markPresent

Takes attendance of students in a tutorial class by marking them as present for a particular week. Present students will be marked by a green background in the respective attendance list.
Format: markPresent tutorialIndex/INDEX week/WEEK student/STUDENT_INDEX

  • Updates the tutorial at the specified INDEX.

  • The index refers to the index number shown in the displayed tutorial list.

  • The index must be a positive integer 1, 2, 3, …​

  • The STUDENT_INDEX may either be an integer index or all to select all students in the specified tutorial.

  • The STUDENT_INDEX, if an integer, should be referred to by the index as referred to in the student list relative to the specified tutorial.

  • The week should be in numerical format, and accepts only numbers in the range 1 to 13 (inclusive)

Example:

  • markPresent tutorialIndex/3 week/7 student/2
    Marks only student at index 2 (for tutorial at index 3) as present in week 7 for tutorial at index 3

  • markPresent tutorialIndex/2 week/7 student/all
    Marks all students as present in week 7 in tutorial at index 2

markPresent indiv
Figure 1. Only mark the student at index 2 of the tutorial as present
markPresent all
Figure 2. Mark all students present

Marks students as absent: markAbsent

Takes attendance of students in a tutorial class by marking them as absent for a particular week. Absent students will be marked by a red background in the respective attendance list.
Format: markPresent tutorialIndex/INDEX week/WEEK student/STUDENT_INDEX

  • Updates the tutorial at the specified INDEX.

  • The index refers to the index number shown in the displayed tutorial list.

  • The index must be a positive integer 1, 2, 3, …​

  • The STUDENT_INDEX may either be an integer index or all to select all students in the specified tutorial.

  • The STUDENT_INDEX, if an integer, should be referred to by the index as referred to in the student list relative to the specified tutorial.

  • The week should be in numerical format, and accepts only numbers in the range 1 to 13 (inclusive)

Example:

  • markAbsent tutorialIndex/3 week/7 student/2
    Marks only student at index 2 (for tutorial at index 3) as absent in week 7 for tutorial at index 3

  • markAbsent tutorialIndex/3 week/7 student/all
    Marks all students in week 7 as absent in tutorial at index 3 (oh no!)

markAbsent indiv
Figure 3. Only mark the student at index 3 of the tutorial as absent
markAbsent all
Figure 4. Mark all students absent

Remove student from tutorial: deleteTutorialStudent

Remove an existing student from an existing tutorial. Format: deleteTutorialStudent tutorialIndex/INDEX student/STUDENT_INDEX

  • The index refers to the index number shown in the displayed tutorial list.

  • The index must be a positive integer 1, 2, 3, …​

  • The STUDENT_INDEX should be referred to by the index as referred to in the student list relative to the specified tutorial.

  • The student should already exist in TAble and exist in the tutorial being deleted from.

  • The tutorial should already exist in TAble.

  • Note that deleting the student from the tutorial does not delete the student from the TAble database.

  • Note that listAttendance (see Section 3.4.9) has to be called after deleting a student to view the updated list

Example:

  • deleteTutorialStudent tutorialIndex/3 student/12

Copy tutorial students' emails to user clipboard: copyTutorialEmails

Copies all student emails in the given tutorial to the user clipboard, for easy mass-emailing purposes. Format: copyTutorialEmails tutorialIndex/INDEX

  • The index refers to the index number shown in the displayed tutorial list.

  • The index must be a positive integer 1, 2, 3, …​

  • The tutorial should already exist in TAble.

  • The emails will be delimited by a semicolon (eg. hello@email.com; bye@email.com)

Example:

  • copyTutorialEmails tutorialIndex/3

Display students and attendance of a tutorial: listAttendance

Displays the list of students in a tutorial and their corresponding attendance for a particular week in the GUI. Format: listAttendance tutorialIndex/INDEX week/INDEX

  • Shows the attendance for tutorial at the specified INDEX.

  • The index refers to the index number shown in the displayed tutorial list.

  • The index must be a positive integer 1, 2, 3, …​

  • The tutorial should already exist in TAble.

  • The week should be in numerical format, and accepts only numbers in the range 1 to 13 (inclusive)

Example:

  • listAttendance tutorialIndex/2 week/10

Contributions to the Developer Guide

Given below are sections I contributed to the Developer Guide. They showcase my ability to write technical documentation and the technical depth of my contributions to the project.

Tutorial feature (Written by Sarah Lim)

TAble allows NUS teaching assistants to track and record all the tutorials they are teaching, and maintain details of the tutorial, such as the module it is under, start and end time of the tutorial, and the location it is held. Tutorials in TAble also allow teaching assistants to enroll students in a tutorial and mark their attendance for every week of the semester, and allows for convenient referencing (particularly when there’s a pandemic and contact tracing is critical).

Implementation

Since a Tutorial in TAble has to manage many parameters and attributes, different components of TAble were distinctly separated in order to ensure maintainability and adhere to good coding practices. The following illustrates the sequence diagram for AddTutorialCommand, in which a tutorial is added to TAble.

TutorialCommandSequenceDiagram
Figure 5. Sequence diagram for the command to add a tutorial

The LogicManager is responsible for handling the execution of the user’s input command to add a tutorial, calling parseCommand(), which returns an AddTutorialCommand object and subsequently calls for the AddTutorialCommand object to perform execute(). This leads to the Model being updated accordingly, and feedback in the form of a formatted String is finally shown to the user after being returned from AddTutorialCommand.

As can be observed, each step of the process is clearly separated, with each component only responsible for single task (eg. parsing user input, executing the actual command etc.) This enables bugs to be easily caught, and for the process to be structured and comprehensible.

Design Considerations

As a Tutorial in TAble should be able to keep track of enrolled students and mark their attendance, the Tutorial object will have to contain a list of Student objects (ie. the enrolled students). However, a Student object, as we are implementing it, does not contain the attribute of whether they are present or not for a particular tutorial.

Alternative 1: Include an attendance attribute to each Student such that they keep track of their own attendance for every tutorial they are enrolled in.

Alternative 2 : (Current Choice) Each Tutorial contains an attendance sheet, comprised of a list of 11 nested lists of booleans. Each nested list represents each week of a typical NUS school semester, while the size in each of the nested lists corresponds to the number of enrolled students.

Pros

Efficient to mark the attendance of just a single student, and retrieve all attendance information of a particular Student.

Efficient to mark the attendance of all students in a given tutorial as the whole attendance sheet is stored in Tutorial.

Cons

Difficult to mark attendance of all students in a tutorial as the system will have to individually search and modify the correct boolean in each Student in the tutorial.

Difficult to mark attendance by student instead of tutorial, and inefficient in retrieving attendance information for a particular student as the system will have to iterate through every tutorial that the student is enrolled in.

Reason for choosing Alternative 2: From a user design perspective, it is more likely that a teaching assistant will want to mark his attendance by tutorial and week rather than by student, hence it is more practical and efficient to choose Alternative 2. From a software engineering perspective, it is the responsibility of the Tutorial to keep track of the attendance, not the Student 's. This allows attendance of a Student to be easily referenced and marked in a Tutorial without requiring the Student to be privy to that information, and allows for convenient retrieval of attendance by week or by student.

As such, the following activity diagram of the system illustrates what occurs when the user calls the markPresent command to mark a student in a tutorial as present, for a specified week in the school semester.

TutorialMarkPresentActivityDiagram
Figure 6. Activity diagram for the command markPresent in the tutorial feature

When executing the markPresent command, the system will first ensure that all prefixes are present and formatted correctly, before subsequently checking if the specified tutorial exists in the TAble database. If the tutorial does exist, then the system attempts to retrieve and update the attendance of the respective student in the tutorial. If the student does not exist, an error message is shown, informing the user. If successful, the updated information is then saved.