Thus the logic proposition "Socrates is a man" states that the Socrates also has the attributes of other men. Currently Java and C++, among others, allow this type of proposition to be stated directly in the respective languages by using the Java construct subclass name
extends class name, or the C++ notation subclass
: class name.
Inheritance can also be used in interfaces to give the appearance of being whatever - for example if we have an such an interface below, these could all have a "makeNoise();" method.
perspective of a recorder, each is a NoiseMaker.
However, there has been no small amount of inconsistency in the usage of the "is-a" link: R. J. Brachman wrote a paper titled "What IS-A is and isn't", wherein 29 different semantics were found in projects whose knowledge representation schemes involved an "is-a" link. Other links include the "has-part" or "has a" link.
Some computer scientists, such as the principal designer of CLU, Barbara Liskov, urge that the use of inheritance be restricted to those designs which truly reflect the problem being solved, and that re-use and subtype polymorphism are not actually the strong points of a design resting solely on inheritance.
The most widely encountered practical application of inheritance is in word processors, where people often don't realize except intuitively that the components of the document are inheriting layout and style properties from their parent elements, not even when they are using style sheets for formatting.
A similar impression can be seen with drawing programs.
Usage in different fields