Question

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

Was it helpful?

Solution

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

enter image description here

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top