Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
37
Task/Inheritance-Single/OxygenBasic/inheritance-single.basic
Normal file
37
Task/Inheritance-Single/OxygenBasic/inheritance-single.basic
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
class animal
|
||||
method show() as string
|
||||
return "Animal "
|
||||
end method
|
||||
end Class
|
||||
|
||||
class dog
|
||||
from Animal
|
||||
method show() as string
|
||||
return animal.show()+"dog "
|
||||
end method
|
||||
end Class
|
||||
|
||||
class cat
|
||||
from animal
|
||||
method show() as string
|
||||
return animal.show()+"cat "
|
||||
end method
|
||||
end Class
|
||||
|
||||
class Lab
|
||||
from dog
|
||||
method show() as string
|
||||
return dog.show()+"Lab "
|
||||
end method
|
||||
end Class
|
||||
|
||||
class Collie
|
||||
from dog
|
||||
method show() as string
|
||||
return dog.show()+"Collie "
|
||||
end method
|
||||
end Class
|
||||
|
||||
|
||||
Collie c
|
||||
print c.show 'result: Animal Dog Collie
|
||||
Loading…
Add table
Add a link
Reference in a new issue