posted 23 years ago
When determining if something is a "has a" relationship or an "is a" relationship look to see if it implements or extends a class or if it has a class or instance variable in the class. If it extends the class then you are saying that class A is a Class B. If you have an instance variable, then you are saying Class A has a Class B.
So for the example above, answer 4 and 5 both have instance variables of another class, so you can say Animal has a Species called species and Container has a Component called children.