RosettaCodeData/Task/Inheritance-Multiple/00DESCRIPTION

10 lines
480 B
Text
Raw Permalink Normal View History

2015-02-20 00:35:01 -05:00
Multiple inheritance allows to specify that one [[classes | class]] is a subclass of several other classes.
Some languages allow multiple [[inheritance]] for arbitrary classes,
others restrict it to interfaces, some don't allow it at all.
2013-04-10 21:29:02 -07:00
2015-02-20 00:35:01 -05:00
Write two classes (or interfaces) <tt>Camera</tt> and <tt>MobilePhone</tt>,
then write a class <tt>CameraPhone</tt> which is both a <tt>Camera</tt> and
a <tt>MobilePhone</tt>.
2013-04-10 21:29:02 -07:00
There is no need to implement any functions for those classes.