Hi cowboys,
a. is surely false, as you can
test yourself.
b. is showing that the question cannot turn up in the exam (see below)
c. is true, when you replace name by starName in class Star, class Planet can no longer compile as it uses starName, and this variable does no longer exist.
d. true, same as c.
e. I think, I'm not sure, though, that it's wrong. Interfaces don't have instances. An instance of a class implementing HeavenlyBody is of reference type HeavenlyBody, but I wouldn't call it an instance of this interface. My opinion.
About b:
b.The use of inheritance is justified, since Planet is-a Star.
That depends. Astronomers would say, it is wrong, a planet is not a star, so Planet should have a Star, not extend one.
But what about this:
Jake(having the exam next monday): Hey Jill, how is this bright star called, over there, near the horizon?
Jill: That's the evening star, also called Venus.
Astronomy is not in the exam's objectives. Not even elementary.
Yours,
Bu.