In [[object oriented programming]], the '''factory method pattern''' is a [[creational pattern]] that uses factory methods to deal with the problem of [[object creation|creating objects]] without having to specify thetheir exact [[class (computer programming)|class]]. ofRather thethan objectby thatcalling willa be[[Constructor created.(object-oriented programming)|constructor]], Thisthis is done by creating objects by calling a factory method—eithermethod to create an object. Factory methods can either be specified in an [[Interface (object-oriented programming)|interface]] and implemented by child classes, or implemented in a base class and optionally [[method overriding|overridden]] by [[derived class|derived classes]]—rather than by calling a [[Constructor (object-oriented programming)|constructor]].