PROJECT: Easy Travel

This portfolio aims to document the contributions that I have made to the E.T. project. The Github Link to E.T. can be found here : https://github.com/AY1920S2-CS2103T-W17-3/main

Overview

E.T. is a desktop travel planning application to provide a simple an easy way for users to prepare for their trip. The user interacts with it using a CLI, and it has a GUI created with JavaFX. It is written in Java, and has about 10 kLoC.

Summary of contributions

  • Major enhancement: Implemented Activity Tab along with its User Interface and commands (CRUD/Sort)

    • What it does: The activity manager feature allows the user to keep track of all the activities planned for their trip. It takes care of the title, duration and location of the activity. Users are also allowed to tag their activities with tags associated with them, such as expensive or sightseeing.

    • Justification: This feature is essential when planning for a trip, as it allows the user to remember all of the activities planned so far.

    • Highlights: The implementation too was challenging and time consuming as it required understanding existing commands within Address Book 3.

    • Credits: {Authors or Address Book 3 and Jeffry Lum for his guidance, time and support. }

  • Major enhancement: Implemented Trip commands (CRUD/Sort)

    • What it does: It allows the user to set a trip, edit a trip, as well as delete a trip.

    • Justification: The trip manager feature is the core feature of Easy Travel. Without a trip, all the other features in Easy Travel will not be able to function.

    • Highlights: The implementation was challenging and time consuming as features such as the Accommodation Bookings, the Schedule, the Transportation Bookings, and the Budget all depends on the Trip feature. Hence, I had to understand all the features to implement the Trip feature.

  • Minor enhancement: I did the base code for the progress check feature, so that my team members could work from there.

  • Minor enhancement: I implemented the dashboard UI for Easy Travel. It consists of the information of the trip set by the user, so that the user will have a visual of all the information of the trip at all times. The information consists of the trip’s title, the start and end date of the trip, the budget set for the trip, as well as the exchange rate of the trip.

  • Code contributed: [All commits] [RepoSense Dashboard]

  • Other contributions:

    • Project management:

      • There were a total of 4 releases, from version 1.1 to 1.4. I contributed to all the versions on GitHub.

    • Enhancements to existing features:

      • Wrote additional tests for existing features to increase coverage from 20% to 54% (Pull requests #356, #361, #379 #388)

    • Documentation:

      • Used more 'you' language in the UserGuide so that it will be more reader-friendly. In addition, I added in pictures so that the reader can have visual cues on how the output should look like for each command.

    • Team:

      • Bugs reported for E.T: #158, #335, #336,

      • Responsible for all non-official documentation such as weekly meeting minutes.

    • Community:

      • PRs reviewed (with non-trivial review comments): PRs

      • Reported bugs and suggestions for other teams in the class: Bugs for Cooking Papa

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 Management

(Contributed by Charlotte)

If you are planning what to do for your trip, you will find this feature useful. This feature allows you to manage your activities for the trip. You can record the following information about your activities:

  • Title

  • Location

  • Duration

Activity Management 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

TITLE

The title of the activity.

It must be alphanumeric words not more than 50 characters long.

E.g. Shopping

LOCATION

The location of the activity.

It must be alphanumeric words not more than 50 characters long.

E.g. Tokyo

DURATION

The duration of the activity in hours.

It must be an integer from 1 to 24 (both inclusive).

E.g. 3

TAG

The tag you want to attach to an activity.

It must be a single alphanumeric word not more than 30 characters long.

E.g. sports

INDEX

The index number of the activity in the displayed list. 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.

List all activities: listactivity

You can use this command to navigate to the Activities Tab and display all your activities in E.T..

Format:

listactivity

Example:

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

Listing all your activities:

  1. Type listactivity 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 Activities Tab.

  3. You can now see all your activities.

Add a new activity: addactivity

You can use this command to add a new activity to E.T..

Format:

addactivity title/TITLE duration/DURATION location/LOCATION [tag/TAG]…​

Refer to Activity Management Command Parameters for more detail about each parameter.

Example:

Let’s say you have an activity with the following information and wish to record it in E.T..

Activity

Title

plane

Location

Singapore

Duration

1

Tag

sea, outdoor

Adding the above activity:

  1. Type addactivity title/Going to the beach duration/4 location/Hakone tag/sea tag/outdoor 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 Activities Tab.

  3. You can now see all your activities including the newly added activity.

outcome addactivity
Figure 1. Outcome of a successful addactivity command

Edit an existing activity: editactivity

You can use this command to edit an existing activity in E.T..

Format:

editactivity INDEX [title/TITLE] [duration/DURATION] [location/LOCATION] [tag/TAG]…​

  • You must supply at least one optional parameter.

  • The existing values will be updated to the new values.

  • If tag/TAG is supplied, it will overwrite the existing tags. Hence, you can supply an empty tag to clear the existing tags.

  • Refer to Activity Management Command Parameters for more detail about each parameter.

Editing the activity:

Example:

Assume you have accidentally made a mistake in the spelling of the title of the second activity in the displayed list and wish to change it to “Skiing”. You do perform the following steps.

Editing the activity:

  1. Type editactivity 2 title/Skiing 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 Activities Tab.

  3. You can now see all your activities including the edited activity.

outcome editactivity
Figure 2. Outcome of a successful editactivity command

Delete an existing activity: deleteactivity

You can use this command to delete an existing activity in E.T..

Format:

deleteactivity INDEX

Example:

If you change your mind and decide to remove the first activity in the displayed list from your plan, you can perform the steps below.

Deleting the activity:

  1. Type deleteactivity 1 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 Activities Tab.

  3. You can now see that the deleted activity no longer exists.

Sort the activity list: sortactivity

Format:

sortactivity CRITERIA ORDER

  • CRITERIA refers to the criteria to sort the list of activities by. It can take the following values: title, location, duration.

  • ORDER refers to the order to sort the list of activities by. It can take the value of ascending or asc to sort in ascending order and descending or des to sort in descending order.

Example:

If you want to sort your list of activities in descending order of duration, to help you in your planning, you can do the following.

Sorting activities:

  1. Type sortactivity duration des 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 Activities Tab.

  3. You can see a list of sorted activities being displayed.

Find activities by name: findactivity

You can use this command to find activities by keywords. E.T. will help you search for your activities using the activity title, duration and location.

Format:

findactivity KEYWORD [MORE_KEYWORD]…​

  • The KEYWORD is case-insensitive

  • All the activities that contain at least one of the keywords will be shown.

Example:

Let say your list has a bunch of activities and you want to search for a specific one about shopping. You can do so as follows.

Finding activities:

  1. Type findactivity shopping 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 Activities Tab.

  3. You can see a list of activities with the keyword being displayed.

outcome findactivity
Figure 3. Outcome of a successful findactivity command

Find activities by tag: findactivitytag

You can use this command to find activities by tags.

Format:

findactivitytag TAG_NAME [MORE_TAG_NAMES]…​

  • The TAG_NAME is case-insensitive

  • All the activities that contain at least one of the tags will be shown.

  • This command is very similar to the findactivity command. You can refer to Activity Management Command Parameters for an example.

Clear all activities: clearactivity

You can use this command to clear and delete the whole list of activities in E.T..

Format:

clearactivity

Example:

In the case that you want to restart your activity planning from scratch, you can do the following.

Clearing the activity list:

  1. Type clearactivity 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 Activities Tab.

  3. You can see that the list is now empty.

Trip Management

(Contributed by Charlotte)

This feature allows you to manage your trip. You can record the following information about your trip: * Title * Budget * Exchange rate * Start date * End date

Trip Management 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

TITLE

The title of your trip.

It must be alphanumeric words not more than 50 characters long.

E.g. Graduation Trip

BUDGET

The budget of your trip.

It must be a whole number not more than 1 000 000 000.

E.g. 5000

EXCHANGE_RATE

The exchange rate for your country of visit.

It must be a number greater than 0 and not more than 100.

E.g. 76.3

START_DATE

The starting date of your trip.

It must be in the format of dd-MM-yyyy HH:mm.
It must not be later than the END_DATE.

E.g. 28-09-2020 This example means 28 September 2020.

END_DATE

The ending date of your trip.

It must be in the format of dd-MM-yyyy HH:mm.
It must not be earlier than the START_DATE.
It must not be more than 30 days apart from START_DATE.

E.g. 05-10-2020 This example means 05 October 2020.

Set a new trip: settrip

You can use this command to set a new trip that you want to plan for.

Format:

settrip title/TITLE budget/BUDGET exchangerate/EXCHANGE_RATE startdate/START_DATE enddate/END_DATE

Refer to Trip Management Command Parameters for more detail about each parameter.

Ensure that your date is correct as E.T. does not allow editing of dates once set.

Example:

If you are all ready to start planning for your trip and you want to set a trip to get started, follow these steps below. You will learn how to set a graduation trip that starts on 28 September 2020 and ends on 5 October 2020 with a budget of $5000 and an exchange rate of 76.6.

Setting a new trip:

  1. Type settrip title/Graduation Trip budget/5000 exchangerate/76.6 startdate/28-09-2020 enddate/05-10-2020 into the Command Box.

  2. Press Enter to execute.

Outcome:

  1. The Result Display will show a success message.

  2. You can now see your trip information on the Trip Information Panel.

outcome settrip
Figure 4. Outcome of a successful settrip command
Rename the trip: rename

You can use this command to change the title of the trip.

Format:

rename TITLE

Refer to Trip Management Command Parameters for more detail about each parameter.

Example:

Assume that you have accidentally titled the trip wrongly to Craduation Trip instead of Graduation Trip, you can do the following steps.

Renaming the trip:

  1. Type rename Graduation Trip into the Command Box.

  2. Press Enter to execute.

Outcome:

  1. The Result Display will show a success message.

  2. You can now see your updated trip title on the Trip Information Panel.

outcome rename
Figure 5. Outcome of a successful rename command
Edit the trip’s budget: editbudget

You can use this command to change the budget of the trip.

Format:

editbudget AMOUNT

Example:

Let’s say after planning your expenses, you realised that you would want to increase your budget to $6000. Follow the following steps to do that.

Editing the trip budget:

  1. Type editbudget 6000 into the Command Box.

  2. Press Enter to execute.

Outcome:

  1. The Result Display will show a success message.

  2. You can now see your updated trip budget on the Trip Information Panel.

outcome editbudget
Figure 6. Outcome of a successful editbudget command
Delete the current trip: deletetrip

You can use this command to delete the current trip.

Deleting the trip will clear all your data from the app! Think twice before you do so.

Format:

deletetrip

Example:

Assuming that you have finished planning for your trip and would like to start planning for a new one, follow these steps.

Deleting the current trip:

  1. Type deletetrip into the Command Box.

  2. Press Enter to execute.

Outcome:

  1. The Result Display will show a success message.

  2. You can now see that no trip is set on the Trip Information Panel.

outcome deletetrip
Figure 7. Outcome of a successful deletetrip command
Check your progress: status

You can use this command to check the progress of your planning. This command will open a window which shows you the following information:

  • Schedule - If there are any overlapping programs.

  • Packing list - Number of items packed and left to pack.

  • Expense - Remaining budget.

  • Accommodation - The nights without accommodation bookings. Format:

status

Example: If you are planning for your trip halfway and feel lost, you can check your progress using the following steps. It can remind you of what you have to do next.

Deleting the current trip:

  1. Type status into the Command Box.

  2. Press Enter to execute.

Outcome:

  1. The Result Display will show the message “Progress checker window is opened.”.

  2. You will now see the following window.

outcome status
Figure 8. Progress checker window

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.

Trip Manager

(Contributed by Charlotte)

E.T allows the user to plan for an overseas trip. E.T is implemented in a way that the user can only plan for one single trip at any time. i.e. Only a single trip’s data can be managed. In this Trip Manager feature, the user can set, edit and delete his/her trip details. The trip details includes:

  • title

  • budget

  • exchangeRate

  • startDate

  • endDate

Rationale

The Trip Manager feature is included in E.T. because it is the core feature of the application. If the user wants to plan for an overseas trip, he/she has to record details about the trip.

Current Implementation

The TripManager class in the Model component is responsible for all operations on the trip which is represented by the Trip class. The following Class Diagram describes the structure of the TripManager and its relevant classes.

TripClassDiagram
Figure 9. Structure of the TripManager and its relevant classes

As seen from the diagram, the TripManager can only manage one trip at any point in time. Next, the following table shows the commands related to managing the trip details.

Command Purpose

settrip

Adds a trip and sets the trip details.

rename

Edits the trip title.

editbudget

Edits the budget of the trip.

deletetrip

Deletes the trip and all the data in the App.

This ability to change the start and end dates and the exchange rate of the trip is not available.

Design Consideration

Aspect: Number of trips allowed to be managed
Pros Cons

Option 1 (Current)
Only one

Easy to implement. TripManager just needs to hold one Trip object.

Less flexibility for the user.

Option 2
More than one

More flexibility for the user.

More overhead, especially in terms of space.

Reasons for choosing the option 1:

  • A typical user would only plan one trip at a time. Thus, the overhead incurred by option 2 is not justified.

  • Limited time for implementing this feature. Thus, option 1 is more ideal.

Aspect: Ability to edit the details of the trip
Pros Cons

Option 1 (Current)
Can only edit the title and budget.

Easy to implement. Nothing depends on the trip title and budget.

Users who need to change the dates or exchange rate of the trip need to delete and then set the trip which is troublesome.

Option 2
Can edit every detail.

More flexibility and convenience for the user.

The schedule feature depends on the trip dates while the expense feature depends on the exchange rate. Thus, allowing these fields to be changed is very difficult to implement and likely to result in bugs.

Reasons for choosing option 1:

  • The exchange rate of a trip does not tend to fluctuate much, thus the cons of option 2 outweigh the pros for the exchange rate.

  • As for the trip dates, the schedule feature is a big feature of E.T. and it depends on the trip dates. Given the limited time for implementation, we decided to opt for a less bug-prone approach that can showcase E.T.’s feature.

Activity Manager

(Contributed by Charlotte)

E.T. allows the user to keep track of their activities for his/her trip. The activity manager is one of the ListManager s (See [List-Manager]). On top of the basic operations provided by a ListManager, it also allows the user to search for their activities using the findacitivty command. The parameters of the findactivity command are keywords in the activity entries that the user wants to search for. E.g. findactivity sightseeing carnival will search and list all activity entries with sightseeing or carnival in their detail. Another similar command, findactivitytag has the same functionality but only searches for the tags of activity entries.

Rationale

The activity manager is an important feature to have because any oversea trip will be packed with activities for the traveller. Thus, we decided to create an activity manager as one of the ListManagers.

Current Implementation

The current implementation of the activity manager only allows the user to keep track of a list of activities for their trip. It does not allow the user to indicate the start and end time of an activity. Instead, the ability to indicate a start time for an activity will be in another feature known as the Schedule Feature (See [Schedule-Feature]).

In this section, we will outline the findactivity command of the activity manager which is summarised by the Activity Diagram below.

FindActivityDiagram
Figure 10. Workflow of a findactivity command

When the user enters the findactivity command to search for activities, the user input command undergoes the same command parsing as described in [Design-Logic]. During the parsing, a predicate is created. This predicate checks if a given Activity contains the user input keywords. The FindActivityCommand will then receive this predicate when it is created.

The following steps will describe the execution of the FindActivityCommand in detail, assuming that no error is encountered.

  1. When the execute() method of the FindActivityCommand is called, the ModelManager’s updateFilteredActivityList() method is called.

  2. The ModelManager then proceeds to call the updateFilteredActivityList() method of the ActivityManager.

  3. The ActivityManager will then update its filtered list of `Activity`s to contain only `Activity`s that fulfil the given predicate.

  4. The Ui component will detect this change and update the GUI.

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

The Sequence Diagram below summarises the aforementioned steps.

FindActivitySequenceDiagram
Figure 11. Execution of the FindActivityCommand

The lifeline for the FindActivityCommand 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 FindActivityCommand execution.

Design Consideration

We do not have other implementation options for the FindActivityCommand as the current implementation is the only option that we came up with. This option is quite easy to understand and follows good coding principles.