module factorymethod.pizzafactorymethod.pizzastore;

import factorymethod.pizzafactorymethod.pizza;
import std.stdio : writeln;

class PizzaStore
{
    abstract Pizza createPizza(string type);

    Pizza orderPizza(string type)
    {
        Pizza pizza = createPizza(type);

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

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

        return pizza;
    }
}
