-
Notifications
You must be signed in to change notification settings - Fork 248
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-F13-1] Taste of Mom's #49
base: master
Are you sure you want to change the base?
Changes from 214 commits
8dd61fa
82feaef
1529e90
38f0529
ae028cb
ad1a983
d5bfaeb
4b7abc5
758a79e
287f24d
d167880
dbcd99f
1a7f3a4
698397e
268fd28
ff3d52b
4ba790f
13291d7
043e560
bdd960a
76007db
d00512d
1b37db9
4705697
dd4a982
05ca1b2
e2a9086
58b84c4
b1be50e
3eb93bd
7bb8873
36fbe83
dfcac8f
919a5e1
2dfd149
ac3d9cc
a4d587d
7ee5bab
b8c9270
de264d5
365cbb7
85ffe83
300f81a
179f4ef
ed62516
8f8fdf8
800a002
bc967d9
117a8e8
8041ae2
d890a29
85e7fd7
9648606
86dc042
1b0c6f4
e6e4e7d
c50fd56
1db9fe9
f05b702
836e0f0
172c00a
7b35d47
5cf324b
831c2d2
859ea19
a0e31c8
a876329
55c5d8d
ebc4a4b
dfdf60c
4f2fe86
7d6ec59
d7db903
3491691
6467134
c62b1fe
d3bb227
1586b22
f313b49
5ee679e
4930203
42f3e93
c9e3f03
51b8636
cd3dfad
3da840d
b49edbf
ddcd67a
51edb7e
48816b5
c3c6bf4
c1051cd
d1c0e8f
85ad2f5
7464c50
9184b25
77c3992
115821b
4fbc445
ddf3c1c
c9ee317
96a710a
ae72cfa
476bce1
bd9ffe4
cbe6f1b
601ad17
b86a2e9
53db7a2
3e5d857
9ed0bb9
7131d86
77948d1
2964580
d7bd894
6d0e378
ba5ceb7
f3e277f
cf3dee9
e333c3c
d734a7d
90ee126
fcb985e
b539f58
b952884
4730087
0afbb62
c24f670
3de54d5
ec98a81
43ee87c
11bbbe6
8ccea7b
75c2d52
d00c126
f8ab184
84aa7e8
b2f2ff4
63a42a2
cf639ab
2690ffd
1842fcc
5224c1c
dc75167
1d30f73
7926fd2
2c160b2
01280ec
4f40b20
02eb44c
7bde6e4
227b8ed
40ee966
04c15de
d121f14
b1256fe
0b67ab2
89def7d
124e636
deda078
3ea0289
fdbce9b
5260efd
a518844
605a8a6
f4ad9fb
05850c0
bf88789
9fd2639
fa76281
85cbdd0
374f514
9b213b9
00e38c7
59c3b43
cbd0d72
9540501
d4466cc
f1f90e8
5590a68
93de60d
39062f4
ca4c7af
adcb7f7
d222ce6
3da2537
e3bcc06
04d4c94
1b29b0e
db6ca78
5f9f0c4
0963ac9
70369ce
ad527d1
551ee0a
48bafb7
3053042
996cdcb
03d1350
423b582
c2b588a
6a31b6a
f2385db
3287077
164cd90
ad315e0
3dae67b
ebfe01e
f573770
5ba4ccb
8a68cba
7bfbb77
e6834ba
5320d42
2fd5b02
e2a17ba
933d3c7
6abbe77
9b002bf
7faf7a6
a6c94ac
15ee28b
7a873fd
bbdb20c
b71c052
2982656
ce3e9f4
7cb803d
8263c28
cc032cd
ef76dd8
91ef522
dba1b33
62c1317
8b06c76
2874a6a
548bd7d
eb4f05c
6677071
5550e66
8924ab7
b43792c
aedeef7
79fd1cb
1ff4e21
8ebb4bb
f3fd69d
daadd13
71ab057
197e200
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Manifest-Version: 1.0 | ||
Main-Class: seedu.duke.Duke | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
Hotpot | ||
Chinese | ||
Ingredient list | ||
Beef | ||
Porken | ||
Carrots | ||
Step list | ||
chop beef | ||
burn food | ||
eat food |
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) | 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) | ||
|Display | Name | Github Profile | Portfolio | | ||
|--------|:----------------:|:--------------:|:---------:| | ||
|![](https://via.placeholder.com/100.png?text=Photo) | Leong Yat Pang | [Github](https://github.com/YatPang) | [Portfolio](team/leongyatpang.md)| | ||
|![](https://via.placeholder.com/100.png?text=Photo) | Lim Hong Yao | [Github](http://github.com/LimHongYao) | [Portfolio](team/limhongyao.md)| | ||
|![](https://via.placeholder.com/100.png?text=Photo) | Aung Phone Naing | [Github](https://github.com/Aung-Phone-Naing) | [Portfolio](team/aungphonenaing.md)| | ||
|![](https://via.placeholder.com/100.png?text=Photo) | Liu Ziyang | [Github](https://github.com/liuziyang020319) | [Portfolio](team/liuziyang.md)| | ||
|
Large diffs are not rendered by default.
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 dotted line (delete 1) between UI and Duke seems a little ambiguous. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
@startuml ArchitectureInteract | ||
box Manager #White | ||
Actor User #Blue | ||
participant ":UI" as UI #Gray | ||
participant ":Duke" as Duke #Gold | ||
participant ":Parser" as Parser #Yellow | ||
participant ":Command" as Command #Beige | ||
participant ":RecipeList" as RecipeList #OrangeRed | ||
participant ":Storage" as Storage #DimGray | ||
end box | ||
|
||
activate Duke #Gold | ||
Duke -> UI : readCommand() | ||
activate UI #Gray | ||
User -> UI : delete 1 | ||
UI --> Duke : delete 1 | ||
Duke -> Parser : parseCommand(delete 1) | ||
activate Parser #Yellow | ||
Parser --> Duke | ||
deactivate Parser | ||
Duke -> Command : execute(delete,1) | ||
activate Command #Beige | ||
Command -> RecipeList : delete(1) | ||
activate RecipeList #OrangeRed | ||
RecipeList -> Storage | ||
activate Storage #DimGray | ||
Storage -> Storage : save() | ||
activate Storage | ||
Storage --> Storage | ||
deactivate Storage | ||
Storage --> RecipeList | ||
deactivate Storage | ||
RecipeList --> Command | ||
deactivate RecipeList | ||
Command --> Duke | ||
deactivate Command | ||
@enduml |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
@startuml | ||
|
||
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. A common problem among all groups including mine is to have the little icons. You can add:
to remove them and follow the recommended format. |
||
class Command implements StringLib { | ||
- type: CommandType | ||
- fullDescription: String | ||
+ isExit(): boolean | ||
+ execute(recipeList: RecipeList, ui: UI): void | ||
} | ||
|
||
enum CommandType { | ||
LIST | ||
ADD | ||
DELETE | ||
FIND | ||
CLEAR | ||
VIEW | ||
HELP | ||
EXIT | ||
UNKNOWN | ||
} | ||
|
||
Command --> CommandType | ||
IncompleteInputException --|> Exceptions : extends | ||
Command ..> IncompleteInputException : uses | ||
|
||
@enduml |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
@startuml Recipe Find | ||
box Find #White | ||
Actor User | ||
participant ":UI" as UI | ||
participant ":Duke" as Duke | ||
participant ":Parser" as Parser | ||
participant ":Command" as Command | ||
participant ":RecipeList" as RecipeList | ||
end box | ||
activate Duke | ||
Duke -> UI : "readCommand()" | ||
activate UI | ||
User -> UI : "Find MaLaXiangGuo" | ||
UI --> Duke | ||
deactivate UI | ||
Duke -> Parser : "parseCommand()" | ||
activate Parser | ||
Parser --> Duke | ||
deactivate Parser | ||
Duke -> Command : "execute()" | ||
activate Command | ||
Command -> RecipeList : "searchRecipeList()" | ||
activate RecipeList | ||
RecipeList -> UI : show recipe with index | ||
activate UI | ||
UI --> RecipeList | ||
deactivate UI | ||
RecipeList --> Command | ||
deactivate RecipeList | ||
Command --> Duke | ||
deactivate Command | ||
|
||
|
||
@enduml |
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. Quotation marks around functions can be removed. I also like the mindful deletion of only the :Command object as the other classes will continue to be used in other functions, while the :Command object will no longer be used. 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. Since the HELP message shown does not require any further user input, consider changing it to a dotted line. The UI can be shifted to the rightmost portion of the sequence diagram since it is only used after Command. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
@startuml Help | ||
box Manager #White | ||
Actor User | ||
|
||
participant ":UI" as UI | ||
participant ":Duke" as Duke | ||
participant ":Parser" as Parser | ||
participant ":Command" as Command1 | ||
end box | ||
|
||
activate Duke | ||
|
||
User -> Duke : "help" | ||
Duke -> Parser : "parseCommand()" | ||
activate Parser | ||
Parser --> Duke | ||
deactivate Parser | ||
Duke -> Command1 : "execute()" | ||
activate Command1 | ||
Command1 -> UI : "showHelp()" | ||
activate UI | ||
UI -> User : HELP message shown | ||
UI --> Command1 | ||
deactivate UI | ||
Command1 --> Duke | ||
deactivate Command1 | ||
Duke -> Command1 : delete | ||
destroy Command1 | ||
|
||
|
||
@enduml |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
@startuml MainArchitecture | ||
|
||
archimate #Technology "User" as User <<technology-device>> | ||
archimate #Technology "Data" as Data <<application-data-object>> | ||
|
||
|
||
rectangle RM { | ||
rectangle UI | ||
rectangle Duke | ||
rectangle Parser | ||
rectangle Storage | ||
rectangle RecipeList | ||
rectangle Command | ||
User -down.> UI | ||
Storage .> Data | ||
Duke -up-> UI | ||
Duke -> Command | ||
Command -> RecipeList | ||
Duke -up-> Parser | ||
Storage -up-> RecipeList | ||
} | ||
@enduml |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
@startuml ParserComponent | ||
|
||
class Parser implements StringLib { | ||
+parseCommands(line: String): Command | ||
+parseRecipe(description: String): ArrayList<String> | ||
-matchString(input: String, regex: String): boolean | ||
-RECIPE_WRONG_NAME_INGREDIENTS_TAG_STEP: String | ||
-RECIPE_MISSING_NAME: String | ||
-RECIPE_MISSING_INGREDIENTS: String | ||
-RECIPE_MISSING_TAG: String | ||
-RECIPE_MISSING_STEP: String | ||
} | ||
|
||
class IncompleteInputException { | ||
} | ||
|
||
class Exceptions { | ||
} | ||
|
||
IncompleteInputException --|> Exceptions : extends | ||
Parser ..> IncompleteInputException : uses | ||
|
||
@enduml |
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. Can the multiplicity of Step be specified? If it can, then it would be good to indicate. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
@startuml | ||
'https://plantuml.com/sequence-diagram | ||
|
||
class RecipeList { | ||
- recipeList:ArrayList<Recipe> | ||
- currRecipeNumber: int | ||
+ getRecipeList(): ArrayList<Recipe> | ||
+ getCurrRecipeNumber(): int | ||
+ getRecipeFromList(itemNum:int): Recipe | ||
+ getNewestRecipe(): Recipe | ||
+ addNewRecipe(recipe: Recipe) | ||
+ removeRecipe(index: int) | ||
+ clearRecipeList() | ||
} | ||
class Recipe { | ||
- ingredientList: IngredientList | ||
- stepList: StepList | ||
- name: String | ||
- tag: String | ||
+ getIngredientList(): IngredientList | ||
+ getStepList(): StepList | ||
+ getName(): Name | ||
+ getTag(): String | ||
+ toString(): String | ||
} | ||
|
||
class IngredientList { | ||
- list: ArrayList<Ingredient> | ||
- currIngredientNumber: int | ||
+ getCurrIngredientNumber(): int | ||
+ addIngredient(item: Ingredient) | ||
+ removeIngredient(index: int) | ||
+ showList() | ||
+ getList(): ArrayList<Ingredient> | ||
} | ||
|
||
class Ingredient { | ||
- name: String | ||
+ getName(): String | ||
|
||
} | ||
|
||
class StepList { | ||
- stepList: ArrayList<Step> | ||
- currStepNumber: int | ||
+ addStep(step: Step) | ||
+ removeStep(stepIndex: int) | ||
+ showStepList() | ||
+ getList(): ArrayList<Step> | ||
} | ||
|
||
class Step { | ||
- description: String | ||
+ getStep(): String | ||
+ toString(): String | ||
} | ||
class RecipeListEmptyError { | ||
} | ||
class Exceptions { | ||
} | ||
RecipeList -> "*" Recipe : stores > | ||
Recipe -> "1" IngredientList : contains > | ||
Recipe --> "1" StepList : contains > | ||
IngredientList --> Ingredient : stores > | ||
StepList --> Step : stores > | ||
RecipeList ..> RecipeListEmptyError : uses | ||
RecipeListEmptyError --|> Exceptions : extends | ||
@enduml |
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 how an example of just one command is given (
delete 1
) as it helps to understand the general flow of the program while keeping the diagram simple and readable. This is provided thatdelete 1
is the most exhaustive example that shows the most classes involved.