B
Brian Gideon
Correct. A square is not an extension of a rectangle, it is a constraint on
a rectangle, so making Square derived from Rectangle is bad. Not all
rectangles are squares, so making Rectangle derived from Square is very bad.
Well, I don't think deriving Square from Rectangle is necessarily
bad. At least a square is a rectangle and had the blogger done the
derivation in that direction I wouldn't be beating down his argument.
Maybe that's the subject of another debate though.