Difference between association and dependency

uml

In a UML class diagram, what is the difference between an association relationship and a dependency relationship?

From what I know, an association is a stronger relationship than a dependency, but I'm not sure how it is stronger.

Any example would be more than welcome 🙂

Best Answer

An association almost always implies that one object has the other object as a field/property/attribute (terminology differs).

A dependency typically (but not always) implies that an object accepts another object as a method parameter, instantiates, or uses another object. A dependency is very much implied by an association.