LSP and subtype
- From: "Tony Johansson" <johansson.andersson@xxxxxxxxx>
- Date: Thu, 13 Oct 2005 20:50:28 GMT
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
.
- Follow-Ups:
- Re: LSP and subtype
- From: Robert C . Martin
- Re: LSP and subtype
- From: H. S. Lahman
- Re: LSP and subtype
- Prev by Date: Re: Data driven people arguments
- Next by Date: Re: Data driven people arguments
- Previous by thread: <UML> Relationships for data members and function arguments
- Next by thread: Re: LSP and subtype
- Index(es):
Relevant Pages
|