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

What is function override?

584


Can an interface contain fields?

579


What is meant by function overloading and function overriding?

596


Can we have a default method definition in the interface without specifying the keyword "default"?

536


What is the difference between an Abstract class and Interface?

602






what is virtual function and pure virtual function ?

560


If a method definition has been specified in the base class and the interface which the class is implementing, which definition will be picked if we try to access it using interface reference and class object?

520


Explain what is single and multiple inheritance?

546


What are the methods required to create changes in subclasses?

554


What is the benefit of using inheritance?

586


What is a pure virtual function?

572


State some of the advantages of object oriented programming?

612


Can an interface inherit from another interface?

567


Can you call the base class method without creating an instance?

666


How can we restrict inheritance for a class so that no class can be inherited from it?

660