Which two statements concerning the OO concepts “IS-A” and “HAS-A” are true?
A.
Flimmer is-a Glommer.
B.
Flommer has-a String.
C.
Tagget has-a Glommer.
D.
Flimmer is-a ArrayList.
E.
Tagget has-a doStuff()
F.
Tagget is-a Glommer.
Explanation:
B: The relationship modeled by composition is often referred to as the “has-a” relationship. Here
Flommer hasaString.
E: The has-a relationship has an encapsulation feature (like private or protected modifier used
before eachmember field or method).
Here Tagget has-a method doStuff()
F: Tagget implements Glommer.
Tagget is-a Glommer.
Note: The has-a relationship has an encapsulation feature (like private or protected modifier used
before eachmember field or method).
B
F