Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

(a) This is tomorrow's FIU lunch menu at PROLOG restaurant: Starters green salad melon tomato salad rabbit pate Main dishes rock salmon with mayonnaise and

image text in transcribed

(a) This is tomorrow's FIU lunch menu at PROLOG restaurant: Starters green salad melon tomato salad rabbit pate Main dishes rock salmon with mayonnaise and capers roast beef with mushroom sauce pasta, courgette and cheese bake Desert cheese yoghurt Montreal Brest pastry You are allowed to take one starter, one main dish, and one desert. Use the predicates starter/1, main/1, and desert/1 to represent tomorrow's options in PROLOG (b) If you are very hungry, you can have one starter, one main dish, and one desert. If you are not so hungry, you might want to only have a starter and a main dish or a desert and a main dish. If you are currently on a diet, it's probably wisest to only take a starter. Define a predicate menu/4 which finds menus for you depending on whether you are hungry, not so hungry or on a diet. So, menu(Status,X,Y,Z) should be true if Status is hungry and X, Y, Z are a starter, a main dish, and a desert, respectively. It should also be true if Status is not_so_hungry, and either X is a starter, Y a main dish, and Z is nothing, or X is nothing, Y is a main dish, and Z is a desert. Finally, menu(Status,X,Y,Z) should be true if Status is on_diet, X is a starter and Y and Z are nothing

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Beginning PostgreSQL On The Cloud Simplifying Database As A Service On Cloud Platforms

Authors: Baji Shaik ,Avinash Vallarapu

1st Edition

1484234464, 978-1484234464

More Books

Students also viewed these Databases questions

Question

How can the Internet be helpful in a job search? (Objective 2)

Answered: 1 week ago