logo Hurry, Grab up to 30% discount on the entire course
Order Now logo

Ask This Question To Be Solved By Our ExpertsGet A+ Grade Solution Guaranteed

expert
Patrick GrahamEnglish
(5/5)

701 Answers

Hire Me
expert
Gayle ThomasManagement
(5/5)

977 Answers

Hire Me
expert
Pierree BernierCriminology
(5/5)

559 Answers

Hire Me
expert
B. BavadhariniMarketing
(/5)

617 Answers

Hire Me
Mathematics
(5/5)

give an example of a query that yields a list of menu items and its ingredients for a specific restaurant.

INSTRUCTIONS TO CANDIDATES
ANSWER ALL QUESTIONS

In this program, you will write Prolog code for a restaurant database of a certain geographic area. Select at least 2 different types of restaurants, such as Mexican, Pizza, or Seafood. Among these types, select at least 3 different restaurants with similar menu options that exist in a certain geographic area.

1. Write the predicate fact type that includes each restaurant’s name and the food type.

2. Write the predicate fact restaurant that includes each restaurant’s name and a list of menu items. Make sure to include at least 4 menu items. Write each menu item in the list as a predicate fact with the menu name, a list of ingredients, and the cost of the item. For example, a predicate fact for the menu item: salad(cobb, [lettuce, tomato, egg, blueCheese], 8.99).

3. Write the predicate rule menu(X, Y) in which store X has Y on the menu.

4. Write the predicate rule item(X, Y, Z) in which store X has item Y with ingredient Z. 5. Write the predicate rule cost(X, Y, Z) in which store X has drink Y with cost Z. Answer the following questions:

1. Give an example of a query that yields a list of restaurants of a certain food type.

2. Give an example of a query that yields a list of restaurants of a certain menu item.

3. Give an example of a query that yields a list of restaurants with menu items for a specific ingredient. That is, which restaurants and menu items have cheese as an ingredient?

4. Give an example of a query that yields a list of menu items and its ingredients for a specific restaurant.

5. Give an example of a query that yields a list of menu items with the cost for a specific restaurant.

(5/5)
Attachments:

Related Questions

. The fundamental operations of create, read, update, and delete (CRUD) in either Python or Java

CS 340 Milestone One Guidelines and Rubric  Overview: For this assignment, you will implement the fundamental operations of create, read, update,

. Develop a program to emulate a purchase transaction at a retail store. This  program will have two classes, a LineItem class and a Transaction class

Retail Transaction Programming Project  Project Requirements:  Develop a program to emulate a purchase transaction at a retail store. This

. The following program contains five errors. Identify the errors and fix them

7COM1028   Secure Systems Programming   Referral Coursework: Secure

. Accepts the following from a user: Item Name Item Quantity Item Price Allows the user to create a file to store the sales receipt contents

Create a GUI program that:Accepts the following from a user:Item NameItem QuantityItem PriceAllows the user to create a file to store the sales receip

. The final project will encompass developing a web service using a software stack and implementing an industry-standard interface. Regardless of whether you choose to pursue application development goals as a pure developer or as a software engineer

CS 340 Final Project Guidelines and Rubric  Overview The final project will encompass developing a web service using a software stack and impleme