2023-07-01 11:58:00 -04:00
|
|
|
import system'dynamic;
|
|
|
|
|
|
|
|
|
|
class CameraFeature
|
|
|
|
|
{
|
|
|
|
|
cameraMsg
|
|
|
|
|
= "camera";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class MobilePhone
|
|
|
|
|
{
|
|
|
|
|
mobileMsg
|
|
|
|
|
= "phone";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
singleton CameraPhone
|
|
|
|
|
{
|
|
|
|
|
new() = new MobilePhone().mixInto(new CameraFeature());
|
|
|
|
|
}
|
|
|
|
|
|
2026-02-01 16:33:20 -08:00
|
|
|
public Program()
|
2023-07-01 11:58:00 -04:00
|
|
|
{
|
|
|
|
|
var cp := CameraPhone.new();
|
|
|
|
|
|
2026-02-01 16:33:20 -08:00
|
|
|
Console.writeLine(cp.cameraMsg);
|
|
|
|
|
Console.writeLine(cp.mobileMsg)
|
2023-07-01 11:58:00 -04:00
|
|
|
}
|