--%>

Aggregation and containment in the Programming

Illustrate the basic difference between Aggregation and containment in the Programming?

E

Expert

Verified

Aggregation is a relationship between the whole and a part. We can add or subtract some of the properties in the part (or slave) side. It won’t influence the whole part.

Best illustration is Car that comprises the wheels and some additional parts. Even although the parts are not there we can call it as car.

However, in the case of containment the entire part is influenced when the part in that got influenced. The human body is an apt instance for this relationship. Whenever the whole body dies the parts (heart and so on) are died.

   Related Questions in Programming Languages

  • Q : Calculate the summation of 1 to some

    Write two programs to calculate the summation of 1 to some integer n using a function called int summation(int n) a) Using a non recursive solution, with a for(i=1, i<=n; i++) loop and b) using a recursive solution, based on the following conditions summation(n) = summation(n-1

  • Q : Define Application Application : It is

    Application: It is frequently used, simply as a synonym for the program. Though, in Java, the word is particularly employed of programs with a Graphical User Interface (GUI) which are not applets.

  • Q : What is no-arg constructor no-arg

    no-arg constructor: It is a constructor which takes no arguments. By default, each and every class without an explicit constructor has a default no-arg constructor with the public access. Its role is entirely to invoke the no-arg constructor of the in

  • Q : What does XSLT processing models include

    What does extensible style sheet language transformations processing models involve?

  • Q : Various controls of ASP.NET AJAX Name

    Name the various controls of ASP.NET AJAX?

  • Q : Define the term Instance Define the

    Define the term Instance: It is a synonym for object. The objects of a class are instantiated whenever a class constructor is invoked through the new operator.

  • Q : What is Quotient Quotient: Whenever

    Quotient: Whenever integer division is executed, the outcome comprises of a quotient and a remainder. The quotient symbolizes the integer number of times which the divisor divides into the dividend. For example, in 5/3, 5 is the dividend and 3 is the

  • Q : Define Applet Applet : The Applets are

    Applet: The Applets are Java programs based on the Applet or JApplet classes. They are closely related with the capability to give active content within the Web pages. They have numerous features that differentiate them from ordinary Java graphical ap

  • Q : Questions on java class Array 1.

    1. Suppose we have a class A which has a constructor that takes a single integer. (a) After the following statements have been executed, how many A objects will exist

  • Q : Explain Abstract Windowing Toolkit

    Abstract Windowing Toolkit: The Abstract Windowing Toolkit (AWT) offers a collection of classes which simplify the creation of applications with the GUI (graphical user interfaces). Such are to be found in the java.awt packages. Included are classes f