Beispiel #1
0
 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);
 }
  /** @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);
  }