Package com.edu.xmum.CST210.Factory
Class FactoryProducer
java.lang.Object
com.edu.xmum.CST210.Factory.FactoryProducer
FactoryProducer is responsible for providing the appropriate factory instance based on the choice provided.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic AbstractFactorygetFactory(String choice) Returns the appropriate factory instance based on the choice provided.
-
Constructor Details
-
FactoryProducer
public FactoryProducer()
-
-
Method Details
-
getFactory
Returns the appropriate factory instance based on the choice provided.- Parameters:
choice- the type of factory required.- Returns:
- the corresponding AbstractFactory instance.
-