public static void Main() { var shop = new Director_Shop(); var childBuilder = new childBuilder(); var adultBuilder = new AdultBuilder(); shop.Construct(childBuilder); var childPackage = childBuilder.GetResult(); childPackage.Show("child"); shop.Construct(adultBuilder); var adultPackage = adultBuilder.GetResult(); adultPackage.Show("adult"); }
public static void Main() { var shop = new Director_Shop(); var childBuilder = new childBuilder(); var adultBuilder = new AdultBuilder(); shop.Construct(childBuilder); Product childPackage = childBuilder.GetResult(); Console.WriteLine("ChildPackage"); childPackage.Show(); Console.WriteLine("AdultPackage"); shop.Construct(adultBuilder); Product adultPackage = adultBuilder.GetResult(); adultPackage.Show(); Console.ReadLine(); }