LSP and subtype



Hello!!

Assume we have a class named Base with a method called foo.

We have a subklass to this Base called Sub also with a method called foo.

Now to my question:
I'm I right if I say that if the client can use this foo from Sub insted of
foo from Base for example by using polymorfism and the client doesn't see
any difference then Sub is a subtype of Base.

What requirement is on the client program when I say client doesn't see any
difference.
Does this actually mean that the client program must be identical when
calling foo in Base and when calling foo in Sub.

//Tony



.



Relevant Pages

  • Re: LSP and subtype
    ... I'm I right if I say that if the client can use this foo from Sub insted of foo from Base for example by using polymorfism and the client doesn't see any difference then Sub is a subtype of Base. ... Not only do we have to perform more surgery on the tree, we have to change the calling context in Client to invoke SubA.foorather than Base.foo. ...
    (comp.object)
  • Re: Need some general Tips and Tricks for programming !
    ... Jim that was what I wanted. ... Public Static Sub StartMain() ... NickHK asked what I was doing to cause so many crashes. ... For each global that you use, say "foo", You can manually ...
    (microsoft.public.excel.programming)
  • Re: Need some general Tips and Tricks for programming !
    ... Public Static Sub StartMain() ... NickHK asked what I was doing to cause so many crashes. ... For each global that you use, say "foo", You can manually ... create a range named "foo" on your spreadsheet. ...
    (microsoft.public.excel.programming)
  • Re: LSP and subtype
    ... >We have a subklass to this Base called Sub also with a method called foo. ... >What requirement is on the client program when I say client doesn't see any ... "The aim of science is not to open the door to infinite wisdom, ...
    (comp.object)
  • Re: Another use vs. require snafu
    ... >> sub a { ... package Foo; ... use strict; ... package Bar; ...
    (comp.lang.perl.misc)