In the class diagram of the design pattern Factory method I think there should be a realization between the abstract creator class and the interface. The factory method returns an object of the type of the interface but there isn't a realization line.In the following diagram you can see the class diagram generated by the plugin UML in Netbeans:

Factory Method class diagram

  • "the class diagram of the design pattern Factory method" - in what source? I am sure there are hundreds of class diagrams showing the Factory method design pattern around the world.– O. R. MapperMar 27 '17 at 14:30
  • The plugin UML for Netbeans generates class diagram of design patterns using the Gof diagrams. This is the one that you can see in the attached file– Alberto Mar 27 '17 at 15:12
  • I guess a dependency is what should be added. A realization would be wrong.– Thomas KilianMar 27 '17 at 15:38
  • What exactly is the question here?– ketan vijayvargiyaMar 28 '17 at 21:57

The Creator does not implement the interface, so a realization would be inappropriate. A dependency would work, though.

  • Sorry, I meant a dependency as Jim says.– Alberto Mar 27 '17 at 21:25

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.