title: Equals for extended object wants to check super.equals(), should this be composition instead of inheritance if I do not want this check
body: <p>So the scenario is as follows:  </p>
  
  <pre><code>class Feline  
  {  
     String name;  
     int age;  
  
     equals(Object obj) {...}  
     hashCode(){...}  
  }  
  
  
  class Cat extends Feline  
  {  
     int teeth;  
  
     hashCode(){...}  
     equals(Object obj)  
     {
       if (!super.equals(obj))
      {
          return false;   //If I don't want this should I use 
      }    
        ...
     }  
  }
  </code></pre>
  
  <p>The issue is in reality this inheritance is correct, but to the program it is not necessarily true.  My thought on this is <code>Cat</code> should actually be composed of a <code>Feline</code> object.  The question is, which of these approaches should I take?</p>
  
  <p>EDIT<br>
  This is the implementation from Eclipse, default equals/hashcode.  It may be that the implementation of equals is not the most accurate way to do this.</p>