principles:liskov_substitution_principle
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
principles:liskov_substitution_principle [2013-06-22 20:42] – christian | principles:liskov_substitution_principle [2021-09-02 18:26] – old revision restored (2021-09-02 10:48) 65.21.179.175 | ||
---|---|---|---|
Line 6: | Line 6: | ||
===== Context ===== | ===== Context ===== | ||
/* fill in contexts here: */ | /* fill in contexts here: */ | ||
- | * [[contexts: | + | * [[contexts: |
- | * [[contexts: | + | |
Line 13: | Line 12: | ||
> " | > " | ||
- | |||
===== Description ===== | ===== Description ===== | ||
- | Object-oriented programming languages allow to derive subtypes from base types and subtype polymorphism allows to pass an object of a subtype where ever an object of the supertype is specified. Suppose '' | ||
- | But the programming language does not enforce that the subtype also behaves like the supertype. Method '' | + | ===== Rationale ===== |
- | |||
- | |||
- | ===== Rationale ===== | ||
- | |||
- | Let '' | ||
===== Strategies ===== | ===== Strategies ===== | ||
Line 42: | Line 34: | ||
===== Origin ===== | ===== Origin ===== | ||
- | Barbara Liskov: //[[http://citeseerx.ist.psu.edu/ | + | Barbara Liskov: //[[http://portal.acm.org/ |
===== Evidence ===== | ===== Evidence ===== | ||
/* Comment out what is not applicable and explain the rest: */ | /* Comment out what is not applicable and explain the rest: */ | ||
- | + | /* | |
- | /* * [[wiki: | + | * [[wiki: |
- | + | * [[wiki: | |
- | * [[wiki: | + | * [[wiki: |
- | * [[wiki: | + | * [[wiki: |
- | + | */ | |
- | /* * [[wiki: | + | |
===== Relations to Other Principles ===== | ===== Relations to Other Principles ===== | ||
Line 76: | Line 67: | ||
- | ===== Examples | + | ===== Example |
===== Description Status ===== | ===== Description Status ===== | ||
/* Choose one of the following and comment out the rest: */ | /* Choose one of the following and comment out the rest: */ | ||
- | /*[[wiki: | + | [[wiki: |
- | [[wiki: | + | /*[[wiki: |
/ | / | ||
Line 92: | Line 83: | ||
* [[wiki> | * [[wiki> | ||
* [[wp> | * [[wp> | ||
- | * Barbara H. Liskov , Jeanette M. Wing: // | ||
- | * Barbara H. Liskov , Jeanette M. Wing: // | ||
- | |||
- | ===== Discussion ===== | ||
- | Discuss this wiki article and the principle on the corresponding [[talk: |
principles/liskov_substitution_principle.txt · Last modified: 2021-10-18 21:50 by christian