I studied the design template of the factory method, and at the same time I came across an Activator object and how to use it by reading a tutorial (I often came across this object in intellisense, though).
The activator allows you to use the last binding, which can be extremely useful. But this is because we do not know which class we want to create. Similarly, the factory method deals with the same problem in software development.
At a simple level, a bunch of ifs or case case, and then instantiating an object based on an if condition is an implementation of the factory method, right?
In connection with the relevant topic, I read that polymorphism can reduce the connection between objects by excluding case statements. Is there an example of this?
thanks
source share