Imagine that you have two classes named "Animal" and "Dog" and you want the class "Dog" to have all the properties and methods from the class "Animal", how would you do it? How is this called? What's the benefit?
To share properties and methods, we can define an inheritance so dog instances will have access to animal properties and methods. The main benefit is to avoid duplicated code, to define shared logic and eventually to precise specific behavior in subclasses.
class Animal {}