-
Notifications
You must be signed in to change notification settings - Fork 89
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-F11-2] EssenMakanan #35
base: master
Are you sure you want to change the base?
Changes from 250 commits
0bbba68
f9b6f03
6d707db
c0f6dc7
2971872
8d6b09f
0e0b7a8
77ec82b
ee32536
0705fe5
4e3efc9
77207f2
877cd14
a2b92e4
61e5e8e
f402d08
d70dc56
903814d
a105ebd
4469cd5
01f992c
76132d7
58db94e
2364d69
b39b65f
15a99f1
a2c40ea
5df91c8
422a0ae
e61714e
5abcb50
08ceb92
fb2734e
19e63a7
99a14f2
f60181a
77d1d9b
6b4047a
3b54fe8
da54d62
152ead6
21b420e
6dbd99f
3c97181
4b2a112
d664c04
900a906
c5175bd
46506a7
53eed01
a8a0318
ef54bc4
d621def
090e8ea
53850c6
deac014
7e284ac
95c7109
2464035
640cbe1
7c98155
e5c3bc5
312716f
f198f0e
f8fb874
4536519
490a9da
78aae3f
4d6876d
ab4d3e5
952bf3f
2d69a88
7c29286
b34b0a0
600d544
0acc634
9fdbf3c
bb0f4e0
16ae5db
f751950
78cc66d
5bf4f49
6ecc8da
1a485ee
a4996b2
a5871c9
a9d698f
9e676f6
07f9d66
77fb7f6
3ee5c91
e263acc
25f8ecd
9b6aacd
1aa0220
ec6834a
5368134
d6c84b8
8735976
46b3d07
952b8ad
8bc24ae
f5360d7
6df7a91
6a922e2
fadda64
7be02a5
e83197d
e2953f4
4599f4a
5709409
b68f41a
7e149da
a6bfa37
a5194b8
6e7add8
ba4da7d
826b37b
7a97d58
79f8d2d
28133e7
41a471b
13a3b38
aecf28d
50236bb
622733a
1ccaade
ec560f6
ee8f2e5
226023d
2b6a1b0
ddfcc96
6ac6dcd
cb70c1c
e54b84d
e61460b
a4234c3
76758b5
3f0252e
c3231d6
ddb5ddf
f5d1579
e804998
6466230
bff1ca8
0f73e29
bff8dfe
be7b477
27ced68
751c31b
270fa74
acfd32f
2424821
fe0b918
5a88200
338bdeb
8d98307
229775f
115c81e
f5ba82f
d065522
cdb455b
b0f6073
546ce30
d29b2f5
1953c95
8b17786
3fc6d68
6eddb7f
887dae1
4a011ef
b908c2c
3b4d5ee
4972114
ac0d77b
a8a3384
b966ce8
928cf62
f089e2b
565f0cc
7c562cf
f01b39a
7034c1f
35d90a3
e1d58cc
54a70f7
da590c2
c610420
a59f2bb
53fb303
0fbd0f4
ec9b091
483b7d6
6c8a717
7640d22
b51d82b
81b975e
15646f0
08b26e7
12431c9
fe3fe99
8f02215
d5b1cb4
b27951c
e23bd87
7414c57
c6bb9b4
d3fd4e2
36a6895
87e09be
0ce4b87
44050ab
c974e4f
e0f38db
0ca95b6
a7572ab
7807a14
16e6d89
f1b39cb
2a2367b
a2abcff
da8bbb8
6112202
8ff3dbd
e236957
b102ad0
b140fab
7dc9931
951b743
dee97a9
3054d33
eeb9b61
ea9c3bc
6aa5dcc
ed42063
ead47c4
b875594
4eb0576
3716954
d0a21ce
43af464
da84b84
c263385
9846ed6
58a59ef
07aa409
65cbef7
5c8c03c
1daf1ce
6a76eeb
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 | ||
META-INF/MANIFEST.MF |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,233 @@ | ||
--- | ||
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. Maybe the use of short code snippets in the DG would be good for users to improve their understanding. |
||
layout: default | ||
title: Developer Guide | ||
--- | ||
* Table of Contents | ||
{:toc} | ||
|
||
-------------------------------------------------------------------------------------------------------------------- | ||
|
||
# Developer Guide | ||
|
||
## Acknowledgements | ||
|
||
{list here sources of all reused/adapted ideas, code, documentation, and third-party libraries -- include links to the original source as well} | ||
|
||
References | ||
1. Developer Guide: https://se-education.org/addressbook-level3/DeveloperGuide.html | ||
2. User Guide: https://se-education.org/addressbook-level3/UserGuide.html | ||
3. | ||
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. Perhaps could remove point 3. |
||
|
||
## Design & implementation | ||
|
||
## Design | ||
|
||
### Architecture | ||
|
||
<img src="images/ArchitectureDiagram.png" width="280" /> | ||
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 architecture diagram hyperlink does not seem to work 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. Unable to see image of the architecture diagram 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 ***Architecture Diagram*** given above explains the high-level design of the App. | ||
|
||
Given below is a quick overview of main components and how they interact with each other. | ||
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. Perhaps a sequence diagram could show how all the components interact with each other? |
||
|
||
**Main components of the architecture** | ||
|
||
### UI component | ||
|
||
### Logic component | ||
|
||
### Model component | ||
|
||
### Storage component | ||
|
||
In this application, it uses text files to store all data, i.e, recipes and ingredients. | ||
|
||
|
||
When booting up the application, `restoreSavedData` will be called to get both recipes and ingredients | ||
from the previous session. | ||
|
||
<img src="images/RestoreIngredientStorageSequenceDiagram.png" width="347" /> | ||
<img src="images/RestoreRecipeStorageSequenceDiagram.png" width="347" /> | ||
|
||
When a user exits the application, `saveData` will be called and it will convert all data from recipes and | ||
ingredients into a string which will be put in their own respective text files. | ||
|
||
<img src="images/StoreIngredientStorageSequenceDiagram.png" width="525" /> | ||
<img src="images/StoreRecipeStorageSequenceDiagram.png" width="706" /> | ||
|
||
|
||
## Implementation | ||
### Help Feature | ||
The help feature is facilitated by the `HelpCommand` class. By calling `executeCommand` on the class, it will invoke the `Ui` class to print the user help commands. | ||
|
||
|
||
- **Step 1** | ||
|
||
Input will be sent from the main `EssenMakanan` class to the `Parser` to identify the command type | ||
|
||
|
||
- **Step 2** | ||
|
||
A new `HelpCommand` object will be created and will be sent back to main | ||
|
||
|
||
- **Step 3** | ||
|
||
`commandObject#executeCommand()` will be called which in turn calls `Ui#showCommands()` | ||
|
||
|
||
- **Step 4** | ||
|
||
Finally `Ui#showCommands()` will call `Ui#showRecipeCommands()`, `Ui#showIngredientCommands()`, `Ui#showOtherCommands()` to print all commands for recipe, ingredient and others respectively | ||
Comment on lines
+127
to
+144
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. I like how you described the command step by step 👍 |
||
|
||
|
||
<img src="images/HelpFunctionSequenceDiagram.png" width="732" /> | ||
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. |
||
|
||
### Exit feature | ||
The help feature is facilitated by the `ExitCommand` class. By calling `executeCommand` on the class, it will invoke the `Ui` class to print the exit command. | ||
|
||
- **Step 1** | ||
|
||
Input will be sent from the main `EssenMakanan` class to the `Parser` to identify the command type | ||
|
||
|
||
- **Step 2** | ||
|
||
A new `ExitCommand` object will be created and will be sent back to main | ||
|
||
|
||
- **Step 3** | ||
|
||
`commandObject#executeCommand()` will be called which in turn calls `Ui#showCommands()` | ||
|
||
|
||
- **Step 4** | ||
|
||
Finally `Ui#showCommands()` will print the exit message | ||
|
||
|
||
<img src="images/ExitSequenceDiagram.png" width="571" /> | ||
|
||
|
||
### Add Recipe feature | ||
|
||
The add recipe feature is facilitated by the `AddRecipeCommand` class. By calling `executeCommand` on the class, the steps will | ||
be executed as follows: | ||
- **Step1** | ||
|
||
`AddRecipeCommand` will parse the recipe title using `RecipeParser`. Then, it will return the recipe title. | ||
|
||
|
||
- **Step2** | ||
|
||
`AddRecipeCommand` will create a new `Recipe` with the obtained title. | ||
|
||
|
||
- **Step3** | ||
|
||
`AddRecipeCommand` will add newly created `Recipe` into `RecipeList`. Then, the recipe will be added into an | ||
`ArrayList` inside `RecipeList`. | ||
|
||
|
||
- **Step4** | ||
|
||
`AddRecipeCommand` will call `Ui` class to print out the title of the recently added recipe. | ||
Comment on lines
+179
to
+197
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. Maybe for the addRecipeCommand, you can consider explaining how the title parsing and RecipeList work in more detail. Provide a step-by-step breakdown of the process, including the role of RecipeParser and RecipeList. |
||
|
||
<img src="images/AddNewRecipeSequenceDiagram.png" width="963" /> | ||
|
||
### View Ingredients feature | ||
The view ingredient feature is facilitated by the `ViewIngredientCommand` class. Users can input | ||
"view i" to trigger this command. Users will then be able to see all ingredients stored. | ||
Example: | ||
|
||
`1. bread: 2pcs` | ||
|
||
`2. apple: 500g` | ||
|
||
`...` | ||
|
||
- **Step 1** | ||
|
||
Input will be sent from the main `EssenMakanan` class to the `Parser` to identify the command type. | ||
|
||
|
||
- **Step 2** | ||
|
||
A new `ViewIngredientCommand` object will be created and will be sent back to main | ||
|
||
|
||
- **Step 3** | ||
|
||
`commandObject#executeCommand()` will be called which in turn calls `Ui#printAllIngredients()` | ||
|
||
|
||
- **Step 4** | ||
|
||
Finally `Ui#printAllIngredients()` will call `IngredientList#listIngredients()` to print all the ingredients | ||
to standard output | ||
|
||
|
||
<img src="images/ViewAllIngredientSequenceDiagram.png" width="967" /> | ||
|
||
### View Recipes feature | ||
The view recipes feature is facilitated by the `ViewRecipeCommand` class. Users can input | ||
"view r" to trigger this command | ||
|
||
* **Step 1** | ||
|
||
Input will be sent from the main `EssenMakanan` class to the `Parser` to identify the command type. | ||
|
||
* **Step 2** | ||
|
||
A new `ViewRecipeCommand` object will be created and will be sent back to main | ||
|
||
* **Step 3** | ||
|
||
`commandObject#executeCommand()` will be called which in turn calls `Ui#printAllRecipes()` | ||
|
||
* **Step 4** | ||
|
||
Finally, `RecipeList#listRecipeTitles()` will be called to print all the ingredients | ||
to standard output | ||
|
||
<img src="images/ViewAllRecipeSequenceDiagram.png" width="862" /> | ||
|
||
### Add Ingredient feature | ||
|
||
The add Ingredient feature is used by a `AddIngredientCommand` class. | ||
Multiple ingredients can be added at the same time using the syntax | ||
`add i/NAME,QUANTITY,UNIT i/INGREDIENT2,.. i/INGREDIENT3...` | ||
|
||
By calling `executeCommand` on the class, the steps will | ||
be executed as follows: | ||
* **Step1** | ||
|
||
`AddIngredientCommand` will use the "split" method of `String` to get an array of the descriptions of ingredients | ||
and iterate all the elements in this array | ||
|
||
|
||
* **Step2** | ||
|
||
`AddIngredientCommand` will get a new `Ingredient` by invoking the method "parseIngredient" of `IngredientParser` | ||
for each element of the obtained array | ||
|
||
|
||
* **Step3** | ||
|
||
`AddIngredientCommand` will add this `Ingredient` into `IngredientList`. Then, the ingredient will be added into an | ||
`ArrayList` inside `IngredientList`. | ||
|
||
|
||
* **Step4** | ||
|
||
`AddIngredientCommand` will call `Ui` class to print out the name of the recently added ingredient. | ||
|
||
<img src="images/AddNewIngredientSequenceDiagram.png" width="1676" /> | ||
|
||
|
||
### Delete feature | ||
|
||
|
||
{Describe the design and implementation of the product. Use UML diagrams and short code snippets where applicable.} | ||
|
||
|
||
|
@@ -14,25 +236,37 @@ | |
|
||
{Describe the target user profile} | ||
|
||
This product is for people who share kitchen space and ingredients with other cooks. | ||
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 target user profile could be more descriptive. |
||
|
||
|
||
### Value proposition | ||
|
||
{Describe the value proposition: what problem does it solve?} | ||
|
||
Easy and intuitive way to keep track of ingredients you have in your kitchen. This helps avoid buying duplicated ingredients, reminds you of the ingredients you need, and gives a visualisation of the recipe timeline to ensure that advance preparation is done in time, eg marinating. | ||
|
||
|
||
## 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 | beginner user | see all recipes | learn and try all recipes | | ||
| v1.0 | beginner user | add new recipes into the list | learn and try out new recipes | | ||
| v1.0 | beginner user | see all ingredient I have | | | ||
| v1.0 | beginner user | add ingredients to the empty list | add an item to my kitchen inventory | | ||
| v2.0a | amateur | delete some recipes | remove a recipe that I no longer want to use | | ||
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. Perhaps could add more user stories for later versions |
||
|
||
## Non-Functional Requirements | ||
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. Maybe you can include a section or subsection on error handling to make the user understand. Explain how errors or exceptional cases are handled in the application. This can include user input validation, error messages, and how developers can handle exceptions in their code. |
||
|
||
{Give non-functional requirements} | ||
1. Should work on any mainstream OS as long as it has Java 11 or above installed. | ||
2. Should be able to hold up to 1000 recipes and ingredients without a noticeable sluggishness in performance for typical usage. | ||
3. A user with above average typing speed for regular English text (i.e. not code, not system admin commands) should be able to accomplish most of the tasks faster using commands than using the mouse. | ||
|
||
## Glossary | ||
|
||
* *glossary item* - Definition | ||
- Mainstream OS: Windows, Linux, Unix, OS-X | ||
|
||
## Instructions for manual testing | ||
|
||
## Instructions for manual testing | ||
{Give instructions on how to do a manual product testing e.g., how to load sample data to be used for testing} |
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.
There can possibly be use of different types of UML diagrams instead of just one type.
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.
methods in class diagrams also have many attributes and methods, maybe can remove irrelevant methods/attributes to improve readability