module abstractfactory.pizzastore;

import abstractfactory.pizza;
import std.stdio : writeln;

abstract class PizzaStore
{
protected:
    Pizza createPizza(string item);
public:
    Pizza orderPizza(string type)
    {
        Pizza pizza = createPizza(type);

        writeln("--- Making a " ~ pizza.getName() ~ " ---");

        pizza.prepare();
        pizza.bake();
        pizza.cut();
        pizza.box();

        return pizza;
    }
}
