// 建立 public void Construct(Builder theBuilder) { // 利用Builder產生各部份加入Product中 m_Product = new Product(); theBuilder.BuildPart1( m_Product ); theBuilder.BuildPart2( m_Product ); }
public override void BuildPart1(Product theProduct) { theProduct.AddPart( "ConcreteBuilderA_Part1"); }
public override void BuildPart2(Product theProduct) { theProduct.AddPart( "ConcreteBuilderB_Part2"); }
public abstract void BuildPart2(Product theProduct);