Inheritance/Single: Difference between revisions
Content added Content deleted
(→{{header|F#}}: Corrected header as suggested on the Count examples/Full list/Tier 4 talk page) |
|||
Line 1,477: | Line 1,477: | ||
class dog |
class dog |
||
from |
from Animal |
||
method show() as string |
method show() as string |
||
return animal.show()+"dog " |
return animal.show()+"dog " |
||
Line 1,484: | Line 1,484: | ||
class cat |
class cat |
||
from |
from animal |
||
method show() as string |
method show() as string |
||
return animal.show()+"cat " |
return animal.show()+"cat " |
||
Line 1,491: | Line 1,491: | ||
class Lab |
class Lab |
||
from |
from dog |
||
method show() as string |
method show() as string |
||
return dog.show()+"Lab " |
return dog.show()+"Lab " |
||
Line 1,498: | Line 1,498: | ||
class Collie |
class Collie |
||
from |
from dog |
||
method show() as string |
method show() as string |
||
return dog.show()+"Collie " |
return dog.show()+"Collie " |