31 lines
481 B
C++
31 lines
481 B
C++
|
/*
|
|||
|
* PizzaStore.hpp
|
|||
|
*
|
|||
|
* Created on: 2 нояб. 2021 г.
|
|||
|
* Author: alexander
|
|||
|
*/
|
|||
|
|
|||
|
#pragma once
|
|||
|
|
|||
|
#include "Pizza.hpp"
|
|||
|
|
|||
|
class PizzaStore
|
|||
|
{
|
|||
|
public:
|
|||
|
virtual Pizza orderPizza(const std::string &type) const
|
|||
|
{
|
|||
|
Pizza pizza = createPizza(type);
|
|||
|
|
|||
|
pizza.prepare();
|
|||
|
pizza.bake();
|
|||
|
pizza.cut();
|
|||
|
pizza.box();
|
|||
|
|
|||
|
return pizza;
|
|||
|
}
|
|||
|
|
|||
|
virtual Pizza createPizza(const std::string &type) const = 0;
|
|||
|
|
|||
|
virtual ~PizzaStore() {}
|
|||
|
};
|