35 lines
815 B
C++
35 lines
815 B
C++
/*
|
||
* PepperoniPizza.hpp
|
||
*
|
||
* Created on: 3 нояб. 2021 г.
|
||
* Author: alexander
|
||
*/
|
||
|
||
#pragma once
|
||
|
||
#include "Pizza.hpp"
|
||
#include "PizzaIngredientFactory.hpp"
|
||
|
||
class PepperoniPizza: public Pizza
|
||
{
|
||
public:
|
||
PizzaIngredientFactory *ingredientFactory;
|
||
|
||
PepperoniPizza(PizzaIngredientFactory *ingredientFactory) : ingredientFactory(ingredientFactory) {}
|
||
|
||
void prepare() override
|
||
{
|
||
std::cout << "Preparing " << getName() << std::endl;
|
||
setDough(ingredientFactory->createDough());
|
||
setSauce(ingredientFactory->createSauce());
|
||
setCheese(ingredientFactory->createCheese());
|
||
setVeggies(ingredientFactory->createVeggies());
|
||
setPepperoni(ingredientFactory->createPepperoni());
|
||
}
|
||
|
||
~PepperoniPizza()
|
||
{
|
||
delete ingredientFactory;
|
||
}
|
||
};
|