Ch4PizzaStore: last part with AbstractFactory. This example in the book is really TERRIBLE.

This commit is contained in:
2025-11-13 18:34:37 +01:00
parent aa967b81a4
commit 08b38b6643
2 changed files with 94 additions and 26 deletions

View File

@@ -3,9 +3,8 @@
using Ch4PizzaStore;
PizzaStore nyStore = new NYPizzaStore();
PizzaStore chicagoStore = new ChicagoPizzaStore();
var pizza = nyStore.OrderPizza("cheese");
Console.WriteLine($"Ethan ordered a {pizza.Name}\n");
pizza = chicagoStore.OrderPizza("cheese");
pizza = nyStore.OrderPizza("clam");
Console.WriteLine($"Joel ordered a {pizza.Name}\n");