title: How do I express a "returns a" relationship in a UML class diagram?
body: <p>I'd like to express (visually) in UML that <code>class Foo</code> returns <code>class Bar</code>. The <code>Bar</code> object is created in one of <code>Foo</code>'s methods and returned as a result.</p>
  
  <p>I don't know whether to use a dependency or association relationship for this. Any suggestions?</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>I should clarify that the UML diagram I'm working on doesn't contain any class attributes or operations. It's just intended as an overview that shows relationships between classes. Descriptions of attributes and operations are already generated from the source code (via Doxygen).</p>
  
  <p><strong>EDIT 2</strong></p>
  
  <p>I should further clarify that I want to show this relationship from a <strong>class diagram</strong>. I apologize for not being clear from the start.</p>
  
  <p><strong>EDIT 3</strong></p>
  
  <p>Upon further digging around, looking at examples, I realized that it's more important to document that Foo <strong>creates</strong> Bar. The fact that one of Foo's methods returns Bar is an implementation detail that I can leave out of my class diagram. So now, my question is: <strong>what's the best way to  show a "Foo creates Bar" relationship in a class diagram?</strong></p>