What is composition? Explain the purpose of composition.



What is composition? Explain the purpose of composition...

Answer / Sunder Singh

Composition is a way of aggregating objects by creating a new object which contains the instance of other objects as its parts. The purpose of composition is to build complex objects from simpler ones, promoting modularity and reusability in object-oriented programming.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More OOAD Interview Questions

Is iterator a class or interface? What is its use?

1 Answers  


What is composition? Explain the purpose of composition.

1 Answers  


What is Object Constraint Language (OCL)?

1 Answers   Protech,


What are the major differences between late and dynamic binding?

1 Answers  


Can you explain primordial class loader?

1 Answers  


What is the use of destructive method?

1 Answers   Tech Mahindra,


explain dynamic binding

1 Answers  


Explain the meaning of object in object oriented programming?

1 Answers  


Can an interface contain fields?

1 Answers  


Is it possible to override private virtual methods?

1 Answers   Infosys,


Differences between functional programming and object-oriented programming?

1 Answers  


What is the main use of message metaphor in object-oriented programming?

1 Answers  


Categories