OO Concept: Liskov Substitution Principle



Hi,

Just read an article talking about the LSP in term of OO design:
http://www.objectmentor.com/resources/articles/lsp.pdf

The article said Rectangle class should not be a superclass of Square
class.

Okay, so how you would design the Rectangle & Square class?


The article did not cover that, so what are your opinion?


Howard
.



Relevant Pages

  • Re: OO Concept: Liskov Substitution Principle
    ... Just read an article talking about the LSP in term of OO design: ... The article said Rectangle class should not be a superclass of Square ...
    (comp.lang.java.programmer)
  • Re: Need suggestions for school patchwork
    ... some sewing (I have already been asked to design Joseph's Dreamcoat for the school production in June - if you want a quiet life, don't let anyone know you sew!) She and another teacher had seen a patchwork banner in another school and wanted to emulate it. ... All of the children have painted designs on a square of white fabric. ... She doesn't want buttons, pop studs, velcro or anything like that, because she doesn't want any visual element interfering with the children's designs. ...
    (rec.crafts.textiles.quilting)
  • Re: business cards
    ... Go back and read what I said about DESIGN. ... every square, that's pretty awful and ametuerish (just like a musician who ... Dogmatism kills jazz. ... Iconoclasm kills rock. ...
    (rec.music.makers.guitar.jazz)
  • Re: Early LM prototypes with round front hatch.
    ... design before te design was "frozen". ... square after evaluations of egress. ... through a square hatch than a round one. ...
    (sci.space.history)
  • Re: Brackets and the Invention of CSS
    ... to leave us with the legacy of the curly brackets (for which one ... has to shift press) rather than the square (for which one simply ... Square brackets are for attribute selectors. ... That's good keyboard design, not good syntax design. ...
    (comp.infosystems.www.authoring.stylesheets)