static void Main(string[] args) { //IMealFactory factory = new ItalianFactory(); IMealFactory factory = new IndianFactory(); IMainCourse main = factory.CreateMainCourse(); main.Consume(); IDessert dessert = factory.CreateDessert(); dessert.Enjoy(); }
static void Main(string[] args) { //ICuisine cuisine = new ItalianCuisine(); ICuisine cuisine = new IndianCuisine(); IMainCourse main = cuisine.CreateMainCourse(); main.Consume(); IDessert dessert = cuisine.CreateDessert(); dessert.Enjoy(); }