Skip to content

Commit

Permalink
Merge pull request #231 from daryltay415/master
Browse files Browse the repository at this point in the history
Update ppp
  • Loading branch information
daryltay415 committed Apr 14, 2024
2 parents 8bc1f41 + 34e4f54 commit a63881f
Show file tree
Hide file tree
Showing 36 changed files with 453 additions and 422 deletions.
14 changes: 7 additions & 7 deletions docs/AboutUs.md
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) | Eugene Chan Jiajun | [Github](https://github.com/EugeneChanJiajun) | [Portfolio](team/eugenechanjiajun.md) |
| ![](https://via.placeholder.com/100.png?text=Photo) | Daryl Tay | [Github](https://github.com/daryltay415) | [Portfolio](team/daryltay415.md) |
| ![](https://via.placeholder.com/100.png?text=Photo) | Annie Xu | [Github](https://github.com/annnniexu) | [Portfolio](team/annnniexu.md) |
| ![](https://via.placeholder.com/100.png?text=Photo) | Chin Yan Xu | [Github](https://github.com/ChinYanXu) | [Portfolio](team/ChinYanXu.md) |
| ![](https://via.placeholder.com/100.png?text=Photo) | Chen Kang | [Github](https://github.com/ChenKangg) | [Portfolio](team/ChenKangg.md) |

27 changes: 14 additions & 13 deletions docs/DeveloperGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Source for currency exchange API: [link](https://github.com/fawazahmed0/exchange
## Design

### Architecture
![ArchitectureDiagram.png](ArchitectureDiagram.png)
![ArchitectureDiagram.png](DiagramImages/ArchitectureDiagram.png)

The architecture diagram above describes the high level design of the OmniTravel app.

Expand Down Expand Up @@ -82,7 +82,7 @@ The parser component,

### TravelActivityTypes component

![TravelActivityTypeClassDiagram.png](TravelActivityTypeClassDiagram.png)
![TravelActivityTypeClassDiagram.png](DiagramImages/TravelActivityTypeClassDiagram.png)

The TravelActivityTypes component consists of a few different classes:
* `Accommodation`: A subclass of travel activity related to accommodation
Expand All @@ -105,7 +105,7 @@ the responses to the user.
* takes in exceptions as parameters and prints out the error message.

### Errorhandlers component
![Errorhandlers.png](Errorhandler.png)
![Errorhandlers.png](DiagramImages/Errorhandler.png)

The Errorhandler component consists of two classes `CheckParameters` and `OmniException`.
`OmniException` is a subclass of the parent class `Exception`.
Expand Down Expand Up @@ -135,12 +135,12 @@ 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)
![img.png](DiagramImages/img.png)

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.

![img_3.png](img_3.png)
![img_3.png](DiagramImages/img_3.png)

The above class diagram shows the methods and the respective input and return types that the FileSave class contains. It
also shows the classes called during the file load sequence.
Expand All @@ -164,10 +164,10 @@ Step 3. The method will then find the travel activity with the corresponding tra
of that travel activity.

The class diagram below shows the main relationship between the classes in the update feature:
![UpdateFeatureClassDiagrma.png](UpdateFeatureClassDiagram.png)
![UpdateFeatureClassDiagrma.png](DiagramImages/UpdateFeatureClassDiagram.png)

The sequence diagram below shows how an update operation goes through the parser component:
![img_1.png](img_1.png)
![img_1.png](DiagramImages/img_1.png)

### Total Expense feature

Expand All @@ -184,15 +184,15 @@ Step 2. After the user has added new travel activities into the `travelActivityL

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)
![totalexpense.png](DiagramImages/totalexpense.png)

### 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)
![TagSequenceDiagram.png](DiagramImages/TagSequenceDiagram.png)
## Appendix: Requirements
## Product scope
### Target user profile
Expand Down Expand Up @@ -331,11 +331,11 @@ More info can be found in the user guide [here](https://ay2324s2-cs2113-t12-4.gi

Expected: The current activity list will be shown without any sorting order

2. Test case: `list /date 2024-12-12`
2. Test case: `list /date 2024-12-12`

Expected: All the activities with the date 2024-12-12 will be shown

3. Test case: `list /sort`
3. Test case: `list /sort`

Expected: All the activities will be shown in a list by ascending dates

Expand Down Expand Up @@ -413,7 +413,7 @@ More info can be found in the user guide [here](https://ay2324s2-cs2113-t12-4.gi
Expected: No expense is removed and an error message will be shown.

### Converting currency
1. Converting a local curreny to a foreign currency
1. Converting a local currency to a foreign currency
1. Test case: `change 100 /from sgd /to jyp`

Expected: The conversion of 100 singapore dollars to japanese yen will be shown
Expand Down Expand Up @@ -484,4 +484,5 @@ More info can be found in the user guide [here](https://ay2324s2-cs2113-t12-4.gi
1. Shows all the commands the user can input
1. Test case: `help`

Expected: All the commands and their format will be shown
Expected: All the commands will be shown

File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
4 changes: 3 additions & 1 deletion docs/UserGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ ____________________________________________________________
> 📒 Notes about the command format :
> * The words that are in `UPPER_CASE` represents the parameters that the users are required to input
> e.g. `delete INDEX`, `INDEX` is a parameter which can be used as `delete 1`.
> * Commands such as `help`, `list` and `bye` do not require additional parameters. Hence, any extra parameters will be ignored.
> * Commands such as `help` and `bye` do not require additional parameters. Hence, any extra parameters will be ignored.
> e.g. `help 123` will just be intepreted as `help`.
> * Words that are in square brackets such as `[/tag TAG]` indicates that it is
> optional to include in the command.
Expand Down Expand Up @@ -341,6 +341,7 @@ their travel activities.
Format: `tag INDEX TAGNAME`

* The `INDEX` must be a valid activity index.
* There must not be any trailing spaces in `INDEX`.

Example of usage:
* `tag 1 activity 1`
Expand All @@ -359,6 +360,7 @@ Removes a tag from an existing travel activity.
Format: `untag INDEX`

* The `INDEX` must be a valid activity index.
* * There must not be any trailing spaces in `INDEX`.

Example of usage:
* `untag 1 `
Expand Down
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
@startuml
'https://plantuml.com/component-diagram



Actor User as user

user ..> [omnitravel]

[omnitravel] --> "passes data"[parser]
[omnitravel] --> "Load/save"[storage]
[omnitravel] --> "uses" [ui]
[parser] --> "uses" [ui]
[parser] --> "uses" [exchangerateapi]
[parser] --> "uses" [errorhandlers]
[storage] --> "uses" [travelactivitytype]
[travelactivitytype] --> "uses" [ui]
[travelactivitytype] --> "uses" [errorhandlers]
[errorhandlers] --> "uses" [ui]
[parser] --> "uses" [travelactivitytype]
folder "omni.txt" as folder
folder .. [storage]

@startuml
'https://plantuml.com/component-diagram



Actor User as user

user ..> [omnitravel]

[omnitravel] --> "passes data"[parser]
[omnitravel] --> "Load/save"[storage]
[omnitravel] --> "uses" [ui]
[parser] --> "uses" [ui]
[parser] --> "uses" [exchangerateapi]
[parser] --> "uses" [errorhandlers]
[storage] --> "uses" [travelactivitytype]
[travelactivitytype] --> "uses" [ui]
[travelactivitytype] --> "uses" [errorhandlers]
[errorhandlers] --> "uses" [ui]
[parser] --> "uses" [travelactivitytype]
folder "omni.txt" as folder
folder .. [storage]

@enduml
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
@startuml
'https://plantuml.com/class-diagram
skinparam packageStyle rectangle
hide class members
package errorhandlers{
class CheckParameters
class OmniException
class Exception
}

package travelactivitytypes{
}

package parser{
}

package ui{
}




OmniException --|> Exception
CheckParameters ..> OmniException
CheckParameters --> ui
parser --> CheckParameters
travelactivitytypes --> CheckParameters


@startuml
'https://plantuml.com/class-diagram
skinparam packageStyle rectangle
hide class members
package errorhandlers{
class CheckParameters
class OmniException
class Exception
}

package travelactivitytypes{
}

package parser{
}

package ui{
}




OmniException --|> Exception
CheckParameters ..> OmniException
CheckParameters --> ui
parser --> CheckParameters
travelactivitytypes --> CheckParameters


@enduml
Original file line number Diff line number Diff line change
@@ -1,61 +1,61 @@
@startuml
actor User
participant "readFile()" as readFile
participant "loadFileContents(TravelActivityList list)" as loadFileContents
participant "accommodation:Accommodation" as Accommodation
participant "food:Food" as Food
participant "landmark:Landmark" as Landmark
participant "list:TravelActivityList" as TravelActivityList
participant "SetActivityStatus" as SetActivityStatus
participant "s:Scanner" as Scanner

User -> readFile: readFile()
activate readFile
readFile -> loadFileContents: loadFileContents(list)
activate loadFileContents

loop scanner
loadFileContents -> Scanner: hasNext()
activate Scanner
Scanner --> loadFileContents: next
deactivate Scanner
alt Accomodation
loadFileContents -> Accommodation: list.addTravelActivity(accommodation)
activate Accommodation
Accommodation -> TravelActivityList: list.addTravelActivity(accommodation)
activate TravelActivityList
TravelActivityList --> Accommodation: added activity
deactivate TravelActivityList
Accommodation -> SetActivityStatus: setActivityStatus()
activate SetActivityStatus
SetActivityStatus --> Accommodation: Status handled
deactivate SetActivityStatus
else Food
loadFileContents -> Food: list.addTravelActivity(food)
activate Food
Food -> TravelActivityList: list.addTravelActivity(food)
activate TravelActivityList
TravelActivityList --> Food: added activity
deactivate TravelActivityList
Food -> SetActivityStatus: setActivityStatus()
activate SetActivityStatus
SetActivityStatus --> Food: Status handled
deactivate SetActivityStatus
else Landmark
loadFileContents -> Landmark: list.addTravelActivity(landmark)
activate Landmark
Landmark -> TravelActivityList: list.addTravelActivity(landmark)
activate TravelActivityList
TravelActivityList --> Landmark: added activity
deactivate TravelActivityList
Landmark -> SetActivityStatus: setActivityStatus()
activate SetActivityStatus
SetActivityStatus --> Landmark: Status handled
deactivate SetActivityStatus
end
end
deactivate TravelActivityList
deactivate loadFileContents
deactivate readFile

@startuml
actor User
participant "readFile()" as readFile
participant "loadFileContents(TravelActivityList list)" as loadFileContents
participant "accommodation:Accommodation" as Accommodation
participant "food:Food" as Food
participant "landmark:Landmark" as Landmark
participant "list:TravelActivityList" as TravelActivityList
participant "SetActivityStatus" as SetActivityStatus
participant "s:Scanner" as Scanner

User -> readFile: readFile()
activate readFile
readFile -> loadFileContents: loadFileContents(list)
activate loadFileContents

loop scanner
loadFileContents -> Scanner: hasNext()
activate Scanner
Scanner --> loadFileContents: next
deactivate Scanner
alt Accomodation
loadFileContents -> Accommodation: list.addTravelActivity(accommodation)
activate Accommodation
Accommodation -> TravelActivityList: list.addTravelActivity(accommodation)
activate TravelActivityList
TravelActivityList --> Accommodation: added activity
deactivate TravelActivityList
Accommodation -> SetActivityStatus: setActivityStatus()
activate SetActivityStatus
SetActivityStatus --> Accommodation: Status handled
deactivate SetActivityStatus
else Food
loadFileContents -> Food: list.addTravelActivity(food)
activate Food
Food -> TravelActivityList: list.addTravelActivity(food)
activate TravelActivityList
TravelActivityList --> Food: added activity
deactivate TravelActivityList
Food -> SetActivityStatus: setActivityStatus()
activate SetActivityStatus
SetActivityStatus --> Food: Status handled
deactivate SetActivityStatus
else Landmark
loadFileContents -> Landmark: list.addTravelActivity(landmark)
activate Landmark
Landmark -> TravelActivityList: list.addTravelActivity(landmark)
activate TravelActivityList
TravelActivityList --> Landmark: added activity
deactivate TravelActivityList
Landmark -> SetActivityStatus: setActivityStatus()
activate SetActivityStatus
SetActivityStatus --> Landmark: Status handled
deactivate SetActivityStatus
end
end
deactivate TravelActivityList
deactivate loadFileContents
deactivate readFile

@enduml
Loading

0 comments on commit a63881f

Please sign in to comment.