> ----------
> From:         Pankaj Chatterjee[SMTP:[EMAIL PROTECTED]]
> Reply To:     Pankaj Chatterjee
> Sent:         09 November 2000 15:18
> To:   'Rose Forum'
> Subject:      RE: (ROSE) Associations
> 
> 
> Hi Angay/Peter,
> 
> If I draw an association (I usually work with unidirectional aggregation),
> and generate code, the association is represented as a module level
> variable. So it is correct to assume that for which ever class I am
> holding
> a module level reference, the relation is that of an association, but for
> those classes  that I refer to within, lets say, a function it would be a
> dependency?
> 
Strictly speaking, referring to a class from a function/operation would
still imply an association.

> The problem is as follows. Lets say there is an Employee class and an
> Address class, I draw up a relation that one Employee has one-or-more
> Addresses. This is shown as unidirectional aggregation. Now there is also
> an
> EmployeeFactory class that is 'stateless'. The getEmployee method in the
> factory class instantiates an object of Employee (and address(s) ) and
> returns the reference to the caller. What is the relation between the
> Employee and the Factory, that of a dependency or an association?
> 
Again, strictly speaking, the relationship is one of association.


HOWEVER...

(1) You will not be able to differentiate visually between static (i.e.
attribute) and transient (i.e. used in an operation) associations.

(2) Worse, if you are doing this in Rose (or any other CASE tool that I know
of), the association will end up as an attribute of the class.


So, at the end, you have to go with the flow and adopt the convention --
that is, all static relationships are associations and everything else is a
dependency.

> Pankaj
> 
        Regards,
        Huseyin

************************************************************************
* Rose Forum is a public venue for ideas and discussions.
* For technical support, visit http://www.rational.com/support
*
* Admin.Subscription Requests: [EMAIL PROTECTED]
* Archive of messages: 
http://www.rational.com/products/rose/usergroups/rose_forum.jtmpl
* Other Requests: [EMAIL PROTECTED]
*
* To unsubscribe from the list, please send email
*
* To: [EMAIL PROTECTED]
* Subject:<BLANK>
* Body: unsubscribe rose_forum
*
*************************************************************************

Reply via email to