コード例 #1
0
ファイル: Test.java プロジェクト: sengopal/DesignPatterns
 public static void main(String[] args) {
   HouseBuilder iglooBuilder = new IglooHouseBuilder();
   CivilEngineer engineer = new CivilEngineer(iglooBuilder);
   engineer.constructHouse();
   House house = engineer.getHouse();
   System.out.println("Builder constructed: " + house);
 }
コード例 #2
0
  /** @param args */
  public static void main(String[] args) {
    HouseBuilder duplexBuilder = new SmallHouseBuilder();
    CivilEngineer engineer = new CivilEngineer(duplexBuilder);
    engineer.constructHouse();

    House house = engineer.getHouse();
    System.out.println("Builder Constructed : " + house);
  }