Created
February 11, 2020 15:02
-
-
Save JoelPapiREX/b893c89fd57e329b53819c3a473e6484 to your computer and use it in GitHub Desktop.
CLASES AVE
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Ave { | |
volar; | |
comer; | |
setVolar(volar) { | |
this.volar = volar; | |
} | |
setComer(comer) { | |
this.comer = comer; | |
} | |
performVolar() { | |
this.volar.volar(); | |
} | |
performcomer() { | |
this.comer.comer(); | |
} | |
} | |
class Volaraguila { | |
volar() { | |
console.log('volar alto '); | |
} | |
} | |
class VolarColibri { | |
volar() { | |
console.log('volar rapido') | |
} | |
} | |
class Comerpeces { | |
comer() { | |
console.log('comiendo peces '); | |
} | |
} | |
class Comernectar { | |
comer() { | |
console.log('comiendo nectar') | |
} | |
} | |
class Calva extends Ave { | |
} | |
class Quinde extends Ave { | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment