Re: class diagram question
From: Roger L. Cauvin (roger_at_deadspam.com)
Date: 12/20/03
- Previous message: Isaac Gouy: "Re: Test Driven Development Sample"
- In reply to: Passero: "class diagram question"
- Next in thread: Uncle Bob (Robert C. Martin): "Re: class diagram question"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 19 Dec 2003 19:12:17 -0600
"Passero" <yanongena@pandora.be> wrote in message
news:DPBEb.85742$MA1.3535967@phobos.telenet-ops.be...
> When i have a class that uses a static method of another class,
> do i have to draw a link between those classes in my class
> diagram or do I only need to draw the link when i'm using an
> instance of a class in my class?
You don't have to show the relationship in either case. If you choose to
show a relationship, UML 1.5 would have you draw a dashed line to indicate a
dependency (whether the method is static or not).
> Is it the same when i parse an object of another class as a
> parameter but still don't use it as an atribute?
Yes.
> In java it would be something like this:
>
> public void myFunction()
> {
> Myclass.doMethod(aClassOfMine)
> }
>
> aClassOfMine is an instance of a self-written class and MyClass is
> another class. In MyClass i only use aClassOfMine in the method
> doMethod so do i have to draw a link between the class that calls
> doMehod and MyClass
Again, you don't have to show the relation, but the relation is dependency
(according to UML 1.5).
> and do i also have to draw a link between MyClass and
> ClassOfMine ?
Same answer.
-- Roger L. Cauvin nospam_roger@cauvin.org (omit the "nospam_" part) Cauvin, Inc. http://www.cauvin-inc.com
- Previous message: Isaac Gouy: "Re: Test Driven Development Sample"
- In reply to: Passero: "class diagram question"
- Next in thread: Uncle Bob (Robert C. Martin): "Re: class diagram question"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|