Created
May 21, 2020 06:54
-
-
Save rubywai/a9ff57547c40a0b66180e7ad16952c5b to your computer and use it in GitHub Desktop.
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
void main(){ | |
final engineer = Engineer(); | |
engineer..engineer() | |
..physics() | |
..english(); | |
final lawyer = Lawyer(); | |
lawyer..law() | |
..english() | |
..politic(); | |
} | |
class Engineering { | |
void engineer(){ | |
print('Engineering'); | |
} | |
} | |
class Law{ | |
void law(){ | |
print('Law'); | |
} | |
} | |
class Engineer extends Engineering with English,Physics{ | |
} | |
class Lawyer extends Law with English,Politic{ | |
} | |
class Technician extends Engineering with Physics{ | |
} | |
class Politician extends Law with Politic{ | |
} | |
mixin English{ | |
void english(){ | |
print('English...'); | |
} | |
} | |
mixin Physics on Engineering{ | |
void physics(){ | |
print('Physics...'); | |
} | |
} | |
mixin Politic on Law{ | |
void politic(){ | |
print('Politics..'); | |
} | |
} | |
© 2020 GitHub, Inc. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment