SE450
:
When Not to Use Inheritance
[64/65]
That's even weirder:
public void translate(int dx, int dy)
{
super.translate(dx, dy);
other.translate(dx, dy);
}
Why did they do that?
Wanted to avoid abstract class
Shape
Remedy: Use aggregation.
Circle, Rectangle classes
have
points