Teach Time Encyclopedia - Learn About Our World
Home Page
Teach Time
Featured Topics

United States
by state

CITYology

Academic Disciplines

Historical Timelines

Themed Timelines

Calendars

Reference Tables

Biographies

How-tos



Saturday, September 06, 2008

Inheritance (computer science)

In computer science, inheritance creates an is a relationship between data structures.

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 is fundamentally different than composition, where the relationship is has a instead of is a, for example, "a car has a motor".

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.

Thus passing any to an Recorder.captureSoundOf(NoiseMaker()); would capture the sound emitted. Thus from the 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.

In the UML, is a is a relationship symbolized with an arrow; a white arrowhead points to the superclass. The tail of the arrow rests on the subclass.

Sowa's conceptual graph places the is a in a bubble (circle). The classes [Socrates] and [Man] are placed in rectangles.

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

References:
  • Ronald J. Brachman: What IS-A is and isn't, An Analysis of Taxonomic Links in Semantic Networks; IEEE Computer, 16 (10); October 1983 [1]
  • Jean-Luc Hainaut, Jean-Marc Hick, Vincent Englebert, Jean Henrard, Didier Roland: Understanding Implementations of IS-A Relations, ER 1996: 42-57 [1]


Internet Hotel Solutions

Site Sponsors
AC Units
Baltimore Harbor
Boot Camp Grads
Bra Size
Burkittsville
College Hotels
Digital Harbor
Free Cell Phones
Golden Hare Travel
Golf Vacations
Golf Courses
Gourmet
Hair Styles
Hippodrome
iWoman
Lesson Plans
Maryland Hotels
MD Genealogy
Minor League Stuff
Motel Site
Ocean City
OC Real Estate
Old Agers
Office Supplies
Orlando
Pet Friendly Hotel
Room Prices
Savannah, GA
Ski Vacations
South Baltimore
Student Teaching
Travel Sources
University Hotels
Visit Military Bases
Washington, DC

Brought to you by NoChildLeftBehind.com and the Beaches and Towns Network, LLC.