Question
Write a program in Prolog to create a knowledge base that contains facts and rules about regulations on completion of degrees in a university. A
Write a program in Prolog to create a knowledge base that contains facts and rules about regulations on completion of degrees in a university. A user can then ask queries about the information contained in the knowledge base. Assume that you are building a prototype for testing, and the information for facts and rules is as follows. 1. A student earns a grade in a course. 2. Departments to be included in the knowledge base: CS, Math, and Physics. 3. Courses offered in CS: CS111, CS211, CS311, CS315, CS343, CS436. 4. Courses offered in Math: MATH270, MATH242, MATH372, MATH480. 5. Courses offered in Physics: PHYS201, PHYS301. 6. Students taking courses at the university: Troy, Homer, Ada, Gina, Marty. 7. Troy is enrolled in CS311, CS436, and MATH372. Homer is enrolled in MATH480, CS343, and PHYS301. Ada is enrolled in CS436, and CS343. Gina is enrolled in PHYS301, and MATH372. Marty is enrolled in MATH480. 8. A student satisfies the degree requirements if the student has: - completed the core courses of the department, and - fulfilled the electives requirement. 9. Completed core courses is true if the student has passed each of the core courses in the department with the minimum passing grade of C. Assume that courses taken have been passed with a B. 10. Core courses: CS111, CS211, CS311, MATH270, and PHYS201. 11. Elective courses: CS315, CS436, MATH242, MATH372, PHYS301. 12. Fulfilled electives requirement is true if the student has passed three different courses, each course in a different department in the College of Science, e.g., MATH242, MATH372, CS315, CS436, PHYS301. 13. Homer has taken and passed CS111, CS211, CS311, MATH270, PHYS201, MATH242, CS436. 1 14. Ada has taken and passed CS111, CS211, CS311, MATH270, PHYS201, PHYS301, MATH372. 15. Marty has taken and passed all the core and elective courses. 16. For the rest of the students assume that they have taken and passed CS111 and CS211. Your program must be able to answer, at least, these queries in Prolog. Which students have satisfied the requirements What are the elective requirements fulfilled by a student What are the course requirements fulfilled by a student
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started