1. In object-oriented programming, methods that are passed down from a parent class to a child class, allowing the child class to use the functionality defined in the parent class without redefining it.
The Dog class has access to inherited methods from the Animal parent class, such as eat() and sleep().
A classe Dog tem acesso aos métodos herdados da classe pai Animal, como eat() e sleep().
2. Methods available to an object through inheritance in the class hierarchy.
By using inherited methods, we reduce code duplication and improve maintainability.
Ao usar métodos herdados, reduzimos a duplicação de código e melhoramos a manutenibilidade.