<P> Multiple inheritance has been a sensitive issue for many years, with opponents pointing to its increased complexity and ambiguity in situations such as the "diamond problem", where it may be ambiguous as to which parent class a particular feature is inherited from if more than one parent class implements said feature . This can be addressed in various ways, including using virtual inheritance . Alternate methods of object composition not based on inheritance such as mixins and traits have also been proposed to address the ambiguity . </P> <P> In object - oriented programming (OOP), inheritance describes a relationship between two classes in which one class (the child class) subclasses the parent class . The child inherits methods and attributes of the parent, allowing for shared functionality . For example, one might create a variable class Mammal with features such as eating, reproducing, etc.; then define a child class Cat that inherits those features without having to explicitly program them, while adding new features like chasing mice . </P> <P> Multiple inheritance allows programmers to use more than one totally orthogonal hierarchy simultaneously, such as allowing Cat to inherit from Cartoon character and Pet and Mammal and access features from within all of those classes . </P> <P> Languages that support multiple inheritance include: C++, Java (Java SE 9), Common Lisp (via Common Lisp Object System (CLOS)), EuLisp (via The EuLisp Object System TELOS), Curl, Dylan, Eiffel, Logtalk, Object REXX, Scala (via use of mixin classes), OCaml, Perl, Perl 6, POP - 11, Python, and Tcl (built - in from 8.6 or via Incremental Tcl (Incr Tcl) in earlier versions). </P>

Diamond problem and its solution in oops language