September 2017 Update
This commit is contained in:
parent
bba7bfd280
commit
ba8067c3b7
14570 changed files with 153136 additions and 63871 deletions
|
|
@ -1,26 +1,24 @@
|
|||
#import system.
|
||||
|
||||
#symbol CameraFeature =
|
||||
class CameraFeature =
|
||||
{
|
||||
#method cameraMsg
|
||||
cameraMsg
|
||||
= "camera".
|
||||
}.
|
||||
|
||||
#class MobilePhone
|
||||
class MobilePhone
|
||||
{
|
||||
#method mobileMsg
|
||||
mobileMsg
|
||||
= "phone".
|
||||
}
|
||||
|
||||
#class CameraPhone :: MobilePhone
|
||||
class CameraPhone :: MobilePhone
|
||||
{
|
||||
#method => CameraFeature.
|
||||
dispatch => CameraFeature.
|
||||
}
|
||||
|
||||
#symbol program =
|
||||
program =
|
||||
[
|
||||
#var cp := CameraPhone new.
|
||||
var cp := CameraPhone new.
|
||||
|
||||
console writeLine:(cp cameraMsg).
|
||||
console writeLine:(cp mobileMsg).
|
||||
console writeLine(cp cameraMsg).
|
||||
console writeLine(cp mobileMsg).
|
||||
].
|
||||
|
|
|
|||
|
|
@ -1,26 +1,25 @@
|
|||
#import system.
|
||||
#import system'dynamic.
|
||||
import system'dynamic.
|
||||
|
||||
#class CameraFeature
|
||||
class CameraFeature
|
||||
{
|
||||
#method cameraMsg
|
||||
cameraMsg
|
||||
= "camera".
|
||||
}
|
||||
|
||||
#class MobilePhone
|
||||
class MobilePhone
|
||||
{
|
||||
#method mobileMsg
|
||||
mobileMsg
|
||||
= "phone".
|
||||
}
|
||||
|
||||
#symbol CameraPhone =
|
||||
class CameraPhone =
|
||||
{
|
||||
new = MobilePhone new mix &into:(CameraFeature new).
|
||||
new = MobilePhone new; mixInto(CameraFeature new).
|
||||
}.
|
||||
|
||||
#symbol program =
|
||||
program =
|
||||
[
|
||||
#var cp := CameraPhone new.
|
||||
var cp := CameraPhone new.
|
||||
|
||||
console writeLine:(cp cameraMsg).
|
||||
console writeLine:(cp mobileMsg).
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue