java - How to express dependency in a UML Class Diagram? -
i following 2 classes:
class { void foo(){ b object= new b(); object.baar(); } } class b { void baar(){ } }
how express class a
using class b
class diagram (which arrow use)?
whenever 1 classes has reference/uses another, said have dependency on it. in example class a
uses class b
. therefore class a
has dependency on class b
. can uses uml dashed line open arrow described here.
this general relationship.
one class depends on if independent class parameter variable or local variable of method of dependent class.
if class a
had instance variable, use association link instead.
Comments
Post a Comment