PROJECT: TutorPal


Overview

TutorPal is a desktop application used by mainly private home tutors to manage their students and schedules. The usage is primarily through CLI. It is written in Java.

Summary of contributions

  • Major enhancement: Added timing attribute for the Person class

    • What it does: It stores the tuition timings of a student in Tutor Pal.

    • Justification: In addition to having contact details of their students, allows users to keep track of their students' tuition timings increases our product’s relevance to our target users, making Tutor Pal more convenient for our target user.

  • Major enhancement: implemented addTime / deleteTime commands

    • What it does: It allows user to add or delete tuition timings of their students in Tutor Pal.

    • Justification: The commands enable users to easily manage the tuition timings of their students. If there is a need to change the tuition timings of a student, users do not have to recreate the student entirely in Tutor Pal. Tuition timings of students are one of the details that changes the most in Tutor Pal as the year progresses. This may be due to changes in the student’s timetable or additional school commitments. Hence, having addTime and deleteTime will make our product more convenient for our target users, private tutors, and increase our product’s relevance to them.

  • Code contributed: [Reposense]

  • Other contributions:

    • Project management:

      • Enabling our code to be reposense compatible.

    • Enhancements to existing features:

      • Updated the GUI to display tuition time slots of a student.

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.

Adding tuition time of a student : addTime

Adds a tuition timing for a student in Tutor Pal.

Format: addTime INDEX ts/TIME

  • Adds tuition timing TIME for a student 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, …​

  • TIME must not clash with any other tuition timings already in Tutor Pal.

Example:

  • addTime 1 ts/mon 1300 1500
    Adds the tuition timing that is on Monday which starts on 1300hour and ends on 1500hour for the 1st person shown in the displayed person list in Tutor Pal.

Deleting tuition time of a student : deleteTime

Deletes a tuition timing for a student in Tutor Pal. Format: deleteTime INDEX ts/TIME

  • Deletes tuition timing TIME for the student 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, …​

  • TIME must already exist for the student’s tuition timings in Tutor Pal.

Example:

  • deleteTime 1 ts/mon 1300 1500
    Deletes the tuition timing that is on Monday which starts on 1300hour and ends on 1500hour for the 1st person shown in the displayed person list in Tutor Pal.

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.

Time Feature

Current Implementation

A Time class has been created. It represents the tuition time of the student, consisting of the day, start and end time of the tuition.

  • When creating a new Time, input for day should only include the first 3 letters of the day, and it must be in small letters.

    • For example: mon, tue, wed, thu, fri, sat, sun.

  • The input for start and end time should be in 24hour format.

A timings attribute has been added into the list of attributes of Person class.

  • It is an array list of Time class, hence this allows user to add multiple tuition timings for a student.

  • Every time a new student is added into Tutor Pal, an empty Time array list will be created for the student.

Design Considerations

Aspect: Input for Time class
  • Alternative 1 (current choice): Standardise the inputs for Time class.

    • Pros:

      1. Easier to implement as we only need to account for one particular style of input.

      2. Furthermore, it also ensures consistency in Tutor Pal, which makes information more readily interpretable. Hence, even though users may not be used to the particular style of input, in the long run, it will be more convenient for users as there will not be any confusion in the information due to different styles of input.

    • Cons:

      1. It may take some time for new users to get used to the style of input.

  • Alternative 2: Allows other styles of inputs, for example a 12hour clock format instead of a 24hour clock format, for Time class.

    • Pros:

      1. Easier for new users to use.

    • Cons:

      1. If user did not fix to one style of inputs, there may be confusion of information due to conflicting input styles.

      2. Implementation will be much harder as we need to account for countless different situations to try to minimise or totally prevent such confusions.

Aspect: Data structure to support the timings attribute
  • Alternative 1 (current choice): Use an array list to store the tuition timings of a student.

    • Pros:

      1. Easy to implement and the API already have functions we can use to manage the array list.

    • Cons:

      1. The order of Time in the array list depends on the order it is added in, not the Time itself. However, it is preferable to display Time according to the order of the timings for better visual representation. Hence, sorting has to be done first.

  • Alternative 2: Use a priority queue to store the tuition timings of a student.

    • Pros:

      1. The priority queue API allows us to ensure that the Time are in a particular order, either descending or ascending, depending on how we implement it.

    • Cons:

      1. We can only fix it to one particular order. Hence, if we want to display the Time in another order, sorting still has to be done.

Addition of Tuition Time feature

Current Implementation

Since the timings attribute of a person is an array list, we created a new command to add Time for a student, called AddTimeCommand.

  • The add time command takes in 2 parameters, Index and the Time to be added.

  • Index refers to the index number shown in the displayed person list in Tutor Pal, while Time represents the tuition timing to be added for the student.

  • The start time of Time must be earlier than the end time of the tuition.

  • The Time to be added must not clash with any other timings already in Tutor Pal.

  • The added Time will be displayed on the PersonCard GUI.

  • After inputing the command, the inputs will be taken into AddressBookParser class and an AddTimeCommand object will be returned. The command will then be executed and Time will be added for the student at Index.

  • During the execution of the command, a Time object will be created. It will then search through Tutor Pal to see if the timings of student at Index contains the Time. If it does, it will then check if there are any clashes with the timings already in Tutor Pal. If there are no errors, Time will be added into his timings, otherwise, an error message, depending on the type of error, will be shown.

The following sequence diagram shows how the addTime operation works:

AddTimeSequenceDiagram

Future Implementation

  • Currently, if there are clashes in the timings, then Time will not be added. User will then have to search through Tutor Pal to check for available timings.

  • In the future, instead of just displaying the error messages, it will also display the available timings for that particular day, or trigger another command to display all the timings available.

  • Furthermore, there may be tutors who are teaching a group of students at once. Hence these students have the same addresses. In such cases, we should allow such students to have same tuition timings since it means both of them will be tutored at the same time.

Design Considerations

Aspect: Parameter used to find the student for the addition of Time.
  • Alternative 1 (current choice): Using index.

    • Pros:

      1. Since there may be students with the same name, using index will prevent such confusion and allow the command to function correctly.

    • Cons:

      1. If a user has a lot of students, he may need to search through the long displayed list to find the student’s index, causing some inconvenience to the user.

  • Alternative 2: Using Name.

    • Pros:

      1. It will be more convenient for user as user do not need to spend time searching for the index of the student.

    • Cons:

      1. If there are students with the same name, there may be situations where Time are not added to the correct student. Hence, in order to handle such situations, implementation will be much harder.

Deletion of Tuition Time feature

Current Implementation

Since timings is an array list, we created a new command to delete the Time of a student, called DeleteTimeCommand.

  • The add time command takes in 2 parameters, Index and the Time to be added.

  • Index refers to the index number shown in the displayed person list in Tutor Pal, while Time represents the tuition timing to be added for the student.

  • The deleted Time will be removed from the PersonCard GUI.

  • After inputing the command, the inputs will be taken into AddressBookParser class and an DeleteTimeCommand object will be returned. The command will then be executed and Time will be deleted for the student at Index.

  • During the execution of the command, a Time object will be created. It will then search through Tutor Pal to see if the timings of student at Index contains the Time to be deleted. If it does, Time will be deleted from his timings, otherwise, an error message, depending on the type of error, will be shown.

The following sequence diagram shows how the deleteTime operation works:

DeleteTimeSequenceDiagram

Design Considerations

Aspect: Lesser restrictions to the inputs of the command
  • There are lesser exceptions handled in deleteTime command compared to addTime command.

    • For example, in addTime it ensures that the start time of Time must be bigger than the end time of Time. However, in deleteTime it does not. The rationale is that there is no need for it since such timings will never exist in Tutor Pal, hence there will never be a situation where you need to delete it.