Computer Science, asked by nandakishorv384, 3 months ago

Create an abstract class 'Animals' with an abstract method 'sound'. Now create a class 'Cats' with a method 'sound' which prints "Cat’s meow" and a class 'Dogs' with a method 'sound' which prints "Dogs bark", both inheriting the class 'Animals'. Now access those methods by using base class pointer methods.

Answers

Answered by Abhinav3583
0

Answer:

Create an abstract class 'Animals' with an abstract method 'sound'. Now create a class 'Cats' with a method 'sound' which prints "Cat’s meow" and a class 'Dogs' with a method 'sound' which prints "Dogs bark", both inheriting the class 'Animals'. Now access those methods by using base class pointer methods.

Explanation:

mark as BRAINLIEST answer

Answered by jaswasri2006
1

animals make their own sounds

Similar questions