<<< Difference between Builder and Factory Pattern     Index     Prototype >>>

14. Factory Method


    factory method for making pizza
  • Static operation PizzaFactory::create_pizza( )
    takes "pizza ID" strings,

    • "Default"

    • "Ham and Mushroom"

    • "Hawaiian"

    and creates a corresponding object.


<<< Difference between Builder and Factory Pattern     Index     Prototype >>>