T
Tony Johansson
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 instead 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
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 instead 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