title: How to describe this factory by UML class diagram?
body: <p>In my work i have a lot of discrepancy of opinions about UMLing class diagram of this sample factory:</p>
  
  <pre><code>class Program
  {
      private static TrainComponentsData _trainComponentsData;
  
      static void Main(string[] args)
      {
          InitTrainComponentsData();
          string str = _trainComponentsData.ToString();
      }
  
      private static void InitTrainComponentsData()
      {
          ITrainComponentsReader reader = TrainComponentsReaderFactory.Create("XML");
          _trainComponentsData = reader.Read();
      }
  }
  
  public class TrainComponentsReaderFactory
  {
      internal static ITrainComponentsReader Create(string readerType)
      {
         //....
      }
  }
  
  internal class XMLTrainComponentsReader : ITrainComponentsReader
  {
     //....
  }
  
  public class TrainComponentsData
  {
     //....
  }
  
  internal interface ITrainComponentsReader
  {
      TrainComponentsData Read();
  }
  </code></pre>
  
  <p>i just a little confused about various of difference diagrams:</p>
  
  <p><img src="https://i.stack.imgur.com/Q79Ae.gif" alt="UML class diagram 1 from internet">
  <img src="https://i.stack.imgur.com/dtG3G.png" alt="UML class diagram 2 from internet">
  <img src="https://i.stack.imgur.com/xoTG3.jpg" alt="UML class diagram 3 from internet"></p>
  
  <p>etc...</p>
  
  <p>thanks!</p>