Project: ConTAct


Overview

ConTAct is a desktop application that is aimed at making a teaching assistant’s (TA) job easier. The application provides a variety of features to help the TA with managing students and student contacts.

The application is written is Java, with the Graphical User Interface (GUI) implemented using JavaFX. The user interacts with the application through Command-Line Interface (CLI).

Summary of Contributions

  • Code Contributed: RepoSense Report for Contribution

  • Main Feature Implemented: Added Attendance feature to ConTAct

    • What it does: The attendance feature allows the user to update the attendance of students in their class.

    • Justification: This feature is important and useful to the user i.e the TA as it is necessary for a TA to keep track of the attendance of their students and this feature, integrated with the various other features in the application, allows an easy way to do so.

    • Highlights: This feature is implemented using the attendance command. It allows attendance to be updated in two types of ways. The user can either individually update the attendance of each student in their class or can collectively update the attendance of a whole class and then individually update the students' attendance that does not follow the majority.

    • Credits: The initial addressbook-level4 provided a good basis for the implementation of this feature.

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

Marking attendance: attendance

Allows the user to mark the attendance of students using the index number as well as group name.
Format: attendance INDEX at/ATTENDANCE or attendance g/GROUP_NAME at/ATTENDANCE

  • The attendance marking can be done individually, by using the index number of the student.

  • The user can also collectively mark the attendance by specifying the group. Then, the user can update the attendance of the students who do not follow the majority specifically.

    • The group must exist for the user to update the attendance of the group. If the group does not exist, the user needs to create the required group first. See group feature on how to create a group of students.

  • The user can update the attendance of the student/students who are absent as 'absent' or '0' and who are present as 'present' or '1' (any other value updates the attendance to undefined).

  • The existing attendance of the student will be overwritten by the user input values.

Examples:

  • attendance 1 at/present
    Marks the attendance of the student with index number 1 as present.

  • attendance 3 at/0
    Marks the attendance of the student with index number 3 as absent.

  • attendance g/tutorial1 at/1
    Marks the attendance of all the students in group-tutorial1 as present.

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.

Attendance feature

Current Implementation

The attendance command is a completely new feature that allows the user to mark the attendance of students within ConTAct. It follows a similar command flow as that of the address book, and the command will uses the model and storage of the other commands.To facilitate this command, a new data type is introduced: the Attendance class. The Attendance class has it’s own unique fields that the user can specify to mark the attendance. The Attendance class uses another class called the AttendanceEnum class. This AttendanceEnum class is used to declare the Attendance Enums:PRESENT, ABSENT and UNDEFINED which are then used in the Attendance class.

  • The attendance class has an overloaded constructor which takes in different parameters.

Field of first constructor:

  • Attendance: takes in an AttendanceEnum, can be PRESENT, ABSENT or UNDEFINED

Field of second constructor:

  • Attendance: takes in a String attendance, where absent/0 is changed to ABSENT enum, present/1 to PRESENT enum and an empty string is changed to UNDEFINED enum

Currently, the main operation is the attendance command, and it is implemented as such:

  • attendance INDEX at/ATTENDANCE

The attendance command may also be used with the group command to update the attendance of multiple students at the same time. It is implemented as such:

  • attendance PREFIX_GROUP/groupName PREFIX_ATTENDANCE/attendance

Currently, this operation exists within the logic component of ConTAct.

Below is an example of how the attendance command behaves:

  • attendance 1 at/0

  • attendance g/tutorial1 at/1

This will simply specify the attendance field of the Student/Students with the specified attendance and store it similar to how the addressbook stores a student. Furthermore, the attendance command ensures that all the fields specified must be valid for it to be a success.

Sequence Diagrams

The sequence diagram below shows how the components interact for the scenario where the user issues the attendance command.

attendance diagram1
Figure 1. Component interactions for attendance command (part1)

The diagram below shows how the EventsCenter reacts to the AddressBookChangedEvent, which also results in updates to the storage and the UI.

attendance diagram2
Figure 2. Component interactions for attendance command (part2)

The diagram below shows how the attendance command is parsed in the Logic component.

attendance diagram logic
Figure 3. Logic Diagram for attendance command

Design Considerations

Aspect: Updating attendance of student
  • Alternative 1 (current choice): Update using index and mark

    • Pros: Allows flexibility for the user to either update attendance individually or collectively using mark.

    • Cons: Slightly problematic to implement parser for the same command with two differing formats.

  • Alternative 2: Update only using index/mark

    • Pros: Easier to implement.

    • Cons: If only implemented using index, user may face difficulty in updating attendance of a large number of students. If only mark is implemented, user can only update attendance of a mark and not of an individual student.

Proposed addition for v2.0

  • Store attendance of each student in an array according to weeks so that the user has a track of the attendance of each student for each of its classes according to week.

  • Proposed new command format: attendance INDEX|m/MARK_NAME w/WEEK_NUMBER at/ATTENDANCE

Use case: Mark attendance

MSS

  1. User requests to mark the attendance of a student

  2. The user inputs the attendance of the student

  3. ConTAct displays the resulting student with the updated attendance

    Use case ends.

Extensions

  • 1a. The formatting is invalid.

    • 1a1. ConTAct shows an error message.

      Use case ends.

  • 2a. The user types in an incorrect input.

    • 2a1. ConTAct shows an error message.

      Use case ends.

  • 3a. User wants to mark attendance of a group.

    • 3a1. User requests to mark the attendance of a specified group

    • 3a2. User creates a group for that

    • 3a3. The user inputs the attendance of the group

    • 3a4. ConTAct displays the resulting list with the updated attendance

      Use case ends.

    • Extensions

      • 1b. The group is invalid.

        • 1b1. ConTAct shows an error message.

          Use case ends.

      • 2b. The group is empty

        • 2b1. ConTAct shows an error message.

          Use case ends.

      • 3b. The user types in an incorrect input.

        • 3b1. ConTAct shows an error message.

          Use case ends.

Marking Attendance of a student(s)

  • Marking attendance

    1. Update the attendance of a student or a group of students

      1. Prerequisites: The student must exist on the conTAct list/the group of students must exist. If the student does not exist, add the student first. If the group does not exist, create a group of students with the existing required tag.

      2. Test case: attendance 1 at/1
        Expected: The attendance of the first student on the list is updated to PRESENT. Success message shown in the status bar.

      3. Test case: attendance 2 at/0
        Expected: The attendance of the second student on the list is updated to ABSENT. Success message shown in the status bar.

      4. Test case: attendance 3 at/123
        Expected: The attendance of the third student on the list is updated to UNDEFINED. Success message shown in the status bar.

      5. Test case: attendance 4 at/present
        Expected: The attendance of the fourth student on the list is updated to PRESENT. Success message shown in the status bar.

      6. Test case: attendance 5 at/absent
        Expected: The attendance of the fifth student on the list is updated to ABSENT. Success message shown in the status bar.

      7. Test case: attendance 6 at/not here
        Expected: The attendance of the sixth student on the list is updated to UNDEFINED. Success message shown in the status bar.

      8. Test case: attendance 0 at/1
        Expected: Invalid index. Error message is shown in the status bar.

      9. Test case: attendance 0 at/
        Expected: The attendance of the first student on the list is updated to UNDEFINED. Success message shown in the status bar.

      10. Test case: attendance g/tut2 at/1
        Expected: The attendance of all students in group tut2 is updated to PRESENT. Success message shown in the status bar.

      11. Test case: attendance g/tut1 at/0
        Expected: The attendance of all students in group tut1 is updated to ABSENT. Success message shown in the status bar.

      12. Test case: attendance g/tu1 at/0
        Expected: If group does not exist, attendance will not be updated. Error message shown in the status bar.

      13. Test case: attendance g/ at/1
        Expected: The group name should not be blank, attendance will not be updated. Error message shown in the status bar.

      14. Other incorrect commands to try: attendance, attendance a/tut2 b/1, attendance at/1, attendance x at/0 (where x is larger than the size of the list)
        Expected: Error message shown in status bar.