GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

GeekInterview.com  >  Interview Questions  >  Concepts  >  UML
Go To First  |  Previous Question  |  Next Question 
 UML  |  Question 11 of 16    Print  
how to identify strong aggregation (composition) relationship between classes and what is difference between association and aggregation(while programming implementation of them)?

  
Total Answers and Comments: 2 Last Update: November 02, 2007     Asked by: Pritesh Dubey 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
April 20, 2007 07:09:29   #1  
rashmitambe Member Since: April 2007   Contribution: 3    

RE: how to identify strong aggregation (composition) r...
In strong aggregation or composition, a part entity cannot exist without the containing whole entity in 'whole-part' relationship.
For example. an university has multiple department. This a composition relationship between university and department entity. A department cannot exist on its own with out the university.


 
Is this answer useful? Yes | No
November 02, 2007 12:09:26   #2  
Dusan B        

RE: how to identify strong aggregation (composition) r...
Difference between association and aggregation (while programming implementation for both):

the main difference is conceptual - Aggregation says that an object is made up of other objects, and association says that they have a relationship, they know of each other, or they use each other in some way.

As far as programming, the main difference is in the multiplicities. Aggregation parent can have * and any subset of multiplicities here, but the child making up the aggregation can only have one parent.

This is different from association where you can have any number of possible relationships, going from 1-1, all the way up to *-*.

To clarify, when implementing aggregation Car and Tire, the Car has an aggregation to Tire, and the car has between 4-5 Tire (as an example, one is spare in the trunk) but in no case can a tire belong to two cars at the same time.

So when implementing the Car, you have to check that it has at least 4 and no more than 5 tires, and when implementing the Tire, you have to at all times have a reference to the Car (which means passing the Car reference in the constructor). Furthermore, when the Car reference is set to null, you have to pro grammatically make sure that the Tire references are also set to null in case of Aggregation but if u model your system as Car just having an association to Tire, this might not necessarily be true.

 
Is this answer useful? Yes | No

 Related Questions

Latest Answer : Furthermore, an API is often a finished, working component which is readily used (maybe with some minor additions). Frameworks are in no instance ready out-of-the-box and aim to take care some of the work which would be done over and over again to solve ...
Read Answers (2) | Asked by : joel

Latest Answer : Some object-oriented languages such as C++ and Ada support the concept of parametrized classes. C++ calls this facility “templatesâ€, and Ada calls it “genericsâ€; UML uses the C++ term. New versions of Java support this feature as well. So as ...

Latest Answer : Aggregation is a special type of ‘has-a’ relationship between classes where one of the two participating classes is part of other one. I.e. it’s a ‘whole-part’ relationship. The class acting as ‘whole’ always ...

How to identify strong aggregation (composition) relationship between classes and what is difference between association and aggregation(while programming implementation of them)?

What is the difference between sequence diagram and collaboration diagram? Can a sequence diagram be replaced by collaboration diagram? 
Latest Answer : Sequence Diagrams (Message Sequence Charts) and Collaboration diagrams have a one to one relationship. Given a MSC you can easily convert it into a Collab. diag. and vice versa. However, the form in which you choose to present them offers advantages and ...
Read Answers (1) | Asked by : Sachin Pawar


 Sponsored Links

 
Related Articles

ODP.NET - Fundamental ODP.NET Classes to Retrieve Data

ODP NET Fundamental ODP NET Classes to Retrieve Data To retrieve data from an Oracle database using ODP NET we need to work with a few of the ODP NET classes At this point we will discuss the most fundamental classes available in ODP NET for retrieving data mosgoogle The following is the list of fun
 

SQA Implementation

SQA Implementation Developers and the SQA team create a development plan before they build an application The developers write following the SDLC plan while the SQA team writes the Software Quality Assurance Plan to ensure that the SDLC plan was executed If these documents by the developers and the
 

Microsoft AJAX Library - C# and JavaScript Classes

C and JavaScript Classes For the purpose of demonstrating a few more OOP related concepts we ll use another class Our new class is named Table and it has two public fields rows columns and one method getCellCount The getCellCount method should return the number of rows multiplied by the number of co
 

Microsoft AJAX Library - JavaScript Classes

JavaScript Classes Not only can JavaScript functions contain other functions but they can also be instantiated This makes JavaScript functions a good candidate for implementing the concept of a class from traditional object oriented programming This is very helpful feature indeed because JavaScript
 

Concepts of Object-Oriented Programming

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
 

ERP and DSS Implementation

ERP Implementation of DSS With the birth of electronic commerce and supply chains the call centers and other business initiatives supported by the information technologies had been worried about finding applications that join to decode interpret and take the opportunity to make good use of the risks
 

SOA Concepts

SOA Concepts Today the concept of Service Oriented Architecture has become ubiquitous Evidence from recent years establish that SOA is not just about hype but a part of every major Business environment The truth is Service Oriented Architecture can be beneficial to Business only when it is utilized
 

C++ Storage Classes

C Storage Classes In this C tutorial you will learn about storage classes types of storage class variables Automatic External and Static explained with examples mosgoogle center Storage classes In the context of scope of variables in functions exists the important concept of storage class What is St
 

C++ Objects and Classes

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
 

What is Data Aggregation

In Data Aggregation, value is derived from the aggregation of two or more contributing data characteristics.   Aggregation can be made from different data occurrences within the same data subject, business transactions and a de-normalized database and between the
 





About Us  |   Privacy Policy  |   Terms and Conditions  |   Contact  |   Site Map  |   Add Question  |   Propose Category  |   RSS Feeds  |   Articles Sitemap  |   Site Updates  |   Add Resource

Copyright © 2005 - 2008 GeekInterview.com. All Rights Reserved
Page copy protected against web site content infringement by Copyscape