Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 502
  • Last Modified:

Aggregation

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
sunraj
Asked:
sunraj
1 Solution
 
nietodCommented:
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
 
ntdragonCommented:
again we won't make the work for you
if you want rewrite your questions and we will give you some ideas
0
 
sunrajAuthor Commented:
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.

 
nietodCommented:
>> 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
 
pepenietoCommented:
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
 
nietodCommented:
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
 
KangaRooCommented:
Mhh, first day... Welcome.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now