PROJECT: SuperTA


Overview

SuperTA is a class management tool created for School of Computing (SoC) Teaching Assistants (TA) and professors. It enables the TAs and professors to better manage their tutorial classes and streamline trivial process such as attendance marking and assignment marks management.

This project involves a team of Computer Science (CS) undergraduates to develop a software from an existing software product. The 10KoC codebase was originally adapted from Seedu’s AddressBook – Level 4 application. The user of interacts with SuperTA using a CLI, and it has a GUI created with JavaFX.

Summary of contributions

  • Major enhancement: enhancement made to find command (#64)

    • What it does: allows the user to find students in the software and list the students according to the searched keyword.

    • Justification: Previously, user can only search students using name. After the enhancements are made, user can now search students using other parameters such as phone number or student ID. This enhancement improves the product usability as users can now find their desired result more easily.

    • Highlights: Further improvements on the command will be needed in the future as more parameters are added into the software such as tutorial groups and assignment grades.

    • Credits: Most of the codes are adapted from Seedu’s Addressbook application, and further enhancements are made thereafter.

  • Minor enhancement: added UpdateAssignmentCommand which allow users to edit an existing assignment details (ie assignment title, maximum marks) from an existing tutorial group. (#152)

  • Code contributed: (https://nus-cs2103-ay1819s1.github.io/cs2103-dashboard/#=undefined&search=darieca)

  • Other contributions:

    • Documentation:

      • Include instructions for commands implemented in the User Guide and Developer Guide. (#107) (#159)

      • Create marketing pitch for product in AboutUs. (#21)

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.

Locating students by keywords: find

Finds and lists all students in the SuperTA client whose information matched with the entered keywords.
Format: find [n/NAME] [p/PHONE] [e/EMAIL] [id/STUDENT-ID]

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

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

  • Only full words or numbers will be matched e.g. Han will not match Hans, 9123 will not match 91234567

  • Students matching at least one keyword will be returned (i.e. OR search). e.g. find n/John p/91234567 will return John and anybody with phone number 91234567

  • If there are more than one exact same parameter in the command, only the latest parameter will be taken. E.g. find n/John n/Alice will only return search result of Alice, not John.

Examples:

  • find n/John
    Returns john and John Doe

  • find p/91234567
    Returns student with phone number 91234567

  • find e/Johndoe@hotmail.com
    Returns student with email Johndoe@hotmail.com

  • find n/John id/A0123456T
    Returns john and John Doe and student with student id A0123456T

  • find n/Alice n/Hans
    Returns Hans only

Update an Assignment: update-assignment

Updates an existing assignment’s details such as title and maximum marks.
Format: update-assignment tg/TUTORIAL-GROUP-ID as/OLD-ASSIGNMENT-TITLE [new_as/NEW-ASSIGNMENT-TITLE] [new_m/NEW-ASSIGNMENT-MAX-MARKS]

  • This command does not adjust the student grades in the assignment. Therefore, do note that it is possible for existing student grades to be higher than the updated maximum marks.

  • This command will not work if the updated assignment title has already existed in the assignment list.

Examples:

  • update-assignment tg/04a as/lab1 new_as/lab2
    Updates an assignment named lab1 to lab2 for the tutorial group with an ID of 04a.

  • update-assignment tg/04a as/lab1 new_m/50
    Updates lab1 assignment maximum marks from 40.0 to 50.0 marks for the tutorial group with an ID of 04a.

  • update-assignment tg/04a as/lab1 new_as/lab2 new_m/50
    Updates an assignment named lab1 and maximum marks of 40.0, to assignment named lab2 and maximum marks of 50.0 for the tutorial group with an ID of 04a.

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.

Find feature

Current Implementation

The find command is facilitated by the FindCommand class. It extends the abstract class Command, and it is triggered when the user enters find into SuperTaClient.

The sequence diagram below shows the overview when FindCommand is called:

SDFindCommand

The FindCommand is implemented as follows:

  1. LogicManager is called to execute the entered argument.

  2. LogicManager calls SuperTaClientParser, and parses the argument through the method parseCommand().

  3. SuperTaClientParser calls its respective command parsers of the argument using parse(). In this case, the FindCommandParser is called.

  4. FindCommandParser will now parse the arguments and turn into name, phone, email and studentID predicates. These predicates will be passed to FindCommand.

  5. When LogicManager invokes execute(), FindCommand will call updateFilteredStudentList() to the model component and update the student list to the latest results.

Design Considerations

Aspect: How FindCommandParser parse predicates
  • Alternative 1 (current choice): Each parameter field (ie name, phone) are parsed into its respective predicates (ie. namePredicate, phonePredicate).

    • Pros: Easy to implement. Predicates are grouped into how they are parsed.

    • Cons: Less user-friendly. Users are required to remember the prefixes for each field.

  • Alternative 2: Parse all arguments into a general string, then search all the fields and stored into a main predicate.

    • Pros: More versatile and user-friendly. The string is able to search all the fields.

    • Cons: Slightly more tedious as compared to alternative 1. The general string needs to parse into respective field objects and predicates for each available parameter.

Update Assignment feature

Current Implementation

The update-assignment command is facilitated by UpdateAssignmentCommand class. It extends the abstract class command, and it is triggered when the user enters update-assignment into SuperTaClient. Actual changes of this command are made through Model#updateAssignment().

The UpdateAssignmentCommand is implemented as follows:

UpdateAssignmentCommand only works when there is an existing assignment in an existing tutorial group, and the updated assignment name is not the same as other existing assignment title. In this implementation, it is assumed that there is a valid tutorial group and a valid existing assignment.
SDUpdateAssignmentCommandLogic
Figure 1. Logic component of the Sequence Diagram for update-assignment command
  1. LogicManager is called to execute the entered argument.

  2. LogicManager calls SuperTaClientParser, and parses the argument through the method parseCommand().

  3. SuperTaClientParser calls its respective command parsers of the argument using parse(). In this case, the UpdateAssignmentCommandParser() is called.

  4. UpdatAassignmentCommandParser will now parse the arguments.

  5. UpdateAssignmentCommandParser will create a new UpdateAssignmentDescriptor and set the updated assignment details, which later will be passed to UpdateAssignmentCommand.

  6. When LogicManager invokes execute(), UpdateAssignmentCommand will call updateAssignment() to the model component.

SDUpdateAssignmentCommandModel
Figure 2. Model component of the Sequence Diagram for update-assignment command
  1. When updateAssignment() is called in ModelManager, it will retrieve tutorialGroup and assignment information from SuperTaClient and TutorialGroup respectively.

  2. After locating the specific assignment to be changed, ModelManager now calls updateAssignment() to UiqueAssignmentList to replace the old assignment details.

  3. Updated information will be returned to the logic component (as ‘updated’) in the above diagram.

Design Considerations

Aspect: Implementation of UpdateAssignmentDescriptor in UpdateAssignmentCommand
  • Alternative 1 (current choice): Use of UpdateAssignmentDescriptor in UpdateAssignmentCommand to store the updated assignment details.

    • Pros: Strengthen Single Responsibility Principle (SRP), as the UpdateAssignmentCommand will not need to check for differences between the old and updated assignment details.

    • Cons: May increase coupling. If the additional assignment details are added in in the future such as section maximum marks, UpdateAssignmentDescriptor have to change accordingly as well.

  • Alternative 2: Remove UpdateAssignmentDescriptor and parse updated assignment details as a new assignment.

    • Pros: Decreases coupling.

    • Cons: Harder to implement if user only indicate to update one field. (eg: update assignmentTitle only, while maxMarks stay the same). In this case, UpdateAssignmentCommand need to factor in the differences changed after the updated assignment details.

Aspect: Data structure of update-assignment in ModelManager
  • Alternative 1: Locate assignment from assignmentList, then delete old assignment and add updated assignment.

    • Pros: Easier to implement as it made use of other existing assignment commands such as addAssignment() and deleteAssignment(). No additional methods are needed for updateAssignment().

    • Cons: As each assignment contains a GradeBook which stores all student grades, deleting the old assignment and add a new assignment may risk of losing the existing GradeBook records. In addition, assignment index list may be affected after deletion as well.

  • Alternative 2 (current choice): Locate assignment from assignmentList and replace the old assignment with updated assignment details.

    • Pros: No risk of losing GradeBook records as only the assignmentTitle and maxMarks are being edited.

    • Cons: An additional method, updateAssignment() will be implemented instead.

Finding a student

  1. Finding a student while all students are listed

    1. Test case: find n/john
      Expected: All students with name john will be on the list. Since it is case-insensitive, variations such as ‘John’ or ‘joHn’ will appear on the filtered list as well.

    2. Test case: find n/john mary
      Expected: All students with name john or ‘mary’ will be on the list. Similar to a, case-insensitive variations will appear on the filtered list.

    3. Test case: find p/91234567 id/A0123456T
      Expected: All students with phone number 91234567 or with student ID A0123456T will appear on the filtered list.

    4. Other than the indicated prefixes (n/, p/, ‘e/’, ‘id/’), any other prefixes (ie. tg/, ‘m/`) will show an invalid command format error message.

Updating an assignment detail

  1. Update an assignment detail

    1. Prerequisites: Have one tutorial group with an ID of 04a.
      View the tutorial group using the view-tutorial-group id/04a command.
      Have an assignment title named lab1 with a maximum mark of 40.0.
      Have an assignment title named lab3 with a maximum mark of 50.0.

    2. Test case: update-assignment tg/04a as/lab1 new_as/lab2
      Expected: Assignment lab1 name should now be changed to lab2 under the Assignments UI panel. Maximum marks should be maintained at 40.0 marks.

    3. Test case: update-assignment tg/04a as/lab2 new_m/50.0
      Expected: Assignment lab2 maximum marks should be changed from 40.0 marks to 50.0 marks under the Assignments UI panel.

    4. Test case: update-assignment tg/04a as/lab2 new_m/lab3
      Expected: An error message should be displayed, showing that assignment name already exists in the database.

    5. Test case: update-assignment tg/04a as/lab4 new_m/lab5
      Expected: An error message should be displayed, showing that assignment does not exist.