Implementing Inheritance Relationship
1. What is inheritance in Java?
2. Which keyword is used to describe inheritance in Java?
3. What does inheritance describe in Java?
4. A class Animal has a method makeSound(). A class Dog inherits from Animal and overrides makeSound() to produce 'Woof!'. A class Cat also inherits from Animal and overrides makeSound() to produce 'Meow!'. What is this scenario an example of?
5. A class Animal has a method makeSound(). A class Dog inherits from Animal and overrides makeSound() to produce 'Woof!'. A class Cat also inherits from Animal and overrides makeSound() to produce 'Meow!'. If a Dog object's makeSound() method is called, what sound will be produced?