static void Main() { AbstractBuilder abstractBuilder = new ABuilder(); Product product = abstractBuilder.GetProduct(); product.Print(); }
static Building MakeHouse(ABuilder builder) { Console.WriteLine("HOUSE START:"); builder.MakeRoof(); builder.MakeWalls(); builder.MakeFloor(); Console.WriteLine("HOUSE END:"); return(builder.GetBuilding()); }
static Building MakeMansion(ABuilder builder) { Console.WriteLine("MANSION START:"); builder.MakeRoof(); builder.MakeWalls(); builder.MakeFloor(); builder.MakeRoof(); builder.MakeWalls(); builder.MakeFloor(); builder.MakeRoof(); builder.MakeWalls(); builder.MakeFloor(); builder.MakeRoof(); builder.MakeWalls(); builder.MakeFloor(); Console.WriteLine("MANSION END:"); return(builder.GetBuilding()); }