Is deriving square from rectangle a violation of Liskov's Substitution Principle?
        Posted  
        
            by somaraj
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by somaraj
        
        
        
        Published on 2009-06-23T03:39:41Z
        Indexed on 
            2010/05/11
            23:54 UTC
        
        
        Read the original article
        Hit count: 242
        
I am new to design and learning the design principles.
It says deriving square from rectangle is a classic example of violation of Liskov's Substitution Principle.
If that's the case, what should be the correct design?
© Stack Overflow or respective owner