Given the following code, which statements are true ?
public interface HeavenlyBody {String describe();}
class Star implements HeavenlyBody {
String starname;
public String describe() { return "star" + starname;}
}
class Planet {
String name;
Star Orbitting ;
public String describe() {
return "planet"+name+"orbiting"+orbiting.describe();
}
}
Select all valid answers
a) The code will fail to compile
b) The use of aggregation is justified, since plant has-a star.
c) The code will fail to compile if the name starName is replaced with the name bodyName throughout the Star class definition.
d) The code will fail to compile if the name starName is replaced with the name name throughout the Star class definition.
e) An instance of Planet is a valid instance of a HeavenlyBody.