Solved

Aggregation

Posted on 2000-03-04
7
498 Views
Last Modified: 2010-04-02
What is aggregation in OOAD...wanted a brief explanation with an EXAMPLE ?

What is the advantage of having static member function in a class...again please give an example ?

What are all the ways you can make communication between various classes...
please furnish examples and brief explanation ?
0
Comment
Question by:sunraj
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 22

Expert Comment

by:nietod
ID: 2582905
We cannot provide answers to school assignments.  That is grounds for removal from this site.  (for both you and the experts involved.)  We can provide only limitied help in accademic assignments.    We can answer specific (direct) questions, like you might ask your teacher.  We can review your work and post suggestions, again, like your teacher might do.

Do you have specific questions?
Do you have any work on this (incomplete even) that we can review?
0
 
LVL 1

Expert Comment

by:ntdragon
ID: 2582974
again we won't make the work for you
if you want rewrite your questions and we will give you some ideas
0
 

Author Comment

by:sunraj
ID: 2590228
dear experts...
again please avoid autotext answers..

comming to question no 2.
-------------------------
When we are asked what is the advantage of static member function in a class, immeditely most of us say, that it is having class scope, access only static data memmber...
I mean to ask is there is any specific advantage out of this static member function ?

comming to question no.3
--------------------------
We could make communication between classes thro' friends.
Also a memmber function of a class can be made to receive an object of other class as an argument.

I mean to ask is there is any other mechanism.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 22

Expert Comment

by:nietod
ID: 2591560
>> I mean to ask is there is any specific
>> advantage out of this static member
>> function ?
First of all.  Consider the fact that a static member function works just like a non-member function (an "ordinary function").  In other workds, non-static member functions are unusual because they must be called to operate on some object.  But static member functions and non-ember functions are not called this way, they don't operate on objects.  So static member functiosn are basically just like non-member functions.  In terms of logic and design, you can always replace a static member function with a non-member function.  So what are the differences between a static member function and a non-member function.  Some of these differences will be the advantage.

(i.e don't compare static member functions and non-static member functions.  That is not relevant to the question.  compare static member functions and non-member functions.)

>> We could make communication between
>> classes thro' friends.
Not really.  Communication implies the passing of information.  Just becaise class A and Class B are friends doesn't necessarily mean they communicate.  Now if class A calls a procedure in class B, that is a form of communcation.

>> Also a memmber function of a class can be
>> made to receive an object of other class as
>> an argument
Thjat could probably be considered an example of communication.  (There are not absolute definitions for this question.)

There may be others still.
0
 
LVL 1

Accepted Solution

by:
pepenieto earned 30 total points
ID: 2595719
What is aggregation in OOAD...wanted a brief explanation with an EXAMPLE ?

Aggregation is one kind of relationship. You must be sure of using this kind asking yourself: is one class "part-of" another?. If you remove the second class, the first class must be removed? A classical example is a car that "have" an engine, four tires,...

What is the advantage of having static member function in a class...again please give an example ?
With static member functions (class function) you can have an access for class variables (and more). In this class variables you can store information about all the objects of that class (like number of instances, ...)

What are all the ways you can make communication between various classes...
please furnish examples and brief explanation ?
You say "communication between various classes"? I don´t know. Communication between various "objects", it´s made by relationships between classes (like assotiations, aggregations, contracts, ...
0
 
LVL 22

Expert Comment

by:nietod
ID: 2595757
pepentioto, are you a new expert?

If so you should read what I initially wrote.  (You should always read a question completely before commenting/answering.)  EE has a policy of not giving answers to assigments.  This is part of the customer service agreement you agreed to.  You can be removed from EE for violation of this agreement.
0
 
LVL 7

Expert Comment

by:KangaRoo
ID: 2595868
Mhh, first day... Welcome.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
C++ Properties One feature missing from standard C++ that you will find in many other Object Oriented Programming languages is something called a Property (http://www.experts-exchange.com/Programming/Languages/CPP/A_3912-Object-Properties-in-C.ht…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…

724 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question