Important Java Mcq 1

Which of the following does not constitute the class’s relationship?

a. is-a

b. part-of

c. has-a

d. has-parts

Answer:

d. has-parts

Explanation

has-parts is the wrong answer! Object-oriented programming generally supports four types of relationships: inheritance , association, composition and aggregation. All these relationship is based on “is a” relationship, “has-a” relationship and “part-of” relationship.

Related MCQs
Aniket Malik

Aniket Malik

CERTIFIED TUTOR/TRAINER WITH 300+ REVIEWS

Facing difficulty with

this concept?