Pregunta

There are 2 different design. Second one is(below) improved version of first one. Difference is that I add 2 child class to B. So A is dependended to 2 child class now. but what will happen if B has more child classes later?

Is it really best practice? Especially with GRASP perspective?

two different version

¿Fue útil?

Solución

Instad of having an association to each classes, I would prefer the following.

enter image description here

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top