Solved

Aggregation

Posted on 2000-03-04
7
494 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
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
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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.

 
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: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

Suggested Solutions

Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
This article shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. A brief on problem: Lets take example problem for simplicity: - I have a G…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

839 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