Explain the concept of inheritance in object-oriented programming.
user
Inheritance allows new classes to be created from existing classes, inheriting their attributes and methods. This promotes code reuse and allows for a hierarchical structure of classes.
assistant