Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/ningtan11/tp
Browse files Browse the repository at this point in the history
  • Loading branch information
ningtan11 committed Nov 7, 2022
2 parents 1ff51db + 4857d94 commit 1a36cc0
Show file tree
Hide file tree
Showing 14 changed files with 185 additions and 111 deletions.
22 changes: 3 additions & 19 deletions docs/DeveloperGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ title: Developer Guide
## **Acknowledgements**

* [Apache PDFBox®](https://pdfbox.apache.org/)
* {list here sources of all reused/adapted ideas, code, documentation, and third-party libraries -- include links to the original source as well}
* * [Apache Commons](https://commons.apache.org/)

--------------------------------------------------------------------------------------------------------------------

Expand Down Expand Up @@ -177,7 +177,7 @@ Additionally, we will explain the methods of particular concern below.
* `Item#getStartTime()` — Returns the start time of the item.
* `Item#getEndTime()` — Returns the end time of the item.

Given below is an example usage scenario and how the Plan/Unplan mechanism behaves at each step.
Given below is an example usage scenario and how the Plan/Unplan mechanism behaves at each step. The sequence diagram is a partial diagram showing omitting the details of how the `PlanCommand` is executed. This detail will be shown in the next sequence diagram.

![PlanSequenceDiagram](images/PlanSequenceDiagram.png)

Expand All @@ -195,8 +195,6 @@ Step 5. `Day`self invokes `Day#getConflictingItems(item)`. If there are no confl

Step 6. If the item is successfully added, a `CommandResult` object is created with the success message.

The following sequence diagram shows how the undo operation works:

<div markdown="span" class="alert alert-info">:information_source: **Note:** The Unplan command works in a similar manner. Instead of `Itinerary#planItem(itemIndex, dayNumber, startTime)` and `Day#addItem(item)`, `Itinerary#unplanItem(MultiIndex)` and `Day#removeitem(Index)` are called instead.

</div>
Expand Down Expand Up @@ -321,7 +319,6 @@ Priorities: High (must have) - `* * *`, Medium (nice to have) - `* *`, Low (unli
| `*` | fast user | add custom shortcuts for commands | |


*{More to be added}*

### Use cases

Expand Down Expand Up @@ -410,7 +407,6 @@ Use case ends.
Use case ends.


*{More to be added}*

### Non-Functional Requirements

Expand All @@ -420,7 +416,6 @@ Use case ends.
4. The GUI should be intuitive and easy to understand.
5. The system should respond in at most 1 second.

*{More to be added}*

### Glossary

Expand Down Expand Up @@ -449,10 +444,9 @@ testers are expected to do more *exploratory* testing.

1. Resize the window to an optimum size. Move the window to a different location. Close the window.

1. Re-launch the app by double-clicking the jar file.<br>
2. Re-launch the app by double-clicking the jar file.<br>
Expected: The most recent window size and location is retained.

1. _{ more test cases …​ }_

### Deleting an itinerary

Expand All @@ -466,13 +460,3 @@ testers are expected to do more *exploratory* testing.

1. Other incorrect delete commands to try: `delete`, `delete x`, `...` (where x is larger than the list size)<br>
Expected: Similar to previous.

1. _{ more test cases …​ }_

### Saving data

1. Dealing with missing/corrupted data files

1. _{explain how to simulate a missing/corrupted file, and the expected behavior}_

1. _{ more test cases …​ }_
2 changes: 1 addition & 1 deletion docs/SettingUp.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ If you plan to use Intellij IDEA (highly recommended):

1. **Learn the design**

When you are ready to start coding, we recommend that you get some sense of the overall design by reading about [AddressBook’s architecture](DeveloperGuide.md#architecture).
When you are ready to start coding, we recommend that you get some sense of the overall design by reading about [Waddle’s architecture](DeveloperGuide.md#architecture).

1. **Do the tutorials**
These tutorials will help you get acquainted with the codebase.
Expand Down
48 changes: 26 additions & 22 deletions docs/UserGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Waddle allows you to plan your travels in **3 simple steps**.
3. Make a schedule for your trip

**It's that simple**.

--------------------------------------------------------------------------------------------------------------------
<div style="page-break-after: always"></div>

Expand Down Expand Up @@ -66,8 +67,10 @@ To begin planning your travels with Waddle, simply set it up as follows:
Note how the app contains some sample data.<br>
![Ui](images/Ui.png)

And you're ready to waddle! To execute any command, type it command in the command box and press Enter. e.g. typing **`help`** and pressing Enter will open the help window.<br>
Some example commands you can try:
And you're ready to waddle! To execute any command, type it command in the command box and press Enter. e.g. typing **`help`** and pressing Enter will open the help window.
<div style="page-break-after: always"></div>

Some example commands you can try:

* **`list`** : Lists all itineraries.

Expand All @@ -92,9 +95,7 @@ For more commands and their details, refer to the [Features](#features) section

* Words in `UPPER_CASE` are the parameters to be supplied by the user.<br>
- e.g. in `add d/DESCRIPTION ...`, `DESCRIPTION` is a parameter which can be used as `add d/My Japan Trip`.

* Unlesss stated otherwise, all parameters should contain alphanumerical characters only.


* Items in square brackets are optional.<br>
- e.g. `d/DESCRIPTION [c/COUNTRY] sd/START_DATE du/DURATION` can be used as `d/My Japan Trip c/Japan sd/2023-04-01 du/14` or as `d/My Japan Trip sd/2023-04-01 du/14`.

Expand Down Expand Up @@ -136,7 +137,7 @@ The main page, or home page, of Waddle displays the list of itineraries you have

[Commands exclusive to the main page](#commands-on-the-main-page) can help you:
* [add](#creating-a-new-itinerary--add) new itineraries
* [view](#listing-all-itineraries--list) or [find](#locating-itineraries-by-description--find) existing itineraries
* [list](#listing-all-itineraries--list) or [find](#locating-itineraries-by-description--find) existing itineraries
* [edit](#editing-the-details-of-an-itinerary--edit) or [delete](#deleting-an-itinerary--delete) existing itineraries
* [clear](#clearing-itineraries--clear) all existing itineraries

Expand Down Expand Up @@ -165,8 +166,7 @@ alphanumeric characters, spaces and these following special characters: `()&!':.

**:information_source: Notes:**<br>

* You cannot add an itinerary with the same description as an existing itinerary.<br>

* You cannot add an itinerary with the same description as an existing itinerary.
* Waddle only accepts english letters and spaces for `COUNTRY`, special characters like `'`, `&`, `!` are not allowed.<br>
- Example of invalid input: `c/Côte d'Ivoire`, `c/中国`
* The budget input should only contain numbers and one decimal point.<br>
Expand All @@ -185,7 +185,7 @@ Format: `list`

### Locating itineraries by description : `find`

Finds itineraries with descriptions containing any of the given keywords.
Finds itineraries with names containing any of the given keywords.

Format: `find KEYWORD [MORE_KEYWORDS]`

Expand Down Expand Up @@ -226,6 +226,8 @@ Examples:
* `edit 1 du/15 sd/2023-11-03` Edits the duration and start date of the first itinerary to be `15` and `2023-11-03` respectively.
* `edit 2 c/India` Edits the country of the second itinerary to be `India`.

<div style="page-break-after: always"></div>

### Deleting an itinerary : `delete`

Deletes the specified itinerary from Waddle.
Expand Down Expand Up @@ -273,10 +275,10 @@ Here's an example of how the item planning page looks like:

<div style="page-break-after: always"></div>

[Commands exclusive to the planning page](#commands-on-the-planning-page) can help you:
[Commands exclusive to the planning page](#commands-on-the-item-planning-page) can help you:
* [add](#adding-an-item--add) new items
* [edit](#editing-the-details-of-an-item--edit) or [delete](#deleting-an-item--delete) existing items
* [view](viewing-vacant-time-slots--free) the vacant time slots on your itinerary
* [view](#viewing-vacant-timeslots--free) the vacant time slots on your itinerary
* [schedule](#scheduling-an-item--plan) or [unschedule](#unscheduling-an-item--unplan) items
* export your itinerary via your [clipboard](#copying-to-clipboard--copy) or as a [pdf](#exporting-as-pdf-file--pdf) file

Expand All @@ -293,7 +295,7 @@ Adds an item to the wishlist without a scheduled day and time.
Format: `add d/DESCRIPTION du/DURATION [p/PRIORITY] [c/COST] `

* `DESCRIPTION` cannot be blank and must only contain alphanumeric characters, spaces and these following special characters: `()&!':.,-`.
* `DURATION` is the time taken for the item in _minutes_. The duration must be more than 0 minutes and not more than 1440 minutes (1 day).
* `DURATION` is the time taken for the item in _minutes_. The duration must be more than 0 minutes and shorter than 1440 minutes (1 day).
- e.g. `du/100` is 100 minutes (or 1 hour and 40 minutes).

* `PRIORITY` is used to rank the importance of an item. It must be a number from 1 to 5, with 1 being the highest priority.
Expand All @@ -320,6 +322,8 @@ Examples:
* `add d/Go to the Louvre p/2 du/1`
* `add d/Skiing du/14 c/100`

<div style="page-break-after: always"></div>

### Editing the details of an item : `edit`

Edits an existing item in the item list.
Expand Down Expand Up @@ -388,7 +392,7 @@ Examples:
* `plan 2 d/3 st/12:00` would add the 2nd item in the Wishlist to Day 3, starting at 12pm.
* `plan 1 d/1 st/14:50:10` would add the 1st item in the Wishlist to Day 1, starting at 14:50pm, 10 seconds in.

<p><div style="page-break-after: always"></div></p>
<div style="page-break-after: always"></div>

### Unscheduling an item : `unplan`

Expand Down Expand Up @@ -418,8 +422,7 @@ Here's an example of how the copied text would look like: <br>

**:information_source: Note:** <br>

* The generated text includes all days within the itinerary, even if there are no items planned for the day.<br>

* The generated text includes all days within the itinerary, even if there are no items planned for the day.
* The generated text does not include the items in the Wishlist. For items to be reflected in the generated text, they must be planned.<br>

</div>
Expand Down Expand Up @@ -448,7 +451,7 @@ Here's an example of how the generated PDF would look like: <br>

### Returning to main page : `home`

Returns you to the main itinerary list page.
Returns you to the [main itinerary list page](#the-main-page).

Format: `home`

Expand Down Expand Up @@ -486,14 +489,14 @@ If your changes to the data file makes its format invalid, Waddle will discard a
### Home page commands

| Action | Format, Examples |
| ------------------------------------------------------------------ |-------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [**Help**](#viewing-help--help) | `help` |
| [**Add Itinerary**](#creating-a-new-itinerary--add) | `add d/DESCRIPTION sd/START DATE du/DURATION [c/COUNTRY] [p/NUMBER OF WADDLERS] [b/BUDGET]`<br> e.g., `add d/Germanyyyy sd/2025-05-10 du/14 c/Germany p/4 b/7500` |
| [**List Itineraries**](#listing-all-itineraries--list) | `list` |
| [**Find Itinerary**](#locating-itineraries-by-description--find) | `find KEYWORD [MORE_KEYWORDS]`<br> e.g., `find India Trip` |
| [**Edit Itinerary**](#editing-the-details-of-an-itinerary--edit) | `edit INDEX [n/NAME] [c/COUNTRY] [du/DURATION] [s/START DATE] [p/NUMBER OF WADDLERS] [b/BUDGET]`<br> e.g.,`edit 1 du/15 sd/2025-04-10` |
| [**Delete Itinerary**](#deleting-an-itinerary--delete) | `delete INDEX`<br> e.g., `delete 3` |
| [**Clear Itineraries**](#clearing-itineraries--clear) | `clear` |
| [**Find Itinerary**](#locating-itineraries-by-name--find) | `find KEYWORD [MORE_KEYWORDS]`<br> e.g., `find India Trip` |
| [**Select Itinerary**](#selecting-an-itinerary--select) | `select INDEX`<br> e.g., `select 3` |
| [**Exit**](#exiting-waddle--exit) | `exit` |

Expand All @@ -502,14 +505,15 @@ If your changes to the data file makes its format invalid, Waddle will discard a
### Item planning page commands

| Action | Format, Examples |
| -------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- |
|--------------------------------------------------------------|----------------------------------------------------------------------------------------------------------|
| [**Help**](#viewing-help--help) | `help` |
| [**Add Item**](#adding-an-item--add) | `add d/DESCRIPTION [p/PRIORITY] [c/COST] [du/DURATION]`<br> e.g.,`add d/Visit Taj Mahal p/5 c/40 du/180` |
| [**Edit Item**](#editing-the-details-of-an-item--edit) | `edit INDEX [d/DESCRIPTION] [p/PRIORITY] [c/COST] [du/DURATION]`<br> e.g., `edit 4.1 c/50` |
| [**Delete Item**](#deleting-an-item--delete) | `delete INDEX`<br> e.g., `delete 3` |
| [**View Vacant Timeslots**](#viewing-vacant-timeslots--free) | `free` |
| [**Schedule Item**](#scheduling-an-item--plan) | `plan INDEX d/DAY NUMBER st/START TIME`<br> e.g., `plan 1 d/4 st/12:00` |
| [**Unschedule Item**](#unscheduling-an-item--unplan) | `unplan INDEX`<br> e.g., `unplan 3.2` |
| [**View Vacant Timeslots**](#viewing-vacant-timeslots--free) | `free` |
| [**Return to Main Page**](#returning-to-main-page--home) | `home` |
| [**Copy to clipboard**](#copying-to-clipboard--copy) | `copy` |
| [**Export to PDF**](#exporting-to-pdf-file--pdf) | `pdf` |
| [**Export to PDF**](#exporting-as-pdf-file--pdf) | `pdf` |
| [**Return to Main Page**](#returning-to-main-page--home) | `home` |
| [**Exit**](#exiting-waddle--exit) | `exit` |
6 changes: 3 additions & 3 deletions docs/diagrams/LogicClassDiagram.puml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ skinparam classBackgroundColor LOGIC_COLOR

package Logic {

Class AddressBookParser
Class WaddleParser
Class XYZCommand
Class CommandResult
Class "{abstract}\nCommand" as Command
Expand All @@ -27,8 +27,8 @@ Class HiddenOutside #FFFFFF
HiddenOutside ..> Logic

LogicManager .right.|> Logic
LogicManager -right->"1" AddressBookParser
AddressBookParser ..> XYZCommand : creates >
LogicManager -right->"1" WaddleParser
WaddleParser ..> XYZCommand : creates >

XYZCommand -up-|> Command
LogicManager .left.> Command : executes >
Expand Down
12 changes: 6 additions & 6 deletions docs/diagrams/ModelClassDiagram.puml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ Class UserPrefs
Class UniqueItineraryList
Class Itinerary
Class People
Class duration
Class Name
Class Duration
Class Description
Class Country
Class Tag

Expand All @@ -36,14 +36,14 @@ UserPrefs .up.|> ReadOnlyUserPrefs

Waddle *--> "1" UniqueItineraryList
UniqueItineraryList --> "~* all" Itinerary
Itinerary *--> Name
Itinerary *--> Description
Itinerary *--> Country
Itinerary *--> duration
Itinerary *--> Duration
Itinerary *--> People

Name -[hidden]right-> Country
Description -[hidden]right-> Country
Country -[hidden]right-> People
People -[hidden]right-> duration
People -[hidden]right-> Duration

ModelManager -->"~* filtered" Itinerary
@enduml
8 changes: 4 additions & 4 deletions docs/diagrams/ParserClasses.puml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Class XYZCommand

package "Parser classes"{
Class "<<interface>>\nParser" as Parser
Class AddressBookParser
Class WaddleParser
Class XYZCommandParser
Class CliSyntax
Class ParserUtil
Expand All @@ -19,12 +19,12 @@ Class Prefix
}

Class HiddenOutside #FFFFFF
HiddenOutside ..> AddressBookParser
HiddenOutside ..> WaddleParser

AddressBookParser .down.> XYZCommandParser: creates >
WaddleParser .down.> XYZCommandParser: creates >

XYZCommandParser ..> XYZCommand : creates >
AddressBookParser ..> Command : returns >
WaddleParser ..> Command : returns >
XYZCommandParser .up.|> Parser
XYZCommandParser ..> ArgumentMultimap
XYZCommandParser ..> ArgumentTokenizer
Expand Down
Binary file modified docs/images/LogicClassDiagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/ModelClassDiagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/ParserClasses.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 1a36cc0

Please sign in to comment.