Inheritance/Multiple: Difference between revisions
Content deleted Content added
Added Rust |
|||
Line 324:
=={{header|Elena}}==
ELENA only permits inheritance from one parent class. However, mixins are supported
<lang elena>
{
cameraMsg
= "camera"
}
class MobilePhone
{
mobileMsg
= "phone"
}
class CameraPhone
{
dispatch() => CameraFeature
}
public program()
{
var cp :=
console
console
Alternatively a group object may be created
<lang elena>import system'dynamic
class CameraFeature
{
cameraMsg
= "camera"
}
Line 360:
{
mobileMsg
= "phone"
}
{
new() =
}
public program()
{
var cp := CameraPhone
console
console
=={{header|Factor}}==
|