title: Who should construct objects in this scenario?
body: <p>I have the following class:</p>
  
  <pre><code>class PluginLoader
  {
  public:
      PluginLoader(Logger&amp;, PluginFactory&amp;, ConflictResolver&amp;);
      //Functions.
  private:
      //Members and functions
  };
  </code></pre>
  
  <p><code>Logger</code>, <code>PluginFactory</code> and <code>ConflictResolver</code> classes are all interface classes which will be implemented in the application. I create the single <code>PluginLoader</code> object at top level in the main program. The <code>Logger</code> can be known at that level. But, <code>PluginFactory</code> and <code>ConflictResolver</code> are only used internally in the <code>PluginLoader</code> class. So creating their objects at top level seems ugly. What should I do? I can change the constructor if it is needed though I'd like to keep it the way it is. Any comments are welcome. Thanks.</p>