Animal sounds

Report a typo

Create a class named Animal with the open makeSound() method that displays the message "The animal makes a sound". Then create a subclass Dog that overrides this method by displaying the message "The dog barks".

Sample Input 1:

Sample Output 1:

The dog barks
The animal makes a sound
Write a program in Kotlin
// make your class Animal here

// make your class Dog here
___

Create a free account to access the full topic