can you give me a simple example of inheritance and polymorphism, so it could be fully clear and understandable?
using C# would make it more clear, as I already lear
Inheritance means that if you create a class Car with a public field TankSize then you derive from it a class SuperCar the last one has inherited the field TankSize from Car.
Polymorphism is the fact that every time in the code you have a method where a Car is expected you can pass a SuperCar and it will behave like a Car.
With virtual methods defined as needed you will be calling a method on a base class but the actual object on which you are working on will execute its version of the virtual method so you will be calling SuperCar.GetPrice and not Car.GetPrice in fact.
This in few words, for more, I see the others are already answering as I write.