Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
21
Task/Inheritance-Single/PureBasic/inheritance-single-1.basic
Normal file
21
Task/Inheritance-Single/PureBasic/inheritance-single-1.basic
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
Interface Animal
|
||||
Eat()
|
||||
Sleep()
|
||||
EndInterface
|
||||
|
||||
Interface Cat Extends Animal
|
||||
ChaseMouse()
|
||||
EndInterface
|
||||
|
||||
Interface Dog Extends Animal
|
||||
Bark()
|
||||
WagTail()
|
||||
EndInterface
|
||||
|
||||
Interface Lab Extends Dog
|
||||
Swim()
|
||||
EndInterface
|
||||
|
||||
Interface Collie Extends Dog
|
||||
HeardSheep()
|
||||
EndInterface
|
||||
27
Task/Inheritance-Single/PureBasic/inheritance-single-2.basic
Normal file
27
Task/Inheritance-Single/PureBasic/inheritance-single-2.basic
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
Class Animal
|
||||
EndClass
|
||||
|
||||
Class Dog Extends Animal
|
||||
Public Method Bark()
|
||||
EndMethod
|
||||
EndClass
|
||||
|
||||
Class Cat Extends Animal
|
||||
Public Method Sleep()
|
||||
EndMethod
|
||||
EndClass
|
||||
|
||||
Class Lab Extends Dog
|
||||
Public Method Swim()
|
||||
EndMethod
|
||||
EndClass
|
||||
|
||||
Class Collie Extends Dog
|
||||
Public Method Fetch()
|
||||
EndMethod
|
||||
EndClass
|
||||
|
||||
;- test the code
|
||||
*Lassie.Collie = NewObject.Collie
|
||||
*Lassie\Bark()
|
||||
*Lassie\Fetch()
|
||||
Loading…
Add table
Add a link
Reference in a new issue