Which three statements concerning the OO concepts "is-a" and "has-a" are true?

Given:

Which three statements concerning the OO concepts “is-a” and “has-a” are true?

Given:

Which three statements concerning the OO concepts “is-a” and “has-a” are true?

A.
Flimmer is-a Plinkable

B.
Flommer has-a Tagget

C.
Flommer is-a Glommer

D.
Tagget has-a String

E.
Flommer is-a Plinkable

F.
Flimmer is-a Flommer

G.
Tagget is-a Plinkable

Explanation:

A: Flimmer implements Plinkable.
Flimmer is-a plinkable.
D:The relationship modeled by composition is often referred to as the “has-a” relationship.
HereTaggethasaString.
F: Flommer extends Flimmer
So there is an “is-a relationship between Flommer and Flimmer .
Note: Thehas-a relationship has anencapsulation feature (like private or protected modifier used
before eachmember field or method).



Leave a Reply 9

Your email address will not be published. Required fields are marked *


kevin

kevin

Answer is A,D,E

Tim

Tim

No, it is ABE. Current answer is correct.

kevin

kevin

why answer is ABE

l0c

l0c

Tagget doesn’t have-a String. There’s only a String object in the body of a method. It’s not a field.

Frandy

Frandy

Answer is only A & D

john

john

B is incorrect. Flommer has list of Tagget.

gelete

gelete

A,B,E

A,B,E

B. Flommer has-a Tagget:

OCA/OCP Java SE 7 Programmer I & II Study Guide (Kathy Sierra, Bert Bates)
93 Inheritance and Polymorphism (OCA Objectives 7.1, 7.2, and 7.3)
Class A HAS-A B if code in class A has a REFERENCE to an instance of class B.

A. True : Flimmer implements Plinkable -> Flimmer is-a plinkable
E. True : Flommer extends Flimmer and Flimmer implements Plinkable -> Flommer is-a Plinkable