Difference between Composition and Aggregation

Answer Posted / paul howard

Composition can be used to model by-value aggregation which
is semantically equivalent to an attribute. In fact
composition was originally called aggregation-by-value in an
earlier UML draft with “normal” aggregation being thought of
as aggregation-by-reference. The definitions have changed
slightly but the general ideas still apply. The distinction
between aggregation and composition is more of a design
concept and is not usually relevant during analysis.

Is This Answer Correct ?    14 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

If a class inherits an interface, what are the 2 options available for that class?

718


Can an interface have an inner class?

792


What are the rules to define a functional interface?

726


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

706


What is the base type from which all structs inherit directly?

704


What is bootstrap, extension and system class loader?

698


Why is OOP good?

748


Can a function be overloaded based on return types?

699


What are the limitations of inheritance?

727


Difference between abstraction and implementation hiding ?

827


Is it possible to provide method implementations in java interfaces? If possible, how do we provide them?

693


Write a note on encapsulation?

751


What is single and multiple inheritance?

759


Explain about uml?

715


What is abstraction? How does it differ from encapsulation

713