title: Square and Rectangle can subclass Shape, but can Square subclass Rectangle?
body: <p>You can have a super class Shape, Square and Rectangle are two children class, but can you have Square subclass Rectangle as Square is a special Rectangle with four sides equal?</p>
  
  <p>I tried to examine using the principle that whenever a super class is used, it should be able to be replaced by its child class, but if a child class is used, it may not be able to be replaced by its super class. Looks like it is fine, but I always feel Square cannot be a child of Rectangle for some reason? Can anyone shed me some light?</p>