Search results
Results from the WOW.Com Content Network
Nonetheless, the principle is useful in reasoning about the design of class hierarchies. Liskov substitution principle imposes some standard requirements on signatures that have been adopted in newer object-oriented programming languages (usually at the level of classes rather than types; see nominal vs. structural subtyping for the distinction):
In software programming, SOLID is a mnemonic acronym for five design principles intended to make object-oriented designs more understandable, flexible, and maintainable. Although the SOLID principles apply to any object-oriented design, they can also form a core philosophy for methodologies such as agile development or adaptive software ...
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 ).
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 ...
Her notable work includes the introduction of abstract data types and the accompanying principle of data abstraction, along with the Liskov substitution principle, which applies these ideas to object-oriented programming, subtyping, and inheritance. Her work was recognized with the 2008 Turing Award, the highest distinction in computer science.
SOLID is a mnemonic invented by Michael Feathers which spells out five software engineering design principles: Single responsibility principle; Open/closed principle; Liskov substitution principle; Interface segregation principle; Dependency inversion principle
Liskov substitution principle in computer science is a particular definition of a subtyping relation, called (strong) behavioral subtyping. Llinás's law: "A neuron of a given kind cannot be functionally replaced by one of another type even if their synaptic connectivity and the type of neurotransmitter outputs are identical."
The Liskov Substitution Principle in computer science is sometimes expressed as a counter-example to the duck test: If it looks like a duck and quacks like a duck but it needs batteries, you probably have the wrong abstraction. [9]