fun main(args : Array<String>){
val gagak = Bird(2)
gagak.fly()
}
interface IFly{
fun fly()
val numberOfWings: Int
}
class Bird (override val numberOfWings: Int) : Ifly{
override fun fly(){
if(numberOfWings > 0) println("Flying with $numberOfWings wings")
else println("I flying without wings")
}
}