 In some languages classes and objects can be composed using other concepts like traits and mixins.In class-based languages the "classes" are defined beforehand and the "objects" are instantiated based on the classes.If two objects "apple" and "orange" are instantiated from the class "Fruit", they are inherently fruits and it is guaranteed that you may handle them in the same way; e.g.