title: Can the below my example will be dependency or composition in UML?
body: <p>I have question regarding compositon/agregation/dependency in UML.</p>
  
  <ol>
  <li>I have service class AssociateDetailsService. In this AssociateDetailsService class,I am creating the instance of DAO as below.</li>
  </ol>
  
  <p>AssociateDAO assDAO = new AssociateDAO();
  so, since i am creating new instance , is it a composition relation here?
  Here I am not sure DAO is owned by service class.</p>
  
  <ol start="2">
  <li>I have single ton class ConnectionFactory. In the DAO, I am getting the single ton instance . so Can i use dependency or composition here?</li>
  </ol>
  
  <p>In DAO getting singleton instance of 
  ConnectionFactory as below.</p>
  
  <p>Connection con = ConnectionFactory.getInstance().getConnection();</p>
  
  <p>Can you please clarify here</p>
  
  <p>Thanks in advance</p>