i have received this assignment that i need to complete by wednesday and i havent started.

basically i have a .pl file with a movie database and i am required to answer the following.

1. COURSEWORK: There is a game that can be played whereby people try to work out the “degrees of separation” between two Hollywood actors. This is achieved by working out all of the actors who co-star in films together and thereby connect actor X and actor Y. This project involves writing PROLOG rules to extract information from a database including a test to see if a list of films can be linked in a similar way.

An online movie database is supplied that stores a number of films along with the starring cast. It will be of the form of the following PROLOG rules:

starsin(filmA, actorX).
starsin(filmB, actorX).
starsin(filmB, actorY).

starsin(filmC, actorZ).

There is also a list of facts reflecting how much money each film made of the form:

takings(filmA, amount).


Part 1 – Annotated Code (Total marks: 20%)

Given this database, write PROLOG rules to carry out the following tasks:

a) Do actors S1 and S2 costar in any films? If so, return true, otherwise return false [3%]

b) Did film F1 make more money than film F2? If so, return true, otherwise return false [3%]

c) Is there a star that links films F1 and F2 (in other words is there a star who appears in both)? If so, return true, otherwise return false [3%]

d) Given a list of films, are they in order of money they made? If so, return true, otherwise return false [3%]

e) Given a list of films, how much money did they all make? [3%]

f) Given a list of films, can they be linked by a set of stars? For example, Men in Black can be linked to The Cable Guy with through the following stars: [Smith and Jones costar in Men in Black], [Jones and Carrey costar in Batman Forever], [Carrey and Broderick costar in The Cable Guy]. [5%]

[Maximum length: 3 pages for code and annotation].
The marking of your code implementation will be based on three aspects: (i) Code Functionality (ii) Readability; and (iii) Annotation

Recommended Answers

All 3 Replies

I have been brought to this thread after accusations of plagiarism.
We have been told you are a Brunel student, and as you know, what you are doing is classified as cheating. Your IP address is being looked into, and this will be confirmed with our network, I suggest you come foward before we have to go through all this hassle of chasing you.

Stephen Swift.

I have been brought to this thread after accusations of plagiarism.
We have been told you are a Brunel student, and as you know, what you are doing is classified as cheating.

Yes! Finally a teacher who's smart enough to use google! This is great and you rock! Perhaps this is the first step in stopping the endless amount of clueless, lazy students trying to get a homework freebie on a internetforum.

Your IP address is being looked into, and this will be confirmed with our network.

I could give you that information, but I won't. Privacy is very important to me. Please contact either Dani or Davey and they'll know how to go from here.

Happy huntin'

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.