From 7f2267a3813bd0cbe08f80257d03567fc679d511 Mon Sep 17 00:00:00 2001 From: Zeno-Zr Date: Tue, 28 Mar 2023 15:44:00 +0800 Subject: [PATCH] Update UserGuide with Dish commands Adding the following commands allows us to fulfil Week 11's requirements * Update UserGuide with Add, view, delete and find dish commands * Update summary table with dish commands --- docs/UserGuide.md | 86 +++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 75 insertions(+), 11 deletions(-) diff --git a/docs/UserGuide.md b/docs/UserGuide.md index 1910c37195..c2e229fc09 100644 --- a/docs/UserGuide.md +++ b/docs/UserGuide.md @@ -70,6 +70,8 @@ View the deadline list. Format: `view_deadline` +Note: The price of dishes will be shown in dollars. + #### Delete a deadline: Format: `delete_deadline n/` @@ -80,30 +82,87 @@ Example: delete_deadline n/need to buy more potatoes ``` -### Menu +### Dish -#### Add a recipe to the menu: +#### Add a Dish to the list of dishes: -Successfully adds menu only if the name is unique, otherwise it informs the user to key in a unique menu name +Successfully adds Dish only if all the arguments are correct. -Format: `add_recipe n/` +Format: `add_dish n/ pc/ [;; ... etc]` -Example: +- Name of dish cannot be blank or start with spaces, it also cannot contain only spaces. +- Price of dish must be an non negative integer value; i.e.: Price cannot be negative, in decimal, etc. +- Ingredient list is encased betwen two square brackets and separated by a semi-colon. The ingredient list can contain any non negative number of items. + +Example 1: +``` +add_dish n/Chicken Burger pc/1099 [tomatoes;chicken fillet;cheese;bread with sesame seeds] ``` -add_recipe n/Chicken rice +Outcome 1: ``` +. Chicken Burger; $10.99; [tomatoes, chicken fillet, cheese, bread with sesame seeds] +``` +You can also omit the ingredient list like such: -#### View the list of recipes: +Example 2: +``` +add_dish n/Chicken Burger pc/1099 [] +``` +Outcome 2: +``` +. Chicken Burger; $10.99; [] +``` + +#### View the list of dishes added: + +It shows the list of dishes currently stored in the program in order. + +- The price of dishes are shown in dollars. -Format: `view_recipe` +Format: `view_dish` -#### Delete a recipe from the menu: +#### Delete a dish from the list of dishes: -Format: `delete_recipe n/` +Deletes the dish in the list based on the index given, if a dish exists at that index. + +Format: `delete_dish ` Example: + +Supposed that we have the following list of dishes: +``` +1. Chicken Burger; $4.99; [tomatoes, chicken fillet, cheese, bread with sesame seeds] +2. McSpicy Burger; $8.99; [tomatoes, chicken fillet, cheese, bread with sesame seeds] ``` -delete_recipe n/Chicken rice +When the `delete_recipe 1` is entered as a command: + +Outcome: +``` +1. McSpicy Burger; $8.99; [tomatoes, chicken fillet, cheese, bread with sesame seeds] +``` +#### Find dishes containing a keyword from the list of dishes + +Finds a list of dishes containing a given keyword, if any at all. + +Format: `find_dish ` + +- The keyword cannot contain any spaces. +- Only 1 keyword can be entered per find_dish command. + +Example: + +Supposed we have the following list of dishes: + +``` +1. McSpicy Burger; $8.99; [tomatoes, chicken fillet, cheese, bread with sesame seeds] +2. Chicken Burger; $10.99; [tomatoes, chicken fillet, cheese, bread with sesame seeds] +``` +When `find_dish Chicken` is entered in as a command: + +Outcome: + +``` +2. Chicken Burger; $10.99; [tomatoes, chicken fillet, cheese, bread with sesame seeds] ``` ### Workers @@ -152,5 +211,10 @@ delete_worker n/Patrick Parker | view_meetings | view_meetings | | delete_meeting | delete_meeting n/ | | find_meeting | find_meeting s/ | +| add_dish | `add_dish n/ pc/ [;; ... etc]` | +| view_dish | `view_dish` | +| delete_dish | `delete_dish ` | +| find_dish | `find_dish ` | +