When Not to Use Inheritance
That's even weirder:
public void translate(double dx, double 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
previous
|
start
|
next
.... [Slide 66] ....