Created
August 24, 2021 21:10
-
-
Save Rillwz/f6feec730fbe929bf6e973ad1175431a to your computer and use it in GitHub Desktop.
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
| abstract class FlyingMonster { | |
| String fly(); | |
| } | |
| abstract class SwimingMonster { | |
| String swim(); | |
| } | |
| abstract class Monster extends Character { | |
| String eatHuman() { | |
| return 'Grr.. Delicious ..'; | |
| } | |
| String move(); | |
| } | |
| class MonsterKecoak extends Monster implements | |
| FlyingMonster, | |
| Swimingonster { | |
| @override String fly() => 'Syuuuung'; | |
| @override Stirng swim() => 'brussshh'; | |
| @override String move() { | |
| return 'jalan-jalan'; | |
| } | |
| } | |
| // Separated by comma |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment