I want to accomplish the following, but I'm not sure how to do it:
class foo {
function doSomething(){
// do something
}
}
class bar extends foo {
function doSomething(){
// do something AND DO SOMETHING ELSE, but just for class bar objects
}
}
Is it possible to do this while still using the doSomething() method, or do I have to create a new method?
Edit: To clarify, I do not want to have to restate 'do something' in the inherited method, I just want to state it once in the foo->doSomething() method and then build upon it in child classes.