enow.com Web Search

Search results

  1. Results from the WOW.Com Content Network
  2. Liskov substitution principle - Wikipedia

    en.wikipedia.org/wiki/Liskov_substitution_principle

    The Liskov substitution principle (LSP) is a particular definition of a subtyping relation, called strong behavioral subtyping, that was initially introduced by Barbara Liskov in a 1987 conference keynote address titled Data abstraction and hierarchy.

  3. Behavioral subtyping - Wikipedia

    en.wikipedia.org/wiki/Behavioral_subtyping

    In an influential keynote address [4] on data abstraction and class hierarchies at the OOPSLA 1987 programming language research conference, Barbara Liskov said the following: "What is wanted here is something like the following substitution property: If for each object of type S there is an object of type T such that for all programs P defined in terms of T, the behavior of P is unchanged ...

  4. Composition over inheritance - Wikipedia

    en.wikipedia.org/wiki/Composition_over_inheritance

    Composition over inheritance (or composite reuse principle) in object-oriented programming (OOP) is the principle that classes should favor polymorphic behavior and code reuse by their composition (by containing instances of other classes that implement the desired functionality) over inheritance from a base or parent class. [2]

  5. SOLID - Wikipedia

    en.wikipedia.org/wiki/SOLID

    The Liskov substitution principle (LSP) states that "[f]unctions that use pointers or references to base classes must be able to use objects of derived classes without knowing it." [ 5 ] See also design by contract .

  6. is-a - Wikipedia

    en.wikipedia.org/wiki/Is-a

    Liskov substitution principle explains a property, "If for each object o1 of type S there is an object o2 of type T such that for all programs P defined in terms of T, the behavior of P is unchanged when o1 is substituted for o2 then S is a subtype of T,". [5] Following example shows a violation of LSP. Here is perhaps an example of violation ...

  7. Covariance and contravariance (computer science) - Wikipedia

    en.wikipedia.org/wiki/Covariance_and_contra...

    In proposing this use of inheritance, the Eiffel designers reject the Liskov substitution principle, which states that objects of subclasses should always be less restricted than objects of their superclass. One other instance of a mainstream language allowing covariance in method parameters is PHP in regards to class constructors.

  8. Circle–ellipse problem - Wikipedia

    en.wikipedia.org/wiki/Circle–ellipse_problem

    By definition, this problem is a violation of the Liskov substitution principle, one of the SOLID principles. The problem concerns which subtyping or inheritance relationship should exist between classes which represent circles and ellipses (or, similarly, squares and rectangles ).

  9. LSP - Wikipedia

    en.wikipedia.org/wiki/LSP

    LSP may refer to: Governance and politics ... Liskov substitution principle, object-oriented programming principle; Logical Standby Process, ...