Multiple inheritance allows to specify that one  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.



Task

Write two classes (or interfaces) Camera and MobilePhone,   then write a class CameraPhone which is both a Camera and a MobilePhone.

There is no need to implement any functions for those classes.




class Camera
  string cbuf
  method TakePhoto()
  end method
  method ViewPhoto()
  end method
end class
 
class MobilePhone
  string pbuf
  method MakeCall()
  end method
  method TakeCall()
  end method
end class
 
class CameraPhone
  has Camera,MobilePhone
end class
 
CameraPhone cp
 
cp.ViewPhoto
cp.MakeCall