0

Is it correct to say that in subtyping the interface of the supertype is kept while the observable behaviour is allowed to change, while in subclassing both the interface and the observable behaviour of the superclass must be maintained?

Arian
  • 7,397
  • 21
  • 89
  • 177
  • 1
    Do you have a source or anything where those terms are used? In the context I am usually working with, those terms are synonyms. – Zabuzard Apr 12 '20 at 20:04
  • Does this answer your question? [In what ways are subtypes different from subclasses in usage?](https://stackoverflow.com/questions/7072290/in-what-ways-are-subtypes-different-from-subclasses-in-usage) – jaco0646 Apr 12 '20 at 20:27
  • @Zabuza this is rather a theoretical OO question. – Arian Apr 15 '20 at 04:44
  • @jaco0646 not really. The accepted answer refers to code, while I'd like to distill the fact. – Arian Apr 15 '20 at 04:45
  • Well, still. In the context I am typically working with, both mean the exact same. So the answer to your question would be "there is no difference, they are synonyms". But in your context this is probably different, which I would like to get more insights into that. Maybe you have read the terms somewhere and could show a link? – Zabuzard Apr 15 '20 at 06:35
  • This comes from Distilled UML book by Martin Fowler. – Arian Apr 15 '20 at 17:10

0 Answers0