Inheritance/Multiple: Difference between revisions
Content added Content deleted
No edit summary |
|||
Line 337: | Line 337: | ||
} |
} |
||
public program |
|||
[ |
[ |
||
var cp := CameraPhone new. |
var cp := CameraPhone new. |
||
Line 343: | Line 343: | ||
console writeLine(cp cameraMsg). |
console writeLine(cp cameraMsg). |
||
console writeLine(cp mobileMsg). |
console writeLine(cp mobileMsg). |
||
] |
]</lang> |
||
Alternatively a group object may be created |
Alternatively a group object may be created |
||
<lang elena>import system'dynamic. |
<lang elena>import system'dynamic. |
||
Line 364: | Line 364: | ||
}. |
}. |
||
public program |
|||
[ |
[ |
||
var cp := CameraPhone new. |
var cp := CameraPhone new. |
||
Line 370: | Line 370: | ||
console writeLine:(cp cameraMsg). |
console writeLine:(cp cameraMsg). |
||
console writeLine:(cp mobileMsg). |
console writeLine:(cp mobileMsg). |
||
] |
]</lang> |
||
=={{header|Fantom}}== |
=={{header|Fantom}}== |