Language: C++For this program, you are to write a program in
Language: C++For this program, you are to write a program in PROLOG to solve the following logic problem. Note that ‘adjacent to’ or ‘neighbor’ may be on the left or the right unless other constraints dictate otherwise. And of course, the neighbor relation is symmetric. If A is a neighbor of B, then B is a neighbor of A.A college dorm hallway has 5 1-person rooms. Each resident is a different major, listens to a different style of music, drives a different make of car, has a different favorite sports team, and a different favorite beverage.The computer science student lives in the middle of the corridorThe history major is a jazz fan. The Yankees fan drives a Toyota. The accounting major drinks Coke. The engineering major drinks coffee. The computer science student and history student are neighbors. The student at the far end of the hall likes classical music The tea drinker drives a Tesla. The classical music fan lives next to the jazz listener. The English major does not live in either of the first two rooms. The Royals fan drives a Tesla. The Cubs fan listens to jazz. The engineering major follows the ChiefsThe first room is the home of the Broncos fanThe Coke drinker drives a Nissan. The country music fan and the techno fan are neighbors. The accounting major lives in the first room. The fans of the 2 Kansas City teams (Chiefs and Royals) are neighborsThe accounting major listens to rock musicThe Yankees fan drinks milk. The Chevy driver listens to country music. The jazz fan drives a Ford.What music does the computer-science student listen to, and what does the English major drink?Summary:Majors: Accounting, computer science, engineering, history, EnglishCars: Ford, Chevy, Nissan, Toyota, TeslaSports teams: Royals, Chiefs, Yankees, Broncos, CubsMusic: Classical, country, jazz, rock, technoDrinks: Coke, coffee, tea, milk, waterWrite a PROLOG program that contains the above facts as a knowledge base, and functions to capture ‘adjacent to,’ ‘all different,’ etc. Your program should begin with the above facts and deduce the major, car, music, sports team, and beverage for each resident, printing the information at the end. Submit your program code and output from a sample execution.
Collepals.com Plagiarism Free Papers
Are you looking for custom essay writing service or even dissertation writing services? Just request for our write my paper service, and we'll match you with the best essay writer in your subject! With an exceptional team of professional academic experts in a wide range of subjects, we can guarantee you an unrivaled quality of custom-written papers.
Get ZERO PLAGIARISM, HUMAN WRITTEN ESSAYS
Why Hire Collepals.com writers to do your paper?
Quality- We are experienced and have access to ample research materials.
We write plagiarism Free Content
Confidential- We never share or sell your personal information to third parties.
Support-Chat with us today! We are always waiting to answer all your questions.
