Square-rectangle problem

From CSSEMediaWiki
Revision as of 03:32, 20 July 2009 by JaninaVoigt (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

This problem is also known as the Circle-ellipse problem and is an antipattern. It occurs for example when Square inherits from Rectangle or Circle inherits from Ellipse. While these inheritance relationships may make sense conceptually (and mathematically), they constitute a violation of the Liskov substitution principle.

For more information about this problem, see Circle-ellipse problem.

Personal tools