Builder interface pseudocode

Report a typo

Which of these code snippets represents builder interface?

1)

class ... is
  method cook()
  method addSimple(...)
  method addComplex(...)
  method salt()
  method pepper()

2)

class ... is
  field simpleDish:SimpleDish

  constructor dishSimple is
    method addSimple(...)
    method cook()

3)

class ... is
  field dish:Dish

  method setBuilder(dish:Dish)
    this.dish = dish

  method cookScrambledEggs() is
    dish.addSimple(eggs)
    dish.cook()
    
  method cookSteak() is
    dish.addComplex(meat)
    dish.salt()
    dish.papper()
    dish.cook()
Select one option from the list
___

Create a free account to access the full topic