Solved

Aggregation

Posted on 2000-03-04
7
489 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
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 
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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

In days of old, returning something by value from a function in C++ was necessarily avoided because it would, invariably, involve one or even two copies of the object being created and potentially costly calls to a copy-constructor and destructor. A…
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…
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…
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

759 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now