Created
September 17, 2019 08:28
-
-
Save muchirijane/6d6a5b78c2b2c70b7b143d5b1aa98b74 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(){ | |
Human jenny = Human(startingHeight: 15); | |
jenny.talk('Mommy'); | |
print(jenny.height); | |
// Human james = Human(20); | |
// print(james.height); | |
} | |
class Human { | |
double height; | |
int age = 0; | |
Human({double startingHeight}){ | |
height = startingHeight; | |
} | |
void talk(String whatToSay){ | |
print(whatToSay); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment