Aggregation differs from ordinary composition in that it does not imply ownership. In composition, when the owning object is destroyed, so are the contained objects. In aggregation, this is not necessarily true.
For example, a university owns various departments (e.g., chemistry) , and each department has a number of professors. If the university closes, the departments will no longer exist, but the professors in those departments will. Therefore, a University can be seen as a composition of departments, whereas departments have an aggregation of professors.
Above answer was rated as good by the following members: phdsong
RE: What is aggregation and composition of objects?
Suppose, you have a class named UserInformation . And with that class you are having a object instance named UserContactInfo
Class UserInformation {
UserContactInfo userContactInfo ;
}
This leads to aggregation. The UserContactInfo object is aggreated within UserInformation class. Both the classes have individual identity.
Now , suppose we have a class named Rectangle . And within that class you have Class Point as a object.
Class Rectangle {
Point point ;
}
Now , rectangle is a composition of points. Point class doesn't have any individual important . It is point that makes a rectangle . This is known as composition.
RE: What is aggregation and composition of objects?
Aggregation differs from ordinary composition in that it does not imply ownership. In composition, when the owning object is destroyed, so are the contained objects. In aggregation, this is not necessarily true.
For example, a university owns various departments (e.g., chemistry) , and each department has a number of professors. If the university closes, the departments will no longer exist, but the professors in those departments will. Therefore, a University can be seen as a composition of departments, whereas departments have an aggregation of professors.
Latest Answer : Actully this is an attribute of this page, and this particular page will be displayed when the other page( say page 2) got some error, provided, where the errorpage attribute has to de set to this page. put it in a nut shell, this shows that ...
Can I restrict the users of my class(say class A) to create an instance of my class not more than once(only one), and if anybody tries to create more than one instance, all the object refernces should refer to the same (one) instance
Which one of the following describes the OO concept of Aggregation? 1.A system of objects that implement each other 2.A system of objects that are built using each other 3.A system of objects that define each other 4.A system of objects that are not related 5.A system of objects inherited from each other
Serializable is used to read or write the object and find the state of an object. What is the use of finding the state of an object, Explain with an example?
ODP NET More About the OracleCommand Object Till now we have seen OracleCommand working with OracleDataReader OracleCommand is not simply meant for OracleDataReader It has got a lot of functionality for itself Let us see few of the most commonly used features of OracleCommand in this section We will
Creating Object Members on the Fly One major difference between OOP in C and ASP NET and OOP in JavaScript is that JavaScript allows creating object members on the fly" This is true for objects and classes that you create yourself and also for JavaScript s own objects and types as well He
Object Oriented JavaScript Objects and classes are implemented differently in JavaScript than in languages such as C VB NET Java or C However when it comes to using them you ll feel on familiar ground You create objects using the new operator and you call their methods or access their fields using t
Object Oriented JavaScript In this chapter you ll learn about OOP Object Oriented Programming and how it relates to JavaScript As an ASP NET developer you probably have some experience working with objects and you may even be familiar with concepts such as inheritance However unless you re already a
Object oriented programming OOP is a computer science term used to characterize a programming language that began development in the 1960’ s The term object oriented programming’ was originally coined by Xerox PARC to designate a computer application that describes the methodol
Object Oriented Client Server Internet OCSI Environments as IT Infrastructure Client Server Basics Object Oriented Client Server Internet OCSI environments provide the IT infrastructure for supporting OCSI applications For our purposes infrastructure refers to operating systems networks middleware
C Objects and Classes An Overview about Objects and Classes In object oriented programming language C the data and functions procedures to manipulate the data are bundled together as a self contained unit called an object A class is an extended concept similar to that of structure in C programming l
JavaScript Objects Object oriented Programming in an important aspect of JavaScript It is possible to use built in objects available in JavaScript It is also possible for a JavaScript programmer to define his own objects and variable types In this JavaScript tutorial you will learn how to make use
JavaScript String Object In this JavaScript tutorial you will learn about String Object purpose of string object in JavaScript purpose of string object indexof method lastIndexOf method and substring method along with syntax and example mosgoogle center Purpose of String Object in JavaScript The mai
JavaScript Date Object In this JavaScript tutorial you will learn about date object and methods of date object explained along with syntax and example mosgoogle center JavaScript Date Object Usage of Date Object Date object of Java Script is used to work with date and times General syntax for defini