public abstract class TemplatePattern
{
public void RecipeMethod()
{
SetName();
Ingredients();
Preparation();
Cook();
}
public abstract string SetName();
public abstract Array Ingredients();
public abstract Array Preparation();
public abstract Array Cook();
public sealed class SpanishRice : TemplatePattern
{
string[] ingredients = { "rice", "tomato sauce", "jalapeno chiles", "onions", "frozen peas and carrots", "chili oil" };
string[] preparation = { "Wash rice", "chop chiles", "dice onions" };
string[] cook = { "season pan with oil, onions and chiles", "pan fry rice", "add tomato sauce", "add frozen peas and carrots", "cover", "let stand for 20 min" };
public override string SetName() { return "Spanish Rice"; }
public override Array Ingredients() { return ingredients; }
public override Array Preparation() { return preparation; }
public override Array Cook() { return cook; }
}
public sealed class PorkFriedRice : TemplatePattern
{
string[] ingredients = { "jasmine rice", "pork loin", "onions", "frozen Peas and carrots", "chopped ginger", "chopped garlic", "sesame seek oil", "soy sauce" };
string[] preparation = { "wash rice", "cook rice in rice cooker", "refrigerate rice overnite", "dice pork loin", "dice onions" };
string[] cook = { "season pan with sesame oil, onions, ginger, and garlic", "stir fry pork loin", "add cold rice, soy sauce, and frozen peas and carrots", "stir fry" };
public override string SetName() { return "Pork Fried Rice"; }
public override Array Ingredients() { return ingredients; }
public override Array Preparation() { return preparation; }
public override Array Cook() { return cook; }
}
public sealed class ShrimpFriedRice : TemplatePattern
{
string[] ingredients = { "jasmine rice", "shrimp", "onions", "frozen Peas and carrots", "chopped ginger", "chopped garlic", "sesame seek oil", "soy sauce" };
string[] preparation = { "wash rice", "cook rice in rice cooker", "refrigerate rice overnite", "peel and devein shrimp", "dice onions" };
string[] cook = { "season pan with sesame oil, onions, ginger, and garlic", "stir fry shrimp", "add cold rice, soy sauce, and frozen peas and carrots", "stir fry" };
public override string SetName() { return "Shrimp Fried Rice"; }
public override Array Ingredients() { return ingredients; }
public override Array Preparation() { return preparation; }
public override Array Cook() { return cook; }
}
}//end of Template class