Skip to content

Commit

Permalink
Merge branch 'master' into branch-final-lap-changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ailanthustng authored Apr 13, 2020
2 parents c63f8ac + ef82c1b commit d913f45
Show file tree
Hide file tree
Showing 19 changed files with 496 additions and 57 deletions.
88 changes: 77 additions & 11 deletions docs/DeveloperGuide.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@ based on their user input.
image::DietTrackerActivityDiagram.png[]
//end::diettrackeractivitydiagram[]

//tag::diettrackeradd[]
[[Add-Command]]
==== Add Command

Expand Down Expand Up @@ -312,6 +313,9 @@ The following sequence diagram summarizes what happens during the execution of `
.Add Command Sequence Diagram
image::DietTrackerAddCommandSequenceDiagram.png[]

//end::diettrackeradd[]

//tag::diettrackerdelete[]
[[Delete-Command]]
==== Delete Command

Expand Down Expand Up @@ -377,6 +381,9 @@ The following sequence diagram summarizes what happens during the execution of `
.Delete Command Sequence Diagram
image::DietTrackerDeleteCommandSequenceDiagram.png[]

//end::diettrackerdelete[]

//tag::diettrackerlist[]
[[List-Command]]
==== List Command

Expand Down Expand Up @@ -418,18 +425,19 @@ interfaces. Some methods and fields are left out because they are not of concern
The following is a detailed explanation of the operations `ListCommand` performs. +

1. The `ListCommand#execute(DietModel dietModel)` method is executed and it validates that the flag used to decide what
Foods to list. If the flag is valid, the items to be listed will be retrieved from FoodBookStorage according
Foods to list. If the flag is valid, the items to be listed will be retrieved from DietModel according
to the input flag.

2. The method `DietModel#updateFilteredFoodList() will then be called to retrieve the List of Foods from Storage.
2. The method `DietModel#updateFilteredFoodList() will then be called to filter the List of Foods in DietModel.
`FilteredList#setPredicate(Predicate<Food> predicate)` is then invoked which retrieves the specified Foods to be listed.

Case `-a` or No-Flag Input
Case No-Flag Input: The Predicate is any food with date within 1 day back from current time.

Case `-a`: The Predicate always returns true so the list is the entire FoodBook.

Case `-d`
Case `-d`: The Predicate will be all food with date later than the specified date which is calculated by input number of days back from the current date.

Case `-t`
Case `-t`: The Predicate will be any food with tags that matches given time.

3. If successful, a success message will be generated by `CommandResult` and it will be returned with the generated
success message. Otherwise, an error message showing the correct command syntax is thrown as `CommandException`.
Expand All @@ -442,6 +450,7 @@ image::DietTrackerListCommandAllSequenceDiagram.png[]
image::DietTrackerListCommandDaySequenceDiagram.png[]
.List Sequence Diagram for `-t`
image::DietTrackerListCommandTagSequenceDiagram.png[]
//end::diettrackerlist[]

//tag::diettrackeredit[]
[[Edit-Command]]
Expand Down Expand Up @@ -1501,6 +1510,7 @@ emergency
|=======================================================================
// end::userstory[]

//tag::diettrackerusecases[]
[appendix]
== Use Cases

Expand All @@ -1511,6 +1521,8 @@ emergency

[discrete]
==== Use case: UC01 Update User Profile
*Actor:* User +
User's Height, Weight and Mode will be updated in Self.

*MSS*

Expand Down Expand Up @@ -1562,6 +1574,8 @@ Use case ends.

[discrete]
==== Use case: UC02 Add Food Item
*Actor:* User +
Food will be added into FoodBook.

*MSS*

Expand All @@ -1585,6 +1599,8 @@ Use case ends.

[discrete]
==== Use case: UC03 Delete Food Item
*Actor:* User +
Food will be deleted from FoodBook.

*MSS*

Expand Down Expand Up @@ -1617,6 +1633,8 @@ Use case ends.

[discrete]
==== Use case: UC04 Edit Food Item
*Actor:* User +
Food in FoodBook will be edited.

*MSS*

Expand Down Expand Up @@ -1654,6 +1672,8 @@ Use case ends.

[discrete]
==== Use case: UC05 List Food Items
*Actor:* User +
List food in FoodBook filtered by tags.

*MSS*

Expand All @@ -1677,6 +1697,8 @@ Use case ends.

[discrete]
==== Use case: UC06 Track Daily Calories
*Actor:* User +
Show user daily food and calorie intake.

*MSS*

Expand All @@ -1698,6 +1720,8 @@ Use case ends.

[discrete]
==== Use case: UC07 Calculate BMI
*Actor:* User +
Calculate BMI for user.

*MSS*

Expand Down Expand Up @@ -1743,7 +1767,7 @@ Use case resumes from step 2.
** *a1. EYLAH will not make any changes +
Use case ends.


//end::diettrackerusecases[]
//tag::expensesplitterusecase[]
[discrete]
=== Expense Splitter Use Cases
Expand Down Expand Up @@ -2019,6 +2043,7 @@ The BMI is a convenient rule of thumb used to broadly categorize a person as und
or obese based on tissue mass (muscle, fat, and bone) and height


//tag::diettrackercommandprefix[]
_Table 1. Diet Tracker Command Prefix_ +
[width="59%",cols="22%,<23%,<25%,options="header",]
|=======================================================================
Expand All @@ -2028,12 +2053,14 @@ _Table 1. Diet Tracker Command Prefix_ +
| -i | Index | <<Edit-Command,*Edit*>>
| -g | Gain | <<Mode-Command,*Mode*>>
| -m | Maintain | <<Mode-Command,*Mode*>>
| -f | Foods | <<List-Command,*List*>>
| -d | Day | <<List-Command,*List*>>
| -t | Track | <<List-Command,*List*>>
| -l | Lose | <<Mode-Command,*Mode*>>
| -a | All | <<List-Command,*List*>>
| -d | By Past Num of Days | <<List-Command,*List*>>
| -t | By Tag | <<List-Command,*List*>>
| -h | Height | <<Bmi-Command,*Bmi*>>
| -w | Weight | <<Bmi-Command,*Bmi*>>
|=======================================================================
//end::diettrackercommandprefix[]

_Table 2. Expense Splitter Command Prefix_ +
[width="59%",cols="22%,<23%,<25%,options="header",]
Expand Down Expand Up @@ -2247,6 +2274,7 @@ Expected: Weight will not be stored.
Error message shown with details.
//end::appendixdtweight[]

//tag::ailanappendixgadditem[]
=== Add Item In Expense Splitter

. Adding an Item into the current Receipt.
Expand All @@ -2259,10 +2287,26 @@ with the number of person splitting that item.

.. Test case: `Invalid Syntax` +
Expected: No item is added to the current receipt and no change to person amount.
Error details shown in the response message.
An error message will be displayed.
//end::ailanappendixgadditem[]

//tag::ailanappendixgdeleteitem[]
=== Delete Item In Expense Splitter

. Deleting an Item from the current Receipt.

.. Delete Item Command format: `deleteitem INDEX`

.. Test case: `delete 1` +
Expected: Removes the item of the specified index from the receipt.

.. Test case: `Invalid Syntax` +
Expected: No item will be deleted from the current receipt.
An error message will be displayed.
//end::ailanappendixgdeleteitem[]

//tag::willylistreceiptappendixg[]
=== List Receipt in Expense Spliter
=== List Receipt in Expense Splitter

. Listing the items contained in the current receipt. The order of items listed depends on the order
of items added by the user.
Expand Down Expand Up @@ -2296,6 +2340,17 @@ deleted from the PersonList.
Expected: If there are no Person in the list: EYLAH will inform user that there no one owes money.
//end::willylistamountappendixg[]

//tag::ailanappendixgdonereceipt[]
=== Done Receipt In Expense Splitter

. Marks the current receipt as done.

.. Done Receipt Command format: `donereceipt`

.. Test case: `donereceipt` +
Expected: The receipt is marked as done. A success message will be displayed.
//end::ailanappendixgdonereceipt[]

//tag::willypaidappendixg[]
=== Paid Command In Expense Splitter

Expand All @@ -2313,6 +2368,17 @@ Expected: Reduces the entire amount of money the Person at Index 1 owes.
Expected: EYLAH will inform the user that INDEX is incorrect.
//end::willypaidappendixg[]

//tag::ailanappendixgclearreceipt[]
=== Clear Receipt In Expense Splitter

. Clears the receipt and marks the receipt as undone.

.. Clear Receipt Command format: `clearreceipt`

.. Test case: `clearreceipt` +
Expected: The receipt is cleared and is marked as undone. A success message will be displayed.
//end::ailanappendixgclearreceipt[]

=== Saving data

. Manual saving is not required as data is already saved in the hard disk after any commands that changes the data.
Expand Down
22 changes: 11 additions & 11 deletions docs/UserGuide.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -195,15 +195,15 @@ Valid Example: +

*Main Menu:*

image::dietTrackerWeightCommandSuccessPhoto.png[width="890", height="200"]
image::main_help.png[width="890", height="200"]

*Diet Tracker Mode:*

image::dietTrackerWeightCommandSuccessPhoto.png[width="890", height="200"]
image::diethelp.png[width="890", height="200"]

*Expense Splitter Mode:*

image::dietTrackerWeightCommandSuccessPhoto.png[width="890", height="200"]
image::splithelp.png[width="890", height="200"]

*Additional notes and tips* +

Expand Down Expand Up @@ -717,7 +717,7 @@ Valid Example: +
[[additemexpectedoutcome]]
*Expected outcome:*

image::placeholder.png[]
image::expensesplitteradditemexpectedoutcome.png[][width="890", height="200"]

[NOTE]
====
Expand Down Expand Up @@ -751,7 +751,7 @@ Valid Example: +
[[deleteitemexpectedoutcome]]
*Expected outcome:*

image::placeholder.png[]
image::expensesplitterdeleteitemexpectedoutcome.png[][width="890", height="200"]

[TIP]
Use `listreceipt` to view your item indices before deletion.
Expand Down Expand Up @@ -857,7 +857,7 @@ Example: +
[[donereceiptexpectedoutcome]]
*Expected outcome:*

image::expenseSplitterListAmountCommandSuccessPhoto.png[width="890", height="200"]
image::donereceipt.png[width="890", height="200"]

[NOTE]
====
Expand Down Expand Up @@ -945,7 +945,7 @@ Valid Example: +
[[clearreceiptexpectedoutcome]]
*Expected outcome:*

image::placeholder.png[]
image::expensesplitterclearreceiptexpectedoutcome.png[][width="890", height="200"]

[WARNING]
====
Expand Down Expand Up @@ -985,7 +985,7 @@ Valid Example: +
[[splitbackexpectedoutcome]]
*Expected outcome:*

image::placeholder.png[]
image::expenseback.png[width="890", height="200"]
//end::splitback[]

'''
Expand All @@ -1012,7 +1012,7 @@ Valid Example: +
[[exitexpectedoutcome]]
*Expected outcome:*

image::dietTrackerWeightCommandSuccessPhoto.png[width="890", height="200"]
image::exit.png[width="890", height="200"]
//end::exit[]

'''
Expand All @@ -1035,7 +1035,7 @@ example.

If you would like to know more about a specific command, simply click on the provided links in the table below and you
will be brought to the respective command.

//tag::commandsummaryfordiettracker[]
=== For Diet Tracker
|===
|Command |Format |Example
Expand Down Expand Up @@ -1111,7 +1111,7 @@ or
|`exit`

|===

//end::commandsummaryfordiettracker[]
//tag::commandsummaryforexpensesplitter[]
=== For Expense Splitter
|===
Expand Down
36 changes: 36 additions & 0 deletions docs/[CS2103T-W13-01][Chen Shee Xiong]UMLDiagrams.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
:imagesDir: images
:stylesDir: stylesheets

== Chen Shee Xiong UML Diagrams


* *EYLAH Architecture Diagram*

image::ArchitectureDiagram.png[]

image::ArchitectureSequenceDiagram.png[]

* *EYLAH Design UML Diagrams*

image::LogicClassDiagram.png[]

image::UiClassDiagram.png[]

image::ModelClassDiagram.png[]

image::LogicClassDiagram.png[]

image::StorageClassDiagram.png[]

* *Done Receipt Command UML Diagrams*

image::ExpenseSplitterDoneReceiptCommandActivityDiagram.png[]

image::ExpenseSplitterDoneReceiptCommandClassDiagram.png[]

image::ExpenseSplitterDoneReceiptCommandSequenceDiagram.png[]





Loading

0 comments on commit d913f45

Please sign in to comment.