Does Square want to expose the complete interface (setHeight, setWidth) of Rectangle such that Square can be used where Rectangle is expected? Indicates inheritance.
Does Square? want only some/part of the behavior exposed by Rectangle? Indicates Composition.
Square
is using inheritance, consider using composition instead.Does
Square
want to expose the complete interface (setHeight, setWidth
) ofRectangle
such thatSquare
can be used whereRectangle
is expected? Indicates inheritance.Does
Square
? want only some/part of the behavior exposed byRectangle
? Indicates Composition.Generated by :no_entry_sign: Danger