Interface inheritance

Interface inheritance

In object-oriented programming, interface inheritance is type of inheritance wherein one or more classes share a set of messages. This sharing can be realized by agreement, as in Python, or by use of programming-language-specific machinery, as in Java.

Interface inheritance is considered the most important aspect of "inheritance"Fact|date=February 2007. It is often conflated with the notion of implementation inheritance in the object-oriented programming paradigm. There is, however, a subtle, but notable difference: the latter is less flexible than the former, as it is unamiable to "encapsulation"Fact|date=February 2007.

In Java, this is the mechanism used when multiple inheritance is desired. Since Java does not support multiple inheritance, the implementation of multiple interfaces allows it to satisfy the "is-a" relationship for multiple "super"classes.

ee also

*Polymorphism
*Subtype
*Constructor (computer science)


Wikimedia Foundation. 2010.

Игры ⚽ Нужно сделать НИР?

Look at other dictionaries:

  • Inheritance (object-oriented programming) — In object oriented programming (OOP), inheritance is a way to reuse code of existing objects, establish a subtype from an existing object, or both, depending upon programming language support. In classical inheritance where objects are defined by …   Wikipedia

  • Interface (computer science) — Interface generally refers to an abstraction that an entity provides of itself to the outside. This separates the methods of external communication from internal operation, and allows it to be internally modified without affecting the way outside …   Wikipedia

  • Interface en informatique — Interface (informatique) ██████████ …   Wikipédia en Français

  • Interface (Java) — An interface in the Java programming language is an abstract type that is used to specify an interface (in the generic sense of the term) that classes must implement. Interfaces are declared using the interface keyword, and may only contain… …   Wikipedia

  • Interface (computing) — For other uses, see Interface. In the field of computer science, an interface is a tool and concept that refers to a point of interaction between components, and is applicable at the level of both hardware and software. This allows a component,… …   Wikipedia

  • Interface (informatique) — ██████████70  …   Wikipédia en Français

  • Inheritance (computer science) — In object oriented programming, inheritance is a way to form new classes (instances of which are called objects) using classes that have already been defined. The inheritance concept was invented in 1967 for Simula. [ [http://heim.ifi.uio.no/… …   Wikipedia

  • Implementation inheritance — In programming, Implementation inheritance is the inheritance of the full functionality of a class, as opposed to the inheritance of an interface, which simply defines the methods that must be present. Implementation and Interface inheritance… …   Wikipedia

  • Composition over inheritance — in object oriented programming is a technique by which classes may achieve polymorphic behavior and code reuse by containing other classes which implement the desired functionality instead of through inheritance.[1] This technique is also… …   Wikipedia

  • Fragile binary interface problem — The fragile binary interface problem or FBI is a shortcoming of certain object oriented language compilers, in which internal changes to an underlying class library can cause descendant libraries or programs to cease working. It is an example of… …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”