AbstractFactory
2022-10-06 13:29:23 0 举报
AbstractFactory
作者其他创作
大纲/内容
AbstractIngredient
+ std::string get()
Mushroom
AbstractCheese
AbstractSauce
BrieCheese
MoscowPizzaStore
# createPizza(PizzaTypes type):AbstractPizza *
Spinach
BraccioDiFerroPizza
-_ingredientFactory: AbstractIngredientFactory *
+ prepare():std::string
AbstractIngredientFactory
+ AbstractCheese *createCheese()+ AbstractSauce *createSauce()+ std::vector<AbstractVeggie *> *createVeggies()
AbstractVeggie
NYPizzaStore
MaccagnoCheese
AbstractPizza
-_name:std::string -_mainIngredient:AbstractIngredient *- _veggies:std::vector<AbstractVeggie *>-_cheese:AbstractCheese*-_sauce:AbstractSauce*
+bake() const:std::string +cut() const:std::string +box() const:std::string +setName(const std::string &name):void+getName() const:std::string +get() const:std::string +setMainIngredient:void +setVeggies(std::vector<AbstractVeggie *> *veggies):void +setCheese(AbstractCheese *cheese):void +setSauce(AbstractSauce *sauce):void +prepare():std::string
TomatoSauce
CheesePizza
MarinaraSauce
MozzarellaCheese
MoscowIngredientFactory
NYIngredientFactory
Onion
AbstractPizzaStore
+ orderPizza(PizzaTypes type):AbstractPizza *# createPizza(PizzaTypes type):AbstractPizza *
收藏
0 条评论
下一页