Question: Don't change the original menu passed into the function! Java ASAP! 11. You are opening a restaurant in the hippest part of Brooklyn, NY. You

 Don't change the original menu passed into the function! Java ASAP!

Don't change the original menu passed into the function!

Java ASAP!

11. You are opening a restaurant in the hippest part of Brooklyn, NY. You will be serving all of the best foods like gluten-free avocado toast, acai bowls, and non-fat soy pumpkin-spiced lattes. You decide it would be a good idea to make a mobile app that is a customizable menu to your customers. As part of this application, you need to make a method Map> personalize (Map> menu, Set forbidden). This method takes in the original menu as a map from a String representing the dish name, to a Set representing the ingredients in that dish. Your job is to return a new menu as a map with only the dishes that suit a particular customer's dietary wishes. Also passed in as a parameter will be a Set containing all of the ingredients that the customer would not eat. For instance, if the method received the string Gluten in the 'forbidden' argument, you would want to return a new map which only has dishes which do not include the string 'Gluten' in the ingredients list. 11. You are opening a restaurant in the hippest part of Brooklyn, NY. You will be serving all of the best foods like gluten-free avocado toast, acai bowls, and non-fat soy pumpkin-spiced lattes. You decide it would be a good idea to make a mobile app that is a customizable menu to your customers. As part of this application, you need to make a method Map> personalize (Map> menu, Set forbidden). This method takes in the original menu as a map from a String representing the dish name, to a Set representing the ingredients in that dish. Your job is to return a new menu as a map with only the dishes that suit a particular customer's dietary wishes. Also passed in as a parameter will be a Set containing all of the ingredients that the customer would not eat. For instance, if the method received the string Gluten in the 'forbidden' argument, you would want to return a new map which only has dishes which do not include the string 'Gluten' in the ingredients list

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!