This student calendar was created with Prolog and uses the concept of predicates. The program models students πΈ, classes π©βπ«, roomsπͺ, dates π , and their relations π.
To run this program, it is necessary to visit Prolog's website and download the software for your OS. Follow the installation guide and make sure you see Welcome to SWI-Prolog ... when you have successfully installed it.
Load the program
Execute consult('.../schedule.pl'). command with the corresponding path to the schedule.pl file found in the repository. If it is loaded correctly you should get true. as a response back.
Questions
Once you've setup the program you can present some of the following questions:
ex: math
studies(Student,math).
Student = david ;
Student = benze.
ex: maria
studies(maria,Class).
Class = algorithms ;
Class = ufo.
ex: on wednesday
class(Class,Room,wednesday).
Class = algorithms,
Room = 1 ;
Class = ufo,
Room = 2.
has(Student,Day,Class).
Student = david,
Day = monday,
Class = math ;
Student = benze,
Day = monday,
Class = math ;
Student = elitsa,
Day = monday,
Class = database ;
Student = david,
Day = tuesday,
Class = tests ;
Student = elitsa,
Day = tuesday,
Class = tests ;
Student = benze,
Day = tuesday,
Class = tests ;
Student = maria,
Day = wednesday,
Class = algorithms ;
Student = david,
Day = wednesday,
Class = ufo ;
Student = maria,
Day = wednesday,
Class = ufo.
Check all students attending a class on a day: ex: math
has(Student,Day,math).
Student = david,
Day = monday ;
Student = benze,
Day = monday.
To terminate the prolog program execution you'd just need to execure the halt command.
David Alves π¨π»βπ»
Github
Elitsa Marinovska π©π»βπ»
Github
Attending "Discrete math" course of Software Development bachelor's degree