Wrong implementation of factory pattern?

So I read this article on factory pattern but I think it's wrong, the factory should encapsulate all classes that it can instantiate, right?

https://medium.com/swlh/factory-pattern-without-switch-this-is-how-it-should-be-done-cd895e356f44

submitted by /u/Frosty_Ad9289
[link] [comments]

from Software Development – methodologies, techniques, and tools. Covering Agile, RUP, Waterfall + more! https://ift.tt/39gwwqV

Leave a comment

Design a site like this with WordPress.com
Get started
search previous next tag category expand menu location phone mail time cart zoom edit close