M
Mike C#
Suppose I have a base class "foo". Another class, "bar" derives from it.
Base class "foo" has a method called "rob_the_liquor_store()", and the
inherited class "bar" overrides this method with one of its own, maybe
specifying the liquor store over on 44th Street and 5th Avenue or something.
Anyway this is what we have so far:
base class: "foo"
|------------method: "rob_the_liquor_store()"
|
|
derived class: "bar" inherits from "foo"
|------------method: "rob_the_liquor_store()"
Now the question: If I add another method to "foo" (in keeping with
character, let's call it "commit_a_felony()"), can I specify that it should
call the inherited class's ("bar's") "rob_the_liquor_store()" method instead
of the base class's? If so, how?
Thanks
Base class "foo" has a method called "rob_the_liquor_store()", and the
inherited class "bar" overrides this method with one of its own, maybe
specifying the liquor store over on 44th Street and 5th Avenue or something.
Anyway this is what we have so far:
base class: "foo"
|------------method: "rob_the_liquor_store()"
|
|
derived class: "bar" inherits from "foo"
|------------method: "rob_the_liquor_store()"
Now the question: If I add another method to "foo" (in keeping with
character, let's call it "commit_a_felony()"), can I specify that it should
call the inherited class's ("bar's") "rob_the_liquor_store()" method instead
of the base class's? If so, how?
Thanks