View Single Post
  #33  
Old 06-23-2007, 11:49 PM
JkWhoSaysNi JkWhoSaysNi is offline
Ruler of the graalaxy
Join Date: Feb 2005
Location: Great Britain
Posts: 488
JkWhoSaysNi is on a distinguished road
Send a message via ICQ to JkWhoSaysNi
Not true. In a lot of OO lanuguages in the child class you can choose to redefine (inherit) or override (no inheritance) or even in some languages, undefine the function.

E.g. in Eiffel (which probably has one of the best OO models going) to allow for real multiple inheritance you can choose to rename, redefine or undefine (or a few others iirc)
code example

PHP Code:
class
 
child
inherit
 parent
  redefine functionName
end
feature 
 functionName 
  
do 
    
precursor --run the function of the same name in the parent
     
--then do whatever
  end 
Similar functionality is available in Delphi.
__________________

Coming soon (Hopefully:P)
Reply With Quote