The predicate recipe, so is rice (or chicken) dish and the second argument is a list of ingredients needed to cook the dish.
Information
After defining the database (and added some recipes), you will write two predicates:
First Cook (X) provides an answer to what can be repaired by the ingredients available at home.
The question can also be "Can I cook dish X". Responses should be the various options available to cook.
Second buy (X, L), the quantities of different ingredients that must be purchased in order to cook the dish x.
The program shall gather Required ingredients and quantities in the list L. The question must also be able to buy (X, L). which shall enumerate (with ';') all known recipes and what needs to be purchased in order to cook them.
A possible solution to buy (Rice, L), from the above example, can be: L = [ingredient (rice, 2), ingredient (salt, 3)]
It is appropriate to break down and preached in the sub-tasks as using predicates can take care of. Examples of such may be (but there are more ways to divide the problem): at_home (Type, Amount): talking about how much it is home of the ingredient type. need_to_buy (Needed, BuyList): creates a shopping list (BuyList) given a list of the essential ingredients (Needed). Since both the cook and buy to enumerate solutions should be the declarative predicate
1
Expert's answer
2011-11-03T11:07:23-0400
Unfortunately, your question requires a lot of work and cannot be done for free. Submit it with all requirements as an assignment to our control panel and we'll assist you.
Numbers and figures are an essential part of our world, necessary for almost everything we do every day. As important…
APPROVED BY CLIENTS
Finding a professional expert in "partial differential equations" in the advanced level is difficult.
You can find this expert in "Assignmentexpert.com" with confidence.
Exceptional experts! I appreciate your help. God bless you!
Comments
Leave a comment