PROJECT: Easy Travel

Overview

The purpose of this portfolio is to document my contributions to my software engineering team project. In this project, my team of five Computer Science students was tasked to enhance a basic command-line interface application (AddressBook3). We chose to transform it into our application called E.T., which stands for Easy Travel. E.T. is an all-in-one travel planning application which helps travellers manage and plan for their overseas trips in various aspects.

This project portfolio will include a summary of my contributions followed by excerpts of the User Guide and Developer Guide that were written by me.

Summary of contributions

The following enhancements were contributed by me.

Major enhancement 1 - Transport Booking Management

I added the transport booking management feature.

What it does:
This feature provides basic functionalities for users to record and manage their transport bookings.

Justification:
This feature covers transport booking management, which is an important aspect of overseas trip planning.

Highlights:
This enhancement works well with the schedule feature (mentioned in Major enhancement 2 - Schedule) as it helps users keep track of the program of their trip. Careful considerations have to be made so that this feature can be expanded upon by future developers, including myself. The implementation of this feature was challenging because certain restrictions must be enforced to ensure that the users' plans are appropriate.

Major enhancement 2 - Schedule

I provided a scheduling feature that helps users manage their programs for his/her trip.

What it does:
This feature automatically adds transport bookings to the schedule. It also includes the schedule command which allows users to manually schedule activities at a particular time.

Justification:
This is a necessary feature for a travel planning application as it is used for planning the trip itinerary. It also serves as a calendar to help users visualise their planned programs.

Highlights:
This enhancement goes well with existing activity management features as well as transport booking management features (mentioned in Major enhancement 1 - Transport Booking Management). However, the implementation of this feature was challenging because it integrates different features (namely activity and transport bookings). Additionally, an in-depth analysis of design options was needed to ensure that the implementation does not have unnecessary dependencies and can be extended in the future.

Minor enhancement:

I designed some aspects of the UI such that the side tab bar (Pull Request #218) and the application colour scheme (Pull Request #225).

Other contributions

  • Project management:

    • Managed 4 major releases, from v1.1 to v1.4 on GitHub

  • Enhancements to existing features:

    • Involved in the morphing of the application from AddressBook3 to E.T. (Pull Request #124, #132)

    • Fixed bugs reported by test users of the application (Pull Request #344)

  • Documentation:

    • Helped fix formatting errors and documentation bugs for the User Guide (Pull Request #396) and Developer Guide (Pull Request #384)

  • Community:

    • Reviewed pull requests (with non-trivial comments)

    • Reported bugs for other teams

      • Examples: 1, 2, 3

    • Made documentation suggestions for other teams

      • Example: 1

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.

Activity Scheduling

(Contributed by Teng Le)

After brainstorming a bunch of activities to do, do you want to add them to your schedule? This feature will help you do that. In this feature, you can add and remove activities from your schedule. Just tell E.T. which activity to schedule at what time and it will be added to the Schedule Tab.

Activity Scheduling Command Parameters

Before you jump right into using this feature, you may want to learn about all the common command parameters used in this feature. The table below shows the list of common command parameters that will be used for this feature.

Parameter name Description

ACTIVITY_INDEX

The index number of the activity in the displayed list found in the Activities Tab. The first entry of the list has an index number of 1 and all the entries are listed in increasing index numbers.

It must be a valid index number.

DAY_INDEX

The index number of the day Schedule Tab. It represents the day number of your trip. The first day of your trip is index 1, the second day is index 2 and so on, until the last day.

It must be a valid index number.

TIME

The time to schedule the activity.

It must be in the format of HH:mm where HH:mm is the 24hr format time.

E.g. 13:00 This example means 1:00 PM

List all scheduled programs: listschedule

You can use this command to navigate to the Schedule Tab and display all your scheduled programs in E.T..

Format:

listschedule

Example:

If you are in another tab and wish to look at your schedule, you can follow these instructions.

Listing your scheduled programs:

  1. Type listschedule into the Command Box.

  2. Press Enter to execute.

Outcome:

  1. The Result Display will show a success message.

  2. E.T. will switch to the Schedule Tab.

  3. You can now see your schedule.

outcome listschedule
Figure 1. Outcome of the listschedule command

Add an existing activity to the schedule: schedule

You can use this command to add an activity to your schedule in E.T..

Format:

schedule ACTIVITY_INDEX day/DAY_INDEX time/TIME

Refer to Activity Scheduling Command Parameters for detail about each parameter.

Example:

Let’s say you want to add the first activity in the Activities Tab to the third day of your schedule at 10 AM. You can do the following.

Adding the activity to your schedule:

  1. Type schedule 1 day/3 time/10:00 into the Command Box.

  2. Press Enter to execute.

Outcome:

  • The Result Display will show a success message.

  • E.T. will switch to the Schedule Tab.

  • You can now see all your scheduled programs including the newly added activity.

outcome schedule
Figure 2. Outcome of a successful schedule command

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.

Schedule Feature

(Contributed by Teng Le)

E.T. allows the user to schedule an activity from the activity list to a specified time of a day. This is done using the schedule command which requires the user to specify the ACTIVITY_INDEX of an activity from the displayed activity list, the DAY_INDEX of the trip and the START_TIME of the activity to be scheduled.

Rationale

The schedule feature is an important feature that allows the users to manage and plan for their trip schedule or itinerary. This feature is added to E.T. to separate from the activity management feature from the schedule. This can increase the ease of planning because users can just focus on the time management aspect when scheduling proposed activities from the activity list. The schedule feature also automatically adds any transport bookings into the schedule.

Current Implementation

The schedule feature uses a separate system and structure as compared to the ListManagers. Instead, the schedule feature will be more closely related to the trip feature because it heavily relies on information about the Trip such as the startDate and endDate.

As such, the TripManager is in charge of managing the schedule. The TripManager, contains a list of DaySchedules which represents the schedule of a specific day of the Trip. Thus, the number of DaySchedules equals the number of days in the Trip. E.g. a trip of 2 days means that the TripManager contains 2 DaySchedule objects.

Within each DaySchedule object, there is a UniqueList of DayScheduleEntry. The DayScheduleEntry object represents an entry in the schedule. As an example, the following UML object diagram describes the relevant objects related to this feature when a Trip of 2 days is set.

ScheduleFeatureObjectDiagram
Figure 3. Example of associations between related objects of the schedule feature

When the user enters the schedule command to schedule an activity, the user input command undergoes the same command parsing as described in [Design-Logic] . A ScheduleCommand will then be created. The following steps describe the execution of the ScheduleCommand, assuming that no error is encountered.

  1. When execute() of the ScheduleCommand is called, the ModelManager retrieves the displayed list of activities shown to the user.

  2. Then, it retrieves the target Activity using the user-specified INDEX.

  3. The ModelManager’s scheduleActivity() method is called to schedule the target Activity.

  4. The ModelManager proceeds to call the scheduleActivity() method of the TripManager.

  5. The TripManager then uses the given activity to create a corresponding DayScheduleEntry object.

  6. The TripManager will calculate which day of the trip to schedule this activity and get the DaySchedule representing the schedule of the target day.

  7. The target activity is then scheduled on the target day through the addScheduleEntry() method of the target DaySchedule.

  8. If the above steps are all successful, the ScheduleCommand will then create a CommandResult object and return the result.

The Sequence Diagram below summarizes the execution of the ScheduleCommand.

Schedule Activity Command Execution
Figure 4. Execution of the ScheduleCommand

The lifeline for the ScheduleCommand should end at the destroy marker (X). However, due to a limitation of PlantUML, the lifeline reaches the end of the diagram.

This sequence diagram does not take into consideration the possible exceptions which might occur during the ScheduleCommand execution.

Design Consideration

Aspect: Separation between scheduling and activity management
Pros Cons

Option 1 (Current)
Scheduling is separated from activity management.

Better user experience.

Allows for extensions as other types of objects such as a TransportBooking could easily be converted into a DayScheduleEntry object and be added into the schedule. This is by the Open-Closed principle.

Complicated to implement and more likely to result in bugs if undesirable dependencies are introduced.

Option 2
An activity must be scheduled directly into a day as it is added. i.e. ActivityManager is in charge of scheduling.

Straightforward and simple to implement.

Other types of objects such as TransportBooking will not be able to be scheduled. This can result in poorer user experience when using E.T. as users may want to include transport bookings into their schedule.

Reasons for choosing option 1:

  • The schedule feature is a major feature because it is the main part of planning for a trip. Thus, we decided to opt for the option with better user experience.

  • The ability for other objects to be converted into a DayScheduleEntry object in option 1 is also beneficial for future versions of E.T. if we want to extend this feature to schedule other items such as accommodation bookings.

Transport Booking Manager

(Contributed by Teng Le)

E.T. allows the user to keep track of their transport bookings for his/her trip. The transport booking manager is one of the ListManagers (See [List-Manager]). On top of the basic operations provided by a ListManager, it also automatically adds all the transport bookings into the trip schedule.

Rationale

The transport booking manager is an important feature to have because any oversea trip will require some form of transportation to the destination and back. Thus, we decided to create a transport booking manager as one of the ListManagers.

Current Implementation

The transport bookings are managed by the TransportBookingManager class. In this section, we will describe how a transport booking is automatically added to the schedule when the user adds a transport booking.

The following Class Diagram describes the structure of the TransportBookingManager and how it is related to the TripManager which handles the scheduling of activities and transport bookings. Only relevant classes and methods are shown in the diagram.

TransportBookingFeatureClassDiagram
Figure 5. Structure of the TransportBookingManager

From the diagram, it is clear that the TransportBookingManager has no direct association with the TripManager. The following steps will outline how a transport booking is added to the schedule managed by the TripManager when the user tries to add a transport booking to the TransportBookingManager using the addtransport command.

  1. The user enters the addtransport command to add a transport booking.

  2. The command is parsed by the Logic component and an AddTransportBookingCommand is created. (See [Design-Logic])

  3. During the execution of the AddTransportBookingCommand, a DayScheduleEntry representing this transport booking is first created. (See [Schedule-Feature] for more information on the schedule feature)

  4. The day to schedule this transport booking is calculated.

  5. If the calculation returns an out-of-bound day of the current Trip, an error message will be shown to the user.

  6. Else, the AddTransportBookingCommand will add the DayScheduleEntry to the schedule through the ModelManager’s scheduleTransportBooking() method.

  7. Finally, AddTransportBookingCommand will then add the transport booking into the TransportBookingManager.

The following Activity Diagram summarizes the workflow mentioned above.

AddTransportBookingActivityDiagram
Figure 6. Workflow of how a transport booking is automatically scheduled

Design Consideration

The design consideration for this feature is similar to that of the Schedule feature. (See [Schedule-Design-Consideration]) This is because if we let the ActivityManager manage the schedule and activities, then the schedule can only contain activities. This means that transport bookings will become a basic ListManager (See [List-Manager]) with no special functionalities. Thus, we decided to adopt the current implementation for better user experience and potential future extensions.