Created
November 25, 2021 22:56
-
-
Save felipecastrosales/a65966811b58e25957b54dd933461cc4 to your computer and use it in GitHub Desktop.
Reescrita de Métodos - POO 1
This file contains hidden or 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
void main(){ | |
Cachorro doge = Cachorro(); | |
doge.comunicacao(); | |
Gato gato = Gato(); | |
gato.comunicacao(); | |
} | |
class Animal { | |
void comunicacao() { | |
print('Se comunica: '); | |
} | |
} | |
class Cachorro extends Animal { | |
} | |
class Gato extends Animal { | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment