Anonymous user
Inheritance/Multiple: Difference between revisions
→{{header|Elena}}
No edit summary |
|||
Line 240:
=={{header|Elena}}==
ELENA only permits inheritance from one parent class. However, mixins are supported
<lang elena>
{
= "camera".
}.
{
= "phone".
}
{
}
[
console writeLine:(cp cameraMsg).
console writeLine:(cp mobileMsg).
].</lang>
Alternatively a group object may be created
<lang elena>#import system'dynamic.
{
= "camera".
}
{
= "phone".
}
{
new = MobilePhone new mix &into:(CameraFeature new).
}.
[
console writeLine:(cp cameraMsg).
|