Classes are not just ways of defining solitary objects. They can also be used to define complex relationships between objects that underlie the connections between various aspects of a program. Objects need not be of the same class for us to know at compile time that they share certain attributes. Inheritance, abstract classes, interfaces, and mixins are Dart techniques used for specifying relationships between objects and interfaces for object access.
In real life, some things are like other things but are not exactly the same. We say, then, that they are related to one another. For example, pens ...