Factory Method Pattern allows overriding to return different concrete object types
The Factory Method design pattern defines an interface for creating an object,but lets subclasses decide which class to instantiate.It defers instantiation to subclasses,allowing a class to delegate the instantiation logic to its subclasses,promoting loose...