Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
72
Task/Abstract-type/NetRexx/abstract-type.netrexx
Normal file
72
Task/Abstract-type/NetRexx/abstract-type.netrexx
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
/* NetRexx */
|
||||
options replace format comments java crossref symbols binary
|
||||
|
||||
-- -----------------------------------------------------------------------------
|
||||
class RCAbstractType public final
|
||||
|
||||
method main(args = String[]) public constant
|
||||
|
||||
say ' Testing' RCAbstractType.class.getSimpleName
|
||||
say ' Creating an object of type:' Concrete.class.getSimpleName
|
||||
conk = Concrete()
|
||||
say 'getClassName:'.right(20) conk.getClassName
|
||||
say 'getIfaceName:'.right(20) conk.getIfaceName
|
||||
say 'mustImplement:'.right(20) conk.mustImplement
|
||||
say 'canOverride1:'.right(20) conk.canOverride1
|
||||
say 'canOverride2:'.right(20) conk.canOverride2
|
||||
say 'callOverridden2:'.right(20) conk.callOverridden2
|
||||
|
||||
return
|
||||
|
||||
-- -----------------------------------------------------------------------------
|
||||
class RCAbstractType.Iface interface
|
||||
|
||||
ifaceName = RCAbstractType.Iface.class.getSimpleName
|
||||
|
||||
method getIfaceName() public returns String
|
||||
method canOverride1() public returns String
|
||||
method canOverride2() public returns String
|
||||
|
||||
-- -----------------------------------------------------------------------------
|
||||
class RCAbstractType.Abstraction abstract implements RCAbstractType.Iface
|
||||
|
||||
properties inheritable
|
||||
className = String
|
||||
|
||||
method Abstraction() public
|
||||
setClassName(this.getClass.getSimpleName)
|
||||
return
|
||||
|
||||
method mustImplement() public abstract returns String
|
||||
|
||||
method getClassName() public returns String
|
||||
return className
|
||||
|
||||
method setClassName(nm = String) public
|
||||
className = nm
|
||||
return
|
||||
|
||||
method getIfaceName() public returns String
|
||||
return RCAbstractType.Iface.ifaceName
|
||||
|
||||
method canOverride1() public returns String
|
||||
return 'In' RCAbstractType.Abstraction.class.getSimpleName'.canOverride1'
|
||||
|
||||
method canOverride2() public returns String
|
||||
return 'In' RCAbstractType.Abstraction.class.getSimpleName'.canOverride2'
|
||||
|
||||
-- -----------------------------------------------------------------------------
|
||||
class RCAbstractType.Concrete extends RCAbstractType.Abstraction
|
||||
|
||||
method Concrete() public
|
||||
super()
|
||||
return
|
||||
|
||||
method mustImplement() public returns String
|
||||
return 'In' RCAbstractType.Concrete.class.getSimpleName'.mustImplement'
|
||||
|
||||
method canOverride2() public returns String
|
||||
return 'In' RCAbstractType.Concrete.class.getSimpleName'.canOverride2'
|
||||
|
||||
method callOverridden2() public returns String
|
||||
return super.canOverride2
|
||||
Loading…
Add table
Add a link
Reference in a new issue