SE450
:
Composite: Variations
[13/24]
Using a static factory
Refactor to strategy (binary operations all have same form)
n
ary ops. What if
Plus
and
Mult
take any number of operands? Need an
add
method on the composite.
Using Builder for
n
ary ops
Mutable Composites
put
add
in interface
use two interfaces