| CSC 8310 Midterm Exam Fall 2000, Villanova University David Matuszek |
Name ____________________________________ |
Please keep all answers short and to the point, and don't provide any information that wasn't asked for. There are no essay questions on this exam.
Prolog
Jack = john
Mary = mother(Bill)
'+'(5, 3) = '+'(5, 3)
loves(Bill, Sally) = loves(Sally, Bill)
spouse(John, Mary) = spouse(Mary, John)
loves(john, mary) = loves(john, mother(Bill))
child(Mary, mother(Bill)) = child(child(John), Sally)
child(Mary, mother(Bill)) = child(child(John), Mary)
Jack = father(Jack)
loves(john, mary) = loves(_, _) male(X) /*
Examples: male(john). male(bill). Etc. */
female(X)
child(X, Y, Z) /* X is the child of Y and Z */
mother(X, Y)
mate(X, Y) /* X and Y are parents of some child */
childless(X) /* X has no children */
different(X, Y) /* X and Y are not the same */
siblings(X, Y) /* X and Y are different people with the same parents */
Java
void setName (String name) { this.name = name; }
this.name refer?name (without this) refer?
this?Hello.Hello
in both the title bar and the body.SOUTH part
of a BorderLayout, how can you do it? (Answer in English, do
not write Java code.)Exception,
what (if anything) does Java insist that you do about it?javadoc| arrays | errors | events | exceptions |
General
<integer>, where
an <integer> consists of one or more digits, and the first
digit may not be zero, unless it is the only digit (that is, 0
by itself is allowed, but 007 is not). You can assume that
<digit> has already been defined.