SE450
:
Access to Superclass Features
[42/65]
Why does the
HouseShape
constructor call
add
?
public HouseShape()
{
add(new Rectangle(...));
add(new Triangle(...));
}
Why not just
path.append(new Rectangle(...));
HouseShape
inherits
path
field
HouseShape
can't access
path
path
is private to superclass