Re: class diagram question

From: Roger L. Cauvin (roger_at_deadspam.com)
Date: 12/20/03

  • Next message: Steven Wurster: "Re: Why can't C# or Java support multiple inheritance? But inherit multiple interfaces instead??"
    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
    

  • Next message: Steven Wurster: "Re: Why can't C# or Java support multiple inheritance? But inherit multiple interfaces instead??"

    Relevant Pages

    • class diagram question
      ... When i have a class that uses a static method of another class, ... draw a link between those classes in my class diagram or do I only need to ... In MyClass i only use aClassOfMine in the method doMethod so do i have to ...
      (comp.object)
    • Re: class diagram question
      ... > draw a link between those classes in my class diagram or do I only need to ... > aClassOfMine is an instance of a self-written class and MyClass is another ...
      (comp.object)
    • Re: classless OOP, was Re: a roguelike for Forth
      ... cell var text ... \ Now, implement the two methods, draw and init: ... button new Constant foo ... myclass defines draw ...
      (comp.lang.forth)
    • Re: class diagram question
      ... > draw a link between those classes in my class diagram or do I only need to ... > aClassOfMine is an instance of a self-written class and MyClass is another ... Interaction Diagram for any behavioral collaboration between different ... swimlanes with a specific object identifier. ...
      (comp.object)