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. HereTaggethas-aString.
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 each member field or method).



Leave a Reply 19

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


Kamil

Kamil

My answer is A,B,E.
Who is agree/disagree?

Boris

Boris

Yes,Kamil , I agree with you

Yury

Yury

Should be A,D, E.

F is incorrect.

hafid

hafid

ADE

A: Flimmer implements Plinkable -> Flimmer is-a plinkable
D:The relationship modeled by composition is often referred to as the “has-a” relationship. -> HereTagget has-a String.
E: Flommer extends Flimmer and Flimmer implements Plinkable -> Flommer is-a Plinkable

Cml

Cml

But String s is not a member, just a local variable. I would choose A, B, E

Fredy

Fredy

Why Flommer has-a Tagget?

gelete

gelete

ABE

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

Michael

Michael

How if the list is an empty list?