Is a Square a Rectangle? (Liskov Substitution Principle)

added by BlackWasp
1/15/2011 1:47:58 PM

261 Views

In Geometry, a square is a special case of rectangle where the height and width of the shape are equal. When modelling squares and rectangles in object-oriented programming languages, defining this relationship can lead to unexpected bugs.


0 comments