47 lines
1.4 KiB
Plaintext
47 lines
1.4 KiB
Plaintext
/* NetRexx */
|
|
options replace format comments java crossref symbols binary
|
|
|
|
class RInheritMultiple public
|
|
method main(args = String[]) public static
|
|
iPhone = RInheritMultiple_CameraPhone()
|
|
if iPhone <= RInheritMultiple_Camera then -
|
|
say -
|
|
'Object' hashToString(iPhone) '['iPhone.getClass().getSimpleName()']' -
|
|
'is a' RInheritMultiple_Camera.class.getSimpleName()
|
|
if iPhone <= RInheritMultiple_MobilePhone then -
|
|
say -
|
|
'Object' hashToString(iPhone) '['iPhone.getClass().getSimpleName()']' -
|
|
'is a' RInheritMultiple_MobilePhone.class.getSimpleName()
|
|
say iPhone.snap()
|
|
say iPhone.call()
|
|
return
|
|
method hashToString(that = Object) public static
|
|
return '@'(Rexx that.hashCode()).d2x().right(8, 0)
|
|
|
|
class RInheritMultiple_Camera private interface
|
|
-- properties follow...
|
|
shutter = 'click...'
|
|
-- method prototypes follow
|
|
method snap() public returns Rexx
|
|
|
|
class RInheritMultiple_MobilePhone private interface
|
|
-- properties follow...
|
|
ringTone = 'ring...'
|
|
-- method prototypes follow
|
|
method call() public returns Rexx
|
|
|
|
class RInheritMultiple_CameraPhone private -
|
|
implements -
|
|
RInheritMultiple_Camera, -
|
|
RInheritMultiple_MobilePhone -
|
|
uses -
|
|
RInheritMultiple_Camera, -
|
|
RInheritMultiple_MobilePhone
|
|
method RInheritMultiple_CameraPhone() public
|
|
return
|
|
-- method implementations follow
|
|
method snap() public
|
|
return shutter
|
|
method call() public
|
|
return ringTone
|