Héritage de Kotlin
open class Person(age: Int) {
// code for eating, talking, walking
}
class MathTeacher(age: Int): Person(age) {
// other features of math teacher
}
class Footballer(age: Int): Person(age) {
// other features of footballer
}
class Businessman(age: Int): Person(age) {
// other features of businessman
}
SAMER SAEID