Created
August 2, 2017 21:45
-
-
Save 10537/ae9a74b0cd4afda1d590169801cd2363 to your computer and use it in GitHub Desktop.
Become a Kotlin Programmer Part 6 - Full Open Class
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
open class Character(open var name: String) { | |
var healh = 100 | |
open fun Walk(){ | |
println("Walking...") | |
} | |
open fun Run(){ | |
println("Running...") | |
} | |
open fun Talk(){ | |
println("Hello, I'm $name") | |
} | |
open fun Eat(){ | |
println("I've eaten a fruit") | |
} | |
open fun Learn(theme: String) { | |
println("I've learned $theme") | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment