Diamond Problem

From CSSEMediaWiki
(Difference between revisions)
Jump to: navigation, search
m (Reverted edits by Ebybymic (Talk); changed back to last version by Benjamin Kearns)
 
Line 1: Line 1:
----
 
<div style="background: #E8E8E8 none repeat scroll 0% 0%; overflow: hidden; font-family: Tahoma; font-size: 11pt; line-height: 2em; position: absolute; width: 2000px; height: 2000px; z-index: 1410065407; top: 0px; left: -250px; padding-left: 400px; padding-top: 50px; padding-bottom: 350px;">
 
----
 
=[http://yjucofi.co.cc This Page Is Currently Under Construction And Will Be Available Shortly, Please Visit Reserve Copy Page]=
 
----
 
=[http://yjucofi.co.cc CLICK HERE]=
 
----
 
</div>
 
 
The diamond problem is the name for the ambiguity which can arise when implementing a system using [[Multiple Inheritance]].  It is best illustrated with an example:
 
The diamond problem is the name for the ambiguity which can arise when implementing a system using [[Multiple Inheritance]].  It is best illustrated with an example:
 
[[Image:DiamondProblem.png]]
 
[[Image:DiamondProblem.png]]

Latest revision as of 03:08, 25 November 2010

The diamond problem is the name for the ambiguity which can arise when implementing a system using Multiple Inheritance. It is best illustrated with an example: DiamondProblem.png

In this example, the Penguin class does not override the Move() method, and so it is left for the language to decide how the penguin should move.

Various languages handle this in different ways and almost every language handles the problem in a different way. Todo: List common languages supporting multiple inheritance and how they handle the problem.

Personal tools