static void Main(string[] args) { ProductBuilder builder = new ProductBuilder(); Product product = BuildProduct(builder); OtherProductBuilder counter = new OtherProductBuilder(); BuildProduct(counter); int prod1Count = 0; int prod2Count = 0; int prod3Count = 0; counter.GetProductsCount(out prod1Count, out prod2Count, out prod3Count); Console.WriteLine("Product 1 Count = " + prod1Count); Console.WriteLine("Product 2 Count = " + prod2Count); Console.WriteLine("Product 3 Count = " + prod3Count); Console.ReadLine(); }
public Product GenerateProduct(ProductBuilder builder, Product product) { return(builder.ApplyDiscount(product)); }
public void GeneratedProduct(ProductBuilder productBuilder) { productBuilder.GetProductData(); productBuilder.ApplyDiscount(); }