53 lines
1.2 KiB
D
53 lines
1.2 KiB
D
|
module abstractfactory.nypizzaingredientfactory;
|
||
|
|
||
|
import abstractfactory.pizzaingredientfactory;
|
||
|
import abstractfactory.dough;
|
||
|
import abstractfactory.thincrustdough;
|
||
|
import abstractfactory.sauce;
|
||
|
import abstractfactory.marinarasauce;
|
||
|
import abstractfactory.cheese;
|
||
|
import abstractfactory.reggianocheese;
|
||
|
import abstractfactory.veggies;
|
||
|
import abstractfactory.garlic;
|
||
|
import abstractfactory.onion;
|
||
|
import abstractfactory.mushroom;
|
||
|
import abstractfactory.redpepper;
|
||
|
import abstractfactory.pepperoni;
|
||
|
import abstractfactory.slicedpepperoni;
|
||
|
import abstractfactory.clams;
|
||
|
import abstractfactory.freshclams;
|
||
|
|
||
|
class NYPizzaIngredientFactory : PizzaIngredientFactory
|
||
|
{
|
||
|
override Dough createDough()
|
||
|
{
|
||
|
return new ThinCrustDough();
|
||
|
}
|
||
|
|
||
|
override Sauce createSauce()
|
||
|
{
|
||
|
return new MarinaraSauce();
|
||
|
}
|
||
|
|
||
|
override Cheese createCheese()
|
||
|
{
|
||
|
return new ReggianoCheese();
|
||
|
}
|
||
|
|
||
|
override Veggies[] createVeggies()
|
||
|
{
|
||
|
Veggies[] veggies = cast(Veggies[])[ new Garlic(), new Onion(), new Mushroom(), new RedPepper() ];
|
||
|
return veggies;
|
||
|
}
|
||
|
|
||
|
override Pepperoni createPepperoni()
|
||
|
{
|
||
|
return new SlicedPepperoni();
|
||
|
}
|
||
|
|
||
|
override Clams createClam()
|
||
|
{
|
||
|
return new FreshClams();
|
||
|
}
|
||
|
}
|