DP: abstract factory, java flavour