-
Notifications
You must be signed in to change notification settings - Fork 231
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[CS2113-T12-4] Omnitravel #36
base: master
Are you sure you want to change the base?
Changes from 250 commits
59523c6
0888f30
d013733
7287ea4
264d166
9e97d0e
c4ef836
6de20bd
1c117e6
a163433
3d46a95
97e873f
e72019c
5046e1a
7e8d9de
f62593a
d94bc34
672fce8
e852cb0
f9f62f5
0bf9ff1
cb17222
d16dc27
2773768
9865b47
f01b15c
c834996
20bfc8c
7381df2
67c407d
8b97fa2
a9824ae
125a4c7
fda1646
8339e0e
7ce04f8
adcb3ad
f391b2c
8634ab4
891f521
3fa653f
c9d7983
ffe1db2
9752e83
b30f4ec
61322b6
4739b2d
fdeb1ef
a70f890
c3e02d8
f774ac0
80a39a7
72aab9d
f6333ab
be60e42
00aee27
cfa7cb4
5213a22
0b2f8cb
b33ae42
7474b7b
57f25ec
137b914
b72f5c7
7d57396
404213c
37b69dc
b3fa1ca
7af7d40
75a98ae
67a2b96
4fc6850
396338b
d25ae04
657ecf1
162066f
451638c
31211b4
d23e6dd
00ad20c
d244686
a9c3d3c
c1b71d9
af42f4b
75b06b9
4ad8705
cd4071c
5f68f0b
0946029
289b16a
482d168
7b2a641
4bc2e5a
318cad0
d2de866
a5c75ec
03ebc12
2c67e13
d86ef9e
4a4c025
7e3736f
4d1ddde
9eb038c
cbbdbdc
4db31ef
66af77e
49223bc
f27556a
28014b7
d77928a
89ebba8
0ea8c89
314b1d4
5cfac12
4e14c8d
de29041
8fb864d
2b3d8e8
7900ac4
12e9154
8e1c4a2
f21e0c3
04a882d
0c916e6
b6918cb
0590f1b
fe640b3
338ca75
8b6b2c1
398f682
fc60e2c
8ed4232
87aefa9
5b6bd74
50c149c
f5df6bb
27d872d
12cba98
6ac7a69
584a8b4
2228fad
9c977c5
a7c8fcd
bb0515c
3dc286e
be80b9a
d765a97
effafc3
859d4cb
20fc87e
8081f1a
8035987
9263ecd
2babfeb
bd5bfe6
1bd0866
fc32865
81de061
32e096a
326bc6e
ad66e9e
254f0b2
e8fe319
6f8bdf7
b7776f7
8232670
3c6efff
152cedd
1aacdb6
db0314e
a831c1b
9155347
6154d6e
5d538c7
96ad643
f10b00c
e1fff42
32ae783
2e32714
9ca74e9
48c9b7c
92556fc
6c6c20b
2736530
da07f1e
538e94a
d6dfa93
3eb74f3
5773b2b
2a04ae1
0c649c7
afaac8a
19fa341
477e472
4ddbac3
4c8b21a
5c3e699
acd67b1
0c4d1db
177791c
8f32fd1
641cb7f
40c4d77
f188890
fe4b21c
13fe4c3
9cd8379
6c80ab5
83dd6ff
686eec4
2a00711
4bfa388
02c8480
b20066d
35d943f
ef6651c
fb04fa8
498d3b6
b10bc73
8bc1f41
34e4f54
a63881f
b6e2615
771ed2a
17a8aed
f86bd6d
f697891
4788b25
cd09c70
3ce1ead
683bb3c
bcd1ff7
fafc681
d7489c5
6470f7b
5c924d3
5536ba8
31bc348
5795206
ccf62ac
f1796d3
6d1f6a0
e5c8e80
32d14b2
844a6ea
a1e5e4f
db7febb
7a45d8b
a702047
d0161ec
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,3 +15,4 @@ bin/ | |
|
||
/text-ui-test/ACTUAL.TXT | ||
text-ui-test/EXPECTED-UNIX.TXT | ||
text-ui-test/ACTUAL-UNIX.TXT |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Manifest-Version: 1.0 | ||
Main-Class: seedu.duke.Duke | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
# About us | ||
Display | Name | Github Profile | Portfolio | ||
--------|:-------------------:|:---------------------------------------------:|:---------: | ||
![](https://via.placeholder.com/100.png?text=Photo) | Eugene Chan Jiajun | [Github](https://github.com/EugeneChanJiajun) | [Portfolio](docs/team/eugenechanjiajun.md) | ||
![](https://via.placeholder.com/100.png?text=Photo) | Daryl Tay | [Github](https://github.com/daryltay415) | [Portfolio](docs/team/daryltay415.md) | ||
![](https://via.placeholder.com/100.png?text=Photo) | Annie Xu | [Github](https://github.com/annnniexu) | [Portfolio](docs/team/annnniexu.md) | ||
![](https://via.placeholder.com/100.png?text=Photo) | Chin Yan Xu | [Github](https://github.com/ChinYanXu) | [Portfolio](docs/team/ChinYanXu.md) | ||
![](https://via.placeholder.com/100.png?text=Photo) | Chen Kang | [Github](https://github.com/ChenKangg) | [Portfolio](docs/team/ChenKangg.md) | ||
|
||
Display | Name | Github Profile | Portfolio | ||
--------|:----:|:--------------:|:---------: | ||
![](https://via.placeholder.com/100.png?text=Photo) | John Doe | [Github](https://github.com/) | [Portfolio](docs/team/johndoe.md) | ||
![](https://via.placeholder.com/100.png?text=Photo) | Don Joe | [Github](https://github.com/) | [Portfolio](docs/team/johndoe.md) | ||
![](https://via.placeholder.com/100.png?text=Photo) | Ron John | [Github](https://github.com/) | [Portfolio](docs/team/johndoe.md) | ||
![](https://via.placeholder.com/100.png?text=Photo) | John Roe | [Github](https://github.com/) | [Portfolio](docs/team/johndoe.md) | ||
![](https://via.placeholder.com/100.png?text=Photo) | Don Roe | [Github](https://github.com/) | [Portfolio](docs/team/johndoe.md) |
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. very nice diagrams, but the contents of the diagram within the alt box is quite repetitive. However it is still very clear what is happening which is more important. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For the parser diagram, maybe you could split the line updateTravelActivity(travelActivityNumber, date, duration) into two lines so that the gray parts of the diagram to the right aren't so far away. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. good usage of code and markdown to illustrate what is happening. Overall quite a clear DG, but maybe more examples of how to use each feature and expected output would be helpful. |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,25 +5,115 @@ | |
{list here sources of all reused/adapted ideas, code, documentation, and third-party libraries -- include links to the original source as well} | ||
|
||
## Design & implementation | ||
|
||
{Describe the design and implementation of the product. Use UML diagrams and short code snippets where applicable.} | ||
|
||
### Overview | ||
![Overview.png](Overview.png) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Try to avoid the clinging dash-line arrows There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As per the AB3 DG, perhaps you could consider representing your overall architecture using components instead of individual classes. It might help your diagram look a little neater. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Have you considered the possibility of an incorrect representation of classes and methods in the sequence diagrams? |
||
Given above is a overview of how each classes interact with one another in our software. | ||
|
||
#[Proposed] Save feature | ||
|
||
The save feature is facilitated by `FileSave`. It makes calls to the subclasses `Accommodation`, `Food` and `Landmark` | ||
which are subclasses of the `TravelActivity` class to add each activity saved in the text file. | ||
|
||
`addTravelActivity` is called everytime there is a valid-stored data in the text file that is read to upload the | ||
activity back into the array list. | ||
|
||
Step 1. When the user launches the app for the first time, it will check if the text file `omni.txt` exist. | ||
|
||
Step 2. Once it is found that the text file exists, the `readFile()` method will call `loadFileContents(list)`. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
||
Step 3. In the `loadFileContents(list)`, `Scanner(f)` would read the text file line by line and insert each line into | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do you want to consider documenting the overall flow and how classes interact with each other instead of going into how methods are implemented? |
||
the respective activity types and its contents with `/` as the delimiter. | ||
|
||
The Sequence Diagram below shows how the save file feature is being implemented when the user re-enters the chatbot | ||
after using the bye command. | ||
|
||
![img.png](img.png) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. According to the module website, class names should be on the top of the diagram, not on the bottom There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Missing return arrows There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The top boxes should only contain classes rather than methods represented as instances, remember to add the ":" in front of the classes also (eg :Food) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also do leave the bottom row empty (boxes should not exist on the bottom row), also do remember to put a "X" at the bottom of the line if the object is destroyed |
||
|
||
The above sequence diagram shows how existing save text files will be reloaded back into Omnibots array list to act as | ||
a form of save feature when the user exits the bot. | ||
|
||
|
||
#[Proposed] Update feature | ||
|
||
Proposed Implementation | ||
|
||
The proposed update feature is mainly carried out by `TravelActivityList`. It stores objects with class `TravelActivity`in an array called `travelActivities` | ||
and each `TravelActivity` class object contains a date and duration. The `TravelAcivityList` also contains the following method: | ||
* `TravelActivityList#updateTravelActivity(travelActivityNumber, date, duration)`-- Updates the date and duration of the specified object of `TravelActivity` class type. | ||
|
||
Step 1. When the user launches the app for the first time, there will be no objects of type `TravelActivity` in `travelActivities`. | ||
Thus any attempts to call the command `update INDEX` | ||
will result in an output telling the user that no travel activity can be found. | ||
|
||
Step 2. After the user has added new travel activities into the `travelActivityList`, the user can execute | ||
`update 1 /date 2020-12-20 /duration 2hours` command to update the date and duration of the first travel activity | ||
in the travel activity list. The `update` command calls the `Parser#updateCommand(line, list)` which then calls the `TravelActivityList#updateTravelActivity(travelActivityNumber, date, duration)` | ||
. | ||
|
||
Step 3. The method will then find the travel activity with the corresponding travel activity number in the `travelActivities` and then set the new date and duration | ||
of that travel activity. | ||
|
||
The sequence diagram below shows how an update operation goes through the parser component: | ||
![img_1.png](img_1.png) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For the first function There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The colors are a little too dark, which makes it slightly unreadable. Consider making the colors lighter. |
||
|
||
#[Proposed] Total Expense feature | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In the DG, this format is not correct. Make sure to edit it before the final DG is due! |
||
|
||
Proposed Implementation | ||
|
||
The proposed total expense feature is mainly carried out by `TravelActivityList`. It stores objects with class `TravelActivity`in an array called `travelActivities` | ||
and each `TravelActivity` class object contains an expense associated with it. The `TravelAcivityList` also contains the following method: | ||
* `TravelActivityList#totalExpense(type)`-- Returns the total expense of activities in the list with given type. | ||
|
||
Step 1. When the user launched the app for the first time, there will be no objects of type `TravelActivity` in `travelActivities`. | ||
Thus any attempts to call the command `total expense` | ||
will result in an output of `0`. | ||
|
||
Step 2. After the user has added new travel activities into the `travelActivityList`, the user can execute | ||
`totalexpense [/type TYPE]` command to get the total expense for the activities in the list. The `total expense` command calls the `Parser#totalExpenseCommand(line, list)` which then calls the `TravelActivityList#totalExpense(type)`. | ||
|
||
Step 3. The method will loop through each activity in `travelActivities` and add up all the expenses for the given type. If no type is provided, it will default to TravelActivity type. | ||
|
||
![totalexpense.png](totalexpense.png) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Kindly ensure that the notation used to denote the class instance is consistent with the module's conventions. ( Also, please ensure the descriptions in the |
||
|
||
### Tag feature | ||
|
||
The tag feature is implemented through the tagCommand method, which allows users to add tags to specific travel activities stored in the system. | ||
|
||
The sequence diagram depicts the interaction between the user, the tagCommand method, the TravelActivityList instance, and the OmniException instance. | ||
|
||
![TagSequenceDiagram.png](TagSequenceDiagram.png) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For this diagram, for neatness purposes, should the first alt statement strictly be on the left side of the activation bar? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add the process bar There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add return arrows There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What are your thoughts on adopting a component-based architecture for diagrams to boost neatness, and ensuring the use of proper notation and conventions in sequence diagrams? |
||
|
||
## Product scope | ||
### Target user profile | ||
* Needs to manage multiple travel plans | ||
* Prefers typing to GUI | ||
|
||
{Describe the target user profile} | ||
|
||
### Value proposition | ||
|
||
{Describe the value proposition: what problem does it solve?} | ||
Tourists may have many plans during their holiday. Omnitravel aims to be a one-stop-shop for all travel plans. | ||
Omnitravels stores the user's travel plans and enable them to quickly retrieve their travel plans using the search | ||
functions. | ||
|
||
## User Stories | ||
|
||
|Version| As a ... | I want to ... | So that I can ...| | ||
|--------|----------|---------------|------------------| | ||
|v1.0|new user|see usage instructions|refer to them when I forget how to use the application| | ||
|v2.0|user|find a to-do item by name|locate a to-do without having to go through the entire list| | ||
| Version | As a ... | I want to ... | So that I can ... | | ||
|---------|----------|----------------------------------------------------------------|-------------------------------------------------------------------------------------------| | ||
| v1.0 | new user | see a list of my travel plans | refer and know what activities I have planned for the day | | ||
| v1.0 | user | be able to label my destinations | identify the type of activity easily | | ||
| v1.0 | user | be able to add and remove activities from my planner | easily make changes to my current activity list | | ||
| v1.0 | user | be able to add tags or categories to my activities | organise them based on my preferences | | ||
| v1.0 | user | be able to check and uncheck my travel activities | easily mark the activities that I have done if I do not follow the sequence of activities | | ||
| v1.0 | user | have a help option | easily identify all the commands in the chatbot | | ||
| v1.0 | user | be able to search for an activity already recorded in the list | easily retrieve exisiting plans and not have double inputs | | ||
| v2.0 | user | maintain my expense records | make travel plans according to my budget | | ||
| v2.0 | user | be able to see the travel durations | plan my activities more efficiently | | ||
| v2.0 | user | be able to search for an activity based on its type or tag | find specific places in my list more efficiently | | ||
| v2.0 | user | be able to delete a destination from my records | remove redundant records that I do not need | | ||
| v2.0 | user | be able to edit and update existing plans | efficiently update exisiting plans without having to delete and add plans | | ||
| v2.0 | user | have some form of QOL considerations like warning messages | know what are the errors that I have made in the inputs | | ||
|
||
|
||
## Non-Functional Requirements | ||
|
||
|
@@ -36,3 +126,107 @@ | |
## Instructions for manual testing | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. good sample inputs and outputs here for testing! |
||
|
||
{Give instructions on how to do a manual product testing e.g., how to load sample data to be used for testing} | ||
|
||
- To add a general travel activity into the list | ||
|
||
Example: `add visit Paris /date 2024-12-12 /duration 2 weeks` | ||
|
||
Expected: A new general activity is added | ||
|
||
- To add an accommodation activity into the list | ||
|
||
Example: `accommodation hotel /date 2024-12-12 /duration one night` | ||
|
||
Expected: A new accommodation activity type is added | ||
|
||
- To add a food activity into the list | ||
|
||
Example: `food prata /date 2024-12-12 /duration 1 hour` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could you explore ways to adhere more closely to coding standards and enhance code quality, such as adding : before classes? |
||
|
||
Expected: A new food activity type is added | ||
|
||
- To add a landmark activity into the list | ||
|
||
Example: `landmark Eiffel Tower /date 2024-12-12 /duration 2 hour` | ||
|
||
Expected: A new landmark activity type is added | ||
|
||
- To delete an activity from the list | ||
|
||
Example: `delete 1` | ||
|
||
Expected: The general activity "visit Paris" should be deleted | ||
|
||
- To update an existing activity date and duration in the list | ||
|
||
Example: `update 1 /date 2024-12-13 /duration two nights` | ||
|
||
Expected: The accommodation activity hotel would be on 13th Dec 2024 instead of 12th Dec 2024 and be for two nights instead of one | ||
|
||
- To list out the current activity list | ||
|
||
Example: `list` | ||
|
||
Expected: The current activity list will be shown by the chatbot | ||
|
||
- To find all travel plans with the same keyword | ||
|
||
Example: `find rvrc` | ||
|
||
Result: | ||
____________________________________________________________ | ||
Here are what you are looking for: | ||
1. Accommodation: rvrc :24 Dec 2024 :2 weeks | ||
____________________________________________________________ | ||
|
||
- To find all travel plans with the same tag | ||
|
||
Example: findtag delicacies | ||
|
||
Result: | ||
____________________________________________________________ | ||
Here are what you are looking for: | ||
1. Food: Popia :1 Dec 2020 :1hour | ||
2. Food: kfc :12 Dec 2024 :1 hour | ||
____________________________________________________________ | ||
|
||
- To tag a travel plan | ||
|
||
Example: tag 2 activity 1 | ||
|
||
Result: | ||
____________________________________________________________ | ||
I have tagged this task: | ||
Visit museum (activity 1) | ||
____________________________________________________________ | ||
|
||
- To untag a travel plan | ||
|
||
Example: untag 2 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. do use " ' ' " to format your example inputs as per above (for consistency) |
||
|
||
Result: | ||
____________________________________________________________ | ||
Tag removed from the task: | ||
Visit museum | ||
____________________________________________________________ | ||
|
||
- To add an expense to a travel plan | ||
|
||
Example: expense 1 $50 | ||
|
||
Result: | ||
____________________________________________________________ | ||
I have added expense for this task: | ||
Visit museum ($50) | ||
____________________________________________________________ | ||
|
||
- To remove expense from a travel plan | ||
|
||
Example: removeexpense 1 | ||
|
||
Result: | ||
____________________________________________________________ | ||
Expense removed from the task: | ||
Visit museum | ||
____________________________________________________________ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Duke | ||
# Omnitravel | ||
|
||
{Give product intro here} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this diagram a lot, very clear to see which classes implement and use which other classes. I like that you made this the first diagram in your TP as well, great work!