PROJECT: TutorPal


Overview

TutorPal is a desktop application used by private home tutors for managing student information. The useage is primarily through CLI. It is written in Java.

Summary of contributions

  • Code Contributed: RepoSense

  • Major enhancement: implemented the add and edit grades feature

    • What it does: Allows tutors to add one or more than one grade records for a student during using editing command or adding a student with the help of add command.

    • Justification: As an indicator of the quality of teaching,grades are a very important part of tutoring. If the exam results can be recorded, the tutor can more easily analyze the student’s learning status and reflect his or her own teaching ability as well.

  • Minor enhancement: implemented the delete grades feature

    • What is does: Allow tutors to delete a grade record of a students stored in TutorPal.

    • Justification: Tutor can also use the undo command to delete the wrong records inputted. And this way is more efficient way if the tutor is good at typing. But if the tutor inputs a wrong name of the exam and then closes the TutorPal unfortunately, the undo command will out of action. So a deleteGrade command is added to fix this logic bug.

  • Other contributions:

    • Project management:

      • Configuring Travis, Coverage and auto-publishing of documentation.

      • Setting up and assigning of the issue tracker.

      • Editing project Milestone.

    • Enhancements to existing features:

      • Added test for grade part. (pull request: #183)

      • Fixed the bug when the project totally broke down.(pull request: #40, #61, #95)

      • Updated the GUI of "grades" to become more tidy. (pull request: #91)

      • Fixed the logic conflict caused by the education enum. (pull request: #55)

      • Guaranteed the grades feature working normally without affecting other function such as storage, undo and redo command. (pull request: #170)

    • Documentation:

      • Did cosmetic tweaks to existing contents of the AboutUs and README. (pull request: #5, #6, #26, #30, #32)

      • Removed some information about AB4 and updated relevant documents with TutorPal project. (pull request: #1, #2, #4)

    • Community:

      • PRs reviewed (pull request: #60, #62)

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.

Grades attribute

Grade attribute consists of two parts, exam name and exam score.

  • The name and grade should be separated by space.

  • Score should be between 0 and 100.

  • Considering the grades are just some records, the APP didn’t implement the delete function temporarily. If you input a wrong exam name, use undo to fix it.

Add grade:

You can add some grades record for a student, both using add command and edit command.

Example

add g/mid-test 100 [other part]

edit 1 g/mid-test 100

Edit grade will not delete the previous grades as tap attribute.

Change grade:

if you need to change the score of a exam, you can use edit as well.

Adding a person: add

Adds a person to the student list
Format: add n/NAME p/PHONE_NUMBER e/EMAIL a/ADDRESS el/EDUCATIONAL_LEVEL [g/GRADE]…​ [t/TAG]…​

  • If the student added has exactly the same name as an existing student in the student list, new student cannot be added.

  • EDUCATIONAL_LEVEL must be Primary, Secondary or JC.
    e.g. …​ el/Primary …​ is valid; however, …​ el/primary …​, …​ el/University …​ or other inputs like these are invalid

  • The format of GRADE is exam name + exam score.
    e.g. …​ g/mid-test 100 …​

  • A person can have any number of tags and grades (including 0).

  • Name of the exam should be different. Otherwise, they will be considered as the same one and the APP will store the score of the last one.

Examples:

  • add n/John Doe p/98765432 e/johnd@example.com a/311, Clementi Ave 2, #02-25 el/Primary 4
    Add a person without grade and tag.

  • add n/John Doe p/98765432 e/johnd@example.com a/311, Clementi Ave 2, #02-25 el/Primary 4 g/Y1819S1_Final 100 g/Y1819S1_Mid 89 t/friends t/owesMoney
    Add a person with one or more than one grades and tags.

Editing a person : edit

Edits an existing person in the student list.
Format: edit INDEX [n/NAME] [p/PHONE] [e/EMAIL] [a/ADDRESS] [el/EDUCATIONAL_LEVEL] [g/GRADE] [t/TAG]…​

  • Edits the person at the specified INDEX. The index refers to the index number shown in the displayed person 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 person will be removed.
    i.e adding of tags is not cumulative.

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

  • Edit grade will not delete the previous grades as the tap attribute. If the exam name exists already, it will cover the previous one and edit the score only.

Examples:

  • edit 1 p/91234567 e/alex@example.com
    Edits the phone number and email address of the 1st person to be 91234567 and alex@example.com respectively.

  • edit 2 n/Betsy Crower t/
    Edits the name of the 2nd person to be Betsy Crower and clears all existing tags.

  • edit 5 el/Secondary 1
    Edits the educational level of the 5th student to Secondary 1.

  • `edit 2 g/Y1819S1_Mid 100 `
    Change the score of an exam.

  • edit 1 g/test1 100 g/test2 99
    Add more new grade records for a student.

By editing the educational level of any student using this command will remove any "Graduated"
tag by default. To promote the educational grade of a student, please use the promote command.

Deleting grade of a student : deleteGrade

Deletes a grade record for a student in the address book. Format: deleteGrade INDEX NAME_OF_EXAM

  • NAME_OF_EXAM must already exist in the student’s grade records.

  • The student with the index INDEX will have the grade named NAME_OF_EXAM deleted.

Example:

  • deleteGrade 1 Y1819S1_Mid
    Deletes grade record named "Y1819S1_Mid" for the first person in the display panel.

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.

Use case: add grade records for the student when creating a new student

MSS

  1. User indicate the names of the exams and the scores when adding a student.

  2. System add the student with some grade records. Use case ends

Extensions

  • 1a. User inputs an invalid score.

    • 1a1. System displays an error message.

    • 1a2. System prompts user for a corrected input.

      Use case resumes from step 2.

Use case: add or edit grade record for a student using edit

MSS

  1. User indicate the index of the student and the grade record when editing a student.

  2. System edit the student with some grade records. Use case ends

Extensions

  • 1a. User inputs an invalid score.

    • 1a1. System displays an error message.

    • 1a2. System prompts user for a corrected input.

      Use case resumes from step 2.

  • 1b. User input a non-existing exam name.

    • 1b1. System add a new grade record for the student.

      Use case ends

Use case: delete a grade record

MSS

  1. User indicate the index of the student and the exam name.

  2. System delete the grade record from the student. Use case ends

Extensions

  • 1a. User inputs a non-existing exam name.

    • 1a1. System displays an error message.

    • 1a2. System prompts user for a corrected input.

      Use case resumes from step 2.

  • 1b. User input command in error format.

    • 1b1. System displays an error message.

    • 1b2. System prompts user for a corrected input.

      Use case resumes from step 2.

Grades Feature

Current Implementation

The grades feature has been implemented to store the grade records of the student. A Grades class has been created to record a score of a student. A HashMap<examName,Grades> has been added to the list of attributes of Person class.

Each student’s grade records are also displayed on the PersonCard GUI.

Add a new attribute into the person class, we have to change the structure of the model part as follow:

ModelForGrade

Because the adding of the grades attribute, the storage part have to add XmlAdaptedGrade to adapt grade attribute during the interaction with the storage.

The following UML diagram shows the new structure of the storage:

StorageForGrade
Add Grade Using Add Command
  • The add command now can add grade records, Using the format of "g/examName examScore". The exam name can be any string without space, and the exam score can be integer between 0 to 100 including 0 and 100.

The graph to illustrate the behavior of add grade attribute is quite similar to the edit attribute. So we do not overtalk about it here.

Add or Edit Grade Using Edit Command
  • The edit command now can edit or add grade records, Using the format of "g/examName examScore". The exam name can be any string without space, and the exam score can be integer between 0 to 100 including 0 and 100.

  • The grade attribute has a different behavior from tag attribute.
    When editing a tag, the previous tags will be discarded by the APP. But grades attribute is more like a recording function. So the previous grade records will not be deleted. If user edit a non-existing exam, the app will create a new record. If user edit a existing exam, the app will update the score of the grade record.

To Keep the undo and redo feature, edit will create a new person(not the copy of the reference) and then edit it.

The following sequence diagram shows how the edit function works with the grades attribute:

EditDiagram
Delete Grade Using deleteGrade Command
  • The deleteGrade command accepts an INDEX of the student and one exam name to delete.

To Keep the undo and redo feature, deleteGrade will create a new person(not the copy of the reference) as well and then edit it.

The following sequence diagram shows how the deleteGrade function works:

DeleteGradeDiagram

Future Implementation

  • Add more action for grade record such as sorting students by grades, analysing the grades fluctuation of a students.

  • Use Gui feature to layout the grades, so that the analysing the grades of a student will be more straightforward and easier.

  • Add more Convenient way to add grades, such as add grades for a exam to every student at once and so on.

Design considerations

Aspect: Command for adding and editing grades attribute
  • Alternative 1 (current choice): enhance the add Command and edit Command.

    • Pros:

      1. Follow the tradition of the command.

      2. Use the origin code fully.

    • Cons:

      1. Break the test existing a lot.

  • Alternative 2: add now command for adding and editing grade.

    • Pros:

      1. Easier to implement.

      2. Will not change or break the previous code structure.

    • Cons:

      1. Too many commands for user to remember.

Aspect: Delete of a grade record
  • Alternative 1 (current choice): Add a new command to delete the grade command.

    • Pros:

      1. Easy to understand and use the function.

    • Cons:

      1. Too many commands for user to remember.

  • Alternative 2: Use the undo feature to delete.

    • Pros:

      1. Existing feature already.

    • Cons:

      1. To complicated for user to use this feature.