Create an Animal base class with a public sound property set to "unknown". Then add a subclass Dog and override the sound property to "woof".
Overriding properties
In the animal world
Report a typo
Write a program in Kotlin
class Animal {
// make your code here
}
class Dog : Animal() {
// make your code here
}
___
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.
Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.