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: Enabled support for Students

    • What it does: The user is able to add/edit/delete/list/clear/find all 'Students' in TAble. The user can also find 'Students' in TAble using their names or matric numbers as keywords. Stronger checks are implemented to ensure no duplicate entries for email addresses and matric numbers but allows for duplicate names to appear, which accurately simulates the real world where 2 students can have the same name but they will have different matric numbers and email addresses.

    • Justification: Teaching Assistants (TAs) have the main job role of teaching a group of students. Therefore it is important for TAs to have an accurate and updated list of students he can refer to across all his different tutorials so that he can account for every student. This helps consolidate important information about all the students, and allows him to find students, and make edits or delete them if required to maintain an accurate and updated list of students. It also allows efficient tracking of events as changes to the list of students will be accurately reflected in their corresponding tutorial/consults.

    • Highlights: A separate student panel which displays all of the user’s 'Students' exist for the user to easily keep track of all his students and quickly see information information regarding each student. Any edit or deletion of students will be reflected accordingly in the corresponding tutorial and/or consultation the student is involved. There are also labels which help TAs identify which module and tutorials the student is currently enrolled in.

  • Minor enhancements:

    • Added labels on the Graphical User Interface which allows the user to identify which module and tutorials each student is currently enrolled in

      • Eliminates the need for user to look through all tutorials to identify the tutorials each student is currently enrolled in, which is repetitive and can be inefficient especially when the number of tutorials in TAble increases significantly.

    • Implemented a sorting feature which allows the user to sort the students in TAble in alphabetical order. If there are students with the same full names, these students will be sorted using their matric number, the student with the smallest matric number will appear highest on the list.

  • All code contributed: [RepoSense - Code Report]

  • Other contributions:

    • Project management:

      • Raised issues that needed to be solved and provided some solutions to these problems. [Issues raised/discussed]

      • Managed Graphical User Interface for StudentListPanel of the application #201

    • Documentation:

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

      • Fix and Maintain Product Website #227

    • 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.

Students Feature (Written by Chiang Shun De)

Adding a student: addStudent

Adds a student to TAble
Format: addStudent name/NAME matric/MATRIC_NUMBER email/EMAIL [tag/TAG]…​

  • Students name have a maximum length of 70 characters as it is the standard length for database fields.

  • In TAble there can be duplicate names, but not duplicate emails and matric numbers as they are unique to each student.

  • Tags are sorted alphabetically for easier referencing.

A student can have any number of tags (including 0), but each tag is limited to a length of 40 characters.
  • The students name will be automatically formatted such that it follows a standard format of the first letter of each word being uppercase and the rest lowercase, and a maximum of one space between each word. This is done to follow proper naming convention, making it more presentable and readable, and remedies any errors which may have happened when extracting the list of student names. The removal of excess spaces is also done for tags.

    • For example: addStudent name/john doe matric/A0123456X email/johnd@example.com adds a student with the name "John Doe" into the list.

Examples:

  • addStudent name/John Tan matric/A0123456X email/johnt@example.com

Output:

New student added: John Tan Matric Number: A0123456X Email: johnt@example.com Tags:
  • addStudent name/Betsy Daphne Anne Lim matric/A1234567X tag/good student email/betsydaphneannelim@example.com tag/CS2103

Output:

New student added: Betsy Daphne Anne Lim Matric Number: A1234567X Email: betsydaphneannelim@example.com Tags: [CS2103][good student]

Listing all students : listStudent

Shows a list of all students in TAble.
Format: listStudent

Clears the list of students : clearStudent

Clears the list of all students in TAble.
Format: clearStudent

Editing a student : editStudent

Edits an existing student in TAble.
Format: editStudent INDEX [name/NAME] [matric/MATRIC_NUMBER] [email/EMAIL] [tag/TAG]…​

  • The edited student will be reflected on all consults with them or any tutorials they are enrolled in.

  • When editing students, do note that there can be duplicate names in TAble, but not duplicate emails and matric numbers as they are unique to each student.

  • Edits the student at the specified INDEX. The index refers to the index number shown in the displayed student list. The index must be a positive integer 1, 2, 3, …​

  • At least one of the optional fields must be provided.

  • Existing values will be updated to the input values.

  • When editing tags, the existing tags of the student will be removed i.e adding of tags is not cumulative.

  • You can remove all the student’s tags by typing tag/ without specifying any tags after it.

Examples:

  • editStudent 1 email/johntan@example.com
    Edits the email address of the 1st student to be johndoe@example.com.

  • editStudent 2 name/Betsy Lim tag/
    Edits the name of the 2nd student to be Betsy Lim and clears all existing tags associated with the 2nd student.

  • editStudent 3 matric/A0123456Z tag/good student
    Edits the matric number of the 3rd student to be A0123456Z and adds a 'good student' tag

Locating students by name: findStudent

Finds students whose names contain any of the given keywords.
Format: findStudent KEYWORD [MORE_KEYWORDS]

  • The search is case insensitive. e.g hans will match Hans

  • The order of the keywords does not matter. e.g. Hans Lim will match Lim Hans

  • Only the name is searched.

  • Only full words will be matched e.g. Han will not match Hans

  • Students matching at least one keyword will be returned (i.e. OR search). e.g. Hans Lim will return Hans Tan, Lim Yang

Examples:

  • findStudent John
    Returns students John Ang and John Tan Example output:

2 students listed!
  • findStudent Betsy Tim John
    Returns any student having names Betsy, Tim, or John

Locating students by matric number: findStudentMatricNumber

Finds students whose matric number matches the given matric number.
Format: findStudentMatricNumber matric/MATRIC_NUMBER

  • The search is case insensitive. e.g a0123456a will match A0123456A

  • Only the matric number is searched.

  • Only full matric number will be matched e.g. A01234 will not match A0123456A, conversely A0123456A will only return the student with matric number 'A0123456A'

  • The student with matric number matching the given matric number will be returned.

Examples:

  • findStudentMatricNumber matric/A0111111X
    Returns the student with matric number "A0111111X"

Deleting a student : deleteStudent

Deletes the specified student from TAble.
This removes the student from all enrolled tutorials as well.
Format: deleteStudent INDEX

Deleting a student using the deleteStudent command will remove any consultations associated with the deleted student and removes the student from any tutorials they were enrolled in.
  • Deletes the student at the specified INDEX.

  • The index refers to the index number shown in the displayed student list. By default the student list will be the list displayed by the listStudent command.

  • You can search for students using the findStudent or findStudentMatricNumber command and then using the deleteStudent command with the index based on the generated list by the findStudent or findStudentMatricNumber command.

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

Examples:

  • listStudent
    deleteStudent 2
    Deletes the 2nd student in TAble.

  • findStudent Betsy
    deleteStudent 1
    Deletes the 1st student in the list resulting from the findStudent command.

Sort students alphabetically by name: sortStudentName

Sorts the current list of students according to their name in alphabetical order. If there are two students with the same name they will be sorted by matric number, meaning the student with the lower matric number will be higher on the list. Format: sortStudentName

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.

Student feature (Written by Chiang Shun De)

Table allows NUS SoC teaching assistants to track and record all students that they will be teaching, and maintain accurate details of the students, such as their name, matriculation number (henceforth referred to as matric number), emails, and tags which serves as remarks. Changes to the student’s identity fields or deletion of student will also be reflected in the corresponding tutorial or consultation associated with the student.

Implementation

A Student class stores all relevant information of students. The main components are the students’ name, matric number, email address. Student can also store the user’s remarks about the student through the tag parameter, which will sort the tags, if there are more than 1 tag, in alphabetical order. The class diagram below shows how all the different components interact to allow the student feature to function.

StudentCommandClassDiagram
Figure 1. Class diagram of 'Student' feature, with only directly related classes displayed

Referencing the above class diagram, a Student contains 4 key attributes, the student’s name, matricNumber, email, and a set<Tag> of Tag, which could be empty. The unique identifier of each student is the matricNumber, i.e. no two students in TAble can have the same matric number.

The following sequence diagram illustrates the findStudentMatricNumber command, where a student which has the same matric number as the given matric number is found. The user must key in a correctly formatted matric number.

FindStudentMatricNumberSequenceDiagram
Figure 2. Sequence diagram of 'findStudentMatricNumber' command

Referencing the above sequence diagram, LogicManager executes the user’s input and calls parseCommand(input) of TAbleParser. TAbleParser then returns a new FindStudentMatricNumberCommandParser(). Via FindStudentMatricNumberCommandParser, the provided matric number is parsed into a MatricNumberContainsKeywordsPredicate predicate and a FindStudentMatricNumberCommand object with the MatricNumberContainsKeywordsPredicate predicate is created. Calling updateFilteredStudentList(predicate), the provided matric number is compared against the matric number of students currently in TAble and the student list is then updated with the list of students whose matric number matches the provided matric number. The command returns a formatted string which shows how many students match the given matric number, which indicate that the command is called successfully

The following activity diagram illustrates what happens when the addStudent command is called to add a student into TAble. There is a need to check that the given matric number and email address does not already exist in TAble

AddStudentActivityDiagram
Figure 3. Activity diagram for 'addStudent' command in the 'Student' feature

Referencing the above activity diagram, TAble will first check that all prefixes are present and formatted correctly, and that no multiple of the same prefix exists. It will then proceed to check if the name, matric number, email address, and tags (if any) are formatted correctly. It will then create a Student object using the provided name, matric number, email address, and tags (if any) and then check if there is a duplicate student inside TAble. If there are no duplicate student inside TAble, it will check across every student in TAble to see if the provided matric number or email address already exists inside TAble. If the provided matric number or email address does not belong to any student inside TAble already, the created student is then added into TAble and a message is returned indicating success. The new student will appear in the TAble.

Design Considerations

Sorting Students

Alternative 1 (Current Choice): Sort the list of students only when user enters a sort command

Alternative 2 : Automatically sort the list of students whenever a student is added/edited/deleted

Pros

User can decide how they want the list to be sorted (e.g. by alphabetical order).

It is intuitive for the students to be sorted in alphabetical order, allows for easier referencing.

Cons

User have to type the sort command each time a new student is added or an existing student is edited/deleted.

User are not able to sort the list of students according to their preferences. It is quite inefficient as the system would have to sort the list of students every a new student is added or an existing student is edited/deleted.

Reason for choosing Alternative 1: From a user design perspective, a teaching assistant would scroll through the current list of students to check if the student has been added , or to identify which tutorial and modules the student has been added in. When the list gets bigger, he would have to scroll further to search for the student he is looking for or to check if a particular student has been added. With both findStudent and findStudentMatricNumber commands present, it would be more efficient to find the student using either of 2 commands than scrolling through the list of students. This also aligns with the project constraints that typing is preferred over mouse use. The functionality of sorting the list of students alphabetically via a command was implemented to bring about a better user experience and a more presentable list of students. However the functionality of both findStudent and findStudentMatricNumber provides an efficient solution to identify students or check if they have been added, without the need to sort the list of students.

Use Cases

Use case: Add student (U02)

MSS

  1. User requests to add a student with name, matric number, email address and tag included

  2. System saves the new student into the database

    Use case ends.

Extensions

  • 1a. The name, matric number, or email address is not included.

    • 1a1. System shows an error message which indicates that an invalid format was given.

    • 1a2. User enters student with all required fields included.

      Use case resumes from step 2.

  • 1b. The user enters a matric number or email address which already exists in the database.

    • 1b1. System shows an error message that the given identity field already exists.

      Use case ends.

Use case: Edit student (U03)

MSS

  1. User requests to update either the name, matric number, email address, or tags of an existing student based on the student’s index.

  2. Systems updates the students according to the User’s request.

    Use case ends.

Extensions

  • 1a. The given index is invalid.

    • 1a1. System shows an error message which indicates that an invalid command was given.

      Use case ends.

  • 1b. The name, matric number, email address provided is in the invalid format.

    • 1b1. System shows an error message which indicates that the field to be edited must be provided in the correct format.

    • 1b2. User enters the required fields in the correct format.

      Use case resumes from step 2.

  • 1c. The matric number or email address provided already exists in the database.

    • 1c1. System shows an error message which indicates that the matric number or email address to be changed to already exists in the database.

      Use case ends.

Use case: Find student by name (U04)

MSS

  1. User requests to find all students matching with some keywords.

  2. System returns a list with all matching students from the database.

    Use case ends.

Extensions

  • 1a. The keyword is not included.

    • 1a1. System shows an error message the an invalid command was provided.

    • 1a2. User reenters the command with the keyword included.

      Use case resumes from step 2.

  • 2a. The list is empty.

    Use case ends.

Use case: Find student by matric number (U05)

MSS

  1. User requests to find the student with the matching matric number.

  2. System returns a list with the matching student from the database.

    Use case ends.

Extensions

  • 1a. The matric number is not included.

    • 1a1. System shows an error message that indicates matric number to be searched cannot be empty.

    • 1a2. User reenters the command with the matric number included.

      Use case resumes from step 2.

  • 1b. User keys in more than one matric number.

    • 1b1. System shows an error message that indicates not to repeat prefixes.

    • 1b2. User reenters the command with only one matric number included.

      Use case resumes from step 2.

  • 2a. The list is empty.

    Use case ends.

Use case: List students (U06)

MSS

  1. User requests to list all existing students in the database

  2. System shows the list of existing students

    Use case ends.

Extensions

  • 2a. The list is empty.

    Use case ends.

Use case: Sort students (U07)

MSS

  1. User requests to sort all existing students in the database

  2. System shows the list of existing students sorted in alphabetical order

    Use case ends.

Extensions

  • 2a. The list is empty.

    Use case ends.