General
Material
Lecture 1
 Slides Practical Session
Lecture 2
 Slides Practical Session
Lecture 3
 Slides Practical Session
Lecture 4
 Slides Practical Session
Lecture 5
 Slides Practical Session

# Tomorrow's lunch

Starters
melon
rabbit pate
Main dishes
rock salmon with mayonnaise and capers
roast beef with girolle mushroom sauce
pasta, courgette and cheese bake
Desert
cheese
yoghurt
Paris 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.
Solution

If you are very hungry, you can have one starter, one main dish, and one desert. If you are not so hungry (or have a course right after lunch), 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`.
Hint